|
Weird Socket Problem with Arduino & cRio
Hi Fellow FIRSTers,
OK, we're trying to use an Arduino to sample the speed of our shooter and the angle of the ball guide. We're using Ethernet on the Arduino because the cRio II doesn't lend itself to much of anything else. FWIW, we're using C++ for our code.
The Arduino is working fine and outputting packets on the local network segment on the 'bot. We're using UDP (port 1130) because there's no need to have a connection given how often the updates come out of the Arduino. If we miss one, there'll be another coming along soon.
Our problem is that if the Arduino is outputting packets and the cRio isn't actively reading them, then the cRio will eventually lock up. It's acting like we're filling up some sort of buffer that's causing the robot code to hang because it's not being read. But, I've never seen this behavior with VxWorks before. Normally, if there's nothing reading a UDP port, the packet buffer fills up and then the packets just get dropped.
Can anyone shed some light on the issue? Is this something that was changed in VxWorks to accommodate FIRST? Is there anyone else who is using Ethernet from an Arduino to talk to the cRio? Any enlightenment would be greatly appreciated.
TIA,
Mike
Last edited by taichichuan : 04-15-2012 at 01:20 AM.
|