How to send raw UDP data with Arduino 1.0


hi everybody,
until i've been using older version of arduino spi.h, ethernet.h, , udp.h in order send udp messages host computer. now, udp.h has apparently been replaced ethernetudp.h.
the problem have udp.write() seems interpret 0 in buffer terminator , cuts off rest of buffer. wasn't case udp.sendpacket() in old library.

does have quick solution before start digging in library source?
thanks,
sukandar

the few variations of udp.write(). if specify pointer, rather character, assume 0 terminated string. send zeros, must specify length of buffer sent second parameter.

code: [select]
byte outbuf[16];

// sends 16 bytes, zeros , all
udp.write(outbuf,16);




Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > How to send raw UDP data with Arduino 1.0


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial