Writing to socket registers
IO Modules
No replies yet. Be the first to reply.
Join the discussion.
IO Modules
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Writing to socket registers
by irina WIZnet ·
Hi, Lance.
We can access all socket registers using same SPI command.
(IINCHIP_WRITE and IINCHIP_READ functions in Ref. codes)
How about the other network Information registers? (MAC, IP, Gateway, Subnet … and etc.)
Please check the register map in source codes again.
Regards,
Eric.
RE: Writing to socket registers
by Lance ·
Hi,
at the socket registers I can write the mode, command and source port register. But if I write to the destination hardware address, the destination IP-address or the destination port register, I can’t read these values out of these registers. Are these registers “double buffered” as mentioned here: Problem writing in the Sn_DIPR registers
But the problem is, the connection is set up with the wrong parameters. For example I write the destination IP to 192.168.0.20. Then I read the IP register with 0.0.0.0 and after setting the connect command the W5200 trys to connect to 0.0.0.0 (analysed by wireshark).
Thank you for your help.
Best regards,
Lance
RE: Writing to socket registers
by irina WIZnet ·
The destination IP address (and dest port) is possible to read after send (UDP) / connect (TCP - established) complete.
if else, read values are 0.0.0.0. it’s correct.
please refer to connect() function in W5200 reference code.
Regards,
Eric.
RE: Writing to socket registers
by dap ·
Can you please just post the relevant code to show us how to write to the destination ip address, mac address and port please. I can use the device is server mode easily, no luck in client mode. The connect() function is very overloaded and difficult to follow! You may have notices this problem has caused issues for many users.
Thanks,
dp
RE: Writing to socket registers
by irina WIZnet ·
Hi, dp.
Please refer to next code.
This is the part of ‘connect’ function in W5200 reference code.
It’s very simple, just write the destIP and destPort to W5200 using SPI interface.
What code are you using?
If you attach your code - connect function - in this post, we are possible to help you.
Regards,
Eric.