Problems with UDP


hallo :)

i' have problem ethernet udp library...

my aim steer arduino udp , sensor datas. need processing program on mac computer. i've installed therefore hypermedia.net lib. there spi.h,ethernet.h , ethernetudp.h installed on arduino. mac runs on osx 10.9.3. arduino ied 1.0.5, processing 2.1.1. have installed ethernet-shield on arduino duemilanove .
now problems:

if take this scetch not happens: circa every 2 seconds data on serial monitor, when press button during progress. ethernet doesn't give me @ all. time time problem appears, connection gets lost. error report says:

   
quote
could not send message!
   >port:8888, ip:169.254.86.129, buffer 65507, packet length: 11
   >host down


aftert rewrote scetch bit on both sites: on site of processing took out of void keypressed() , put in void draw() make send datas time. @ arduino took the

quote
udp.beginpacket(udp.remoteip(), udp.remoteport());
   udp.write(replybuffer);
   udp.endpacket();


and delay out, readout time. works circa every 2 tries. when doesn't work , says "host down" again. when it's working stops after short duration until sends same error report again. takes longer, shorter. imagine happens when incoming buffer of shield full. possible? , if yes there way empty it? works without problems . other words: it's no program relied upon @ all.
the next step made, put in code pieces on arduino site, time serial debugging:

   
quote
udp.beginpacket(udp.remoteip(), udp.remorteport());
   serial.printin(1);
   udp.write("hello");
   serial.printin(2);
   udp.endpacket();
   serial.printin(3);


i didn't change on processing site. appeared on serial monitor was:

   
quote
received packet of size 11
   from 169.254.66.28, port 6000
   contents:
   hello world
   1
   2


after circa 2 seconds again:

   
quote
3
   received packet of size 11
   from 169.254.66.28, port 6000
   contents:
   hello world
   1
   2


doesn't mean, scetch got stuck in "udp.endpacket()"- method … why?
recording investigations method means ethernet-shield sends saved in buffer .
what's confusing me rx , tx leds on ethernet-shield:
the rx-led makes kinda wants, because can't see orderliness. tx - led, on other side blinks regulary ca every 4 times second.
doesn't mean,  shield tries active udp.endpacket()-method during progress? i'm confused , don't know do.
is possible, have change in network settings of mac? can't imagine, because of udp being no safe protocol , transmitter sending data, wether arrive or not (at least that's understand wikipedia…)  , problem arduino connected network settings of mac.
i can imaginge it's defect buffer, in data gets pre-saved - don't have explination that.
do have idea problem be?

ps.: sorry english, hope not terrible read... :)

so read, arduino receiving packets mac, no packets received on mac? if so, check mac firewall.


Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > Problems with UDP


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support