txUDP nightmare; lacking PORT understanding?
UltraLazer
Posts: 30
Hi, yet another txUDP issue... I'm sorry if this issue has been addressed already
I have been able to recieve UDP packets on the spinneret but I'm not sure I understand how the wiznet chip formats the port. My understanding is that the 2 bytes following the ip in the packet represent the port (destination or source? encoded how?)
192 168 1 2 238 48 0 16 47 PWR/1/0 ,i0 0 0 0 0 1 0 - Message sent to port 5555 @ 192.168.1.255
192 168 1 2 222 11 0 16 47 PWR/1/0 ,i0 0 0 0 0 1 0 - Message sent to 5555 @ spinnerets ip 192.168.1.101
Im not sure why byte 5 and 6 are showing difrent pot numbers depending on what IP it is sent to.
I am looking to rx on 5555 and tx to 5554 but the following
ETHERNET.SocketOpen(0, ETHERNET#_UDPPROTO, 5555, 5554, @destIP[0]) does not seem to work either.
Even leaving the udp echo demo as is from the obex (with new ip's) I am not able to receive any packets on my pc. I can receive UDP packets on the PC from devices that aren't the spinneret. I have no problem receiving but sending... no go.
I'm as stuck as I can get and would truly appreciate any insight on this.
Thanks
I have been able to recieve UDP packets on the spinneret but I'm not sure I understand how the wiznet chip formats the port. My understanding is that the 2 bytes following the ip in the packet represent the port (destination or source? encoded how?)
192 168 1 2 238 48 0 16 47 PWR/1/0 ,i0 0 0 0 0 1 0 - Message sent to port 5555 @ 192.168.1.255
192 168 1 2 222 11 0 16 47 PWR/1/0 ,i0 0 0 0 0 1 0 - Message sent to 5555 @ spinnerets ip 192.168.1.101
Im not sure why byte 5 and 6 are showing difrent pot numbers depending on what IP it is sent to.
I am looking to rx on 5555 and tx to 5554 but the following
ETHERNET.SocketOpen(0, ETHERNET#_UDPPROTO, 5555, 5554, @destIP[0]) does not seem to work either.
Even leaving the udp echo demo as is from the obex (with new ip's) I am not able to receive any packets on my pc. I can receive UDP packets on the PC from devices that aren't the spinneret. I have no problem receiving but sending... no go.
I'm as stuck as I can get and would truly appreciate any insight on this.
Thanks
Comments
Byte 6 and 7 are the content length and work the same as the port.
Bytes 8+ are the content.