Forums > MaxMSP

issues receiving "0" with mxj net* objects

September 27, 2011 | 4:10 pm

Hi all,
Trying to figure out where this issue is occurring. I’m sending a UDP packet from an arduino to max wirelessly (arduino >> wifi radio >> wireless network >> max >> net.udp.recv)

I’m sending raw bytes, so occasionally send a "0" (e.g. 126 2 0 21: header, # bytes in payload, payload). When that happens the mxj net.* objects pass thru "192 128", i.e. 126 2 192 128 21. Happens both with udp and multicast. A packet sniffer on the receiving machine shows that the right packet is making it’s way to my mac (i.e. 0 = 0), so I’m thinking the issue lies with the mxj net.* objects.

Has anyone come across this?

Thanks,
David


September 27, 2011 | 4:26 pm

hmmm…and if I send a byte value > 127 anywhere in the packet, that value gets converted to "239 191 189". Perhaps sending raw bytes over the network to max was not meant to be? again, a packet sniffer shows the right values reaching the mac.

thanks again,
David


September 27, 2011 | 9:31 pm

Hi,

have you considered using [sadam.udpReceiver]? I wrote that object specially to handle raw byte streams incoming to Max through UDP. You may access it in The sadam Library (see http://www.sadam.hu/software ).

Hope that helps,
Ádám


September 28, 2011 | 12:10 am

Absolutely brilliant! Exactly what I needed!

All the best,
David


April 6, 2013 | 5:51 pm

Hi guys,

Can I ask you , which kind of wifi system did you use to send data wirelessly from arduino ?

Thanks in advance
Onde


Viewing 5 posts - 1 through 5 (of 5 total)