UDP doesn't send packet

manitou

Senior Member+
Using 1.0.5/1.18rc2, on teensy3* and teensy ++ 2:
I have a UDP test sketch, see
https://github.com/manitou48/teensy3/blob/master/wizpaul.ino
for test =1;, the sketch sends an 8-byte UDP packet to a UDP echo server. This section of code works on DUE, maple, UNO, and used to work on teensy 3 (a year ago). Recent tests with new Ethernet lib doesn't work -- watching the ether, no packet is emitted from teensy 3*. If I send an extra UDP packet (prime the pump?), then the echo loop will run. The other UDP tests in the sketch (sink and source tests) work.
A similar sketch on teensy ++ 2 misbehaves in the same manner.

I'll hook up logic analyzer to see what i can see ....
 
actually, the UDP echo fails today on UNO unless primed with extra UDP packet -- but the 1.0.5 build is using the teensy-modified Ethernet lib,
but the problem could have been introduced by Arduino in stock Ethernet lib ?? I guess I'll have to try with virgin 1.0.5 ...
 
Adding a 200ms delay at the end of setup() seems to allow the UDP echo to work without a primer packet. The echo time for the first packet is over 1.4 seconds, then it runs at 572 us round-trip time for each 8-byte echo. A delay of 100ms or less did not work.
 
I installed a virgin 1.0.5 IDE and then added the "stock" w5200 mods to the Ethernet library. The UDP echo ran fine on a UNO. The first echo (which includes delay for the ARP request) took 400840 us, then subsequent echo's took about 868 us.

I should note these tests are to a W5200 WIZ820io.
 
What do you mean with "stock" W5200 mods ?

Edit: I see you did not mention Teensyduino, so I think I know what you mean ;-)
 
Back
Top