Home/Support/Support Forum/Send frame data to local Xbee S2 API over serial?

Send frame data to local Xbee S2 API over serial?

0 votes
I'm wanting to set up a 2 way co-ordinator / router network in API mode to enable checking of transmit status in both directions. One Xbee will be attached via an explorer to a laptop running a Processing sketch.

My first question is - is it possible to pass a frame of bytes to a local xbee while it is in API mode? If I run it in transparent mode I can see the data being passed, but not in API mode. I'm unsure whether this is just because I'm not formatting the data write to serial properly? I've tried investigating adding a library to Processing for Xbee but has involved importing a java library and haven't had much success. Is compiling a frame of bytes intrinsically difficult, or should it be achievable by writing 0x7e, 0x00 etc to serial?
asked Oct 21, 2016 in IEEE 802.15.4 by DaveBl New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
Yes, you are correct. It is because you have not formatted the data properly. When using API mode, the data must be in Digi's API format with the proper start delimiter, length bytes, frame ID Etc. otherwise the radio sees it and discards the frame as invalid.
answered Oct 21, 2016 by mvut Veteran of the Digi Community (13,680 points)
Thanks for the reply - knowing where the problem was helped in directing efforts to rectify it.  Indeed I'd failed to put the variable on which I was calculating FrameID into the checksum calculation - and a frame with incorret checksum was just being ignored.  Its now passing data amazingly well and efficiently!
...