UDP listen for connection on port 12344

Questions specifically related to the TCP/IP stack that interfaces with the driver.

Re: UDP listen for connection on port 12344

Postby GregEigsti » Sun Nov 07, 2010 1:51 pm

I have made rryan's fix locally in the user contrib code; will be checking it in later today. If you are a UDP user please let me know if this fix makes UDP more stable for you.

WARNING - I will make sure stuff builds but am not going to test it - famous last words ;)
Check out the wiki!
uIP Stack Docs
Compatible Access Point List
WiShield user contrib branch - DNS, DHCP, AP Scanning, bug fixes, etc.
SlackLab.org - My geek projects blog.
User avatar
GregEigsti
 
Posts: 1067
Joined: Sun Aug 02, 2009 5:23 pm
Location: Sammamish WA USA (near Seattle)
  • Website

Re: UDP listen for connection on port 12344

Postby karmakazi » Sun Nov 07, 2010 6:35 pm

Thanks Greg. I won't be able to try it today but I will get to it this week.

If it is the same change that I made to my code then I can tell you it does indeed prevent the UDP connection from locking to the first port that connects to it... but I have found something else that I have having a hard time duplicating in a reliable way. Sometimes the connection will not accept data right away... but if you hammer at it with a bunch of packets it will relent and connect.

These seem to be the conditions under which it happens (like I said I need to do more testing):
1) If I don't connect to the wishield right away.
2) The network is infrastructure mode
3) No security

My first hypothesis is that other UDP packets on the network are causing issues.
karmakazi
 
Posts: 6
Joined: Sun Oct 03, 2010 12:07 pm

Re: UDP listen for connection on port 12344

Postby GregEigsti » Sun Nov 07, 2010 6:44 pm

Thanks! Maybe give this a try - I have not read all of the code today...

Was wondering if the following would help (did not add to user contrib code)
Code: Select all
   // currently in user contrib - this code commented out
   // if (uip_udp_conn->rport == 0) {
   //    uip_udp_conn->rport = UDPBUF->srcport;
   // }

   // should this be added to set rport in case it somehow gets set to non 0???
   uip_udp_conn->rport = 0;


I am still not convince that this is the best fix since rport information is lost; I think a better change might be to alter the (large) conditional above this code. But then I did not take the time or make the effort so I won't whine (much) ;)

Keep us informed on your progress. Hmm, I should set up my UDP stress test with this fix in place...

Getting tired, work tomorrow...
Greg
Check out the wiki!
uIP Stack Docs
Compatible Access Point List
WiShield user contrib branch - DNS, DHCP, AP Scanning, bug fixes, etc.
SlackLab.org - My geek projects blog.
User avatar
GregEigsti
 
Posts: 1067
Joined: Sun Aug 02, 2009 5:23 pm
Location: Sammamish WA USA (near Seattle)
  • Website

Re: UDP listen for connection on port 12344

Postby karmakazi » Thu Nov 18, 2010 8:29 pm

Sorry Greg,

The real world keeps pulling me away. I have not tried your change yet but I thought I would let you know that these issues connecting do not happen if I connect directly through ADHOC mode.

Cheers,
Andrew
karmakazi
 
Posts: 6
Joined: Sun Oct 03, 2010 12:07 pm

Previous

Return to TCP/IP Stack

Who is online

Users browsing this forum: No registered users and 1 guest