Xbee API mode issues with microcontroller

I have used the Xbee API mode successfuly when communicating between two computers while they were attached to USB explorer (I send data and it is received). However when I try to do the same with the radios being attached to pic33 microcontroller, I’m getting strange results. Here is my setup:

A Xbee radio, router, attached with a PC And a Xbee radio, co-ordinator, attached with a pic33 microcontroller

The microcontroller sends broadcast data. Here is the API command:

7E 00 13 10 01 00 00 00 00 00 00 00 00 FF FE 00 00 48 65 6C 6C 6F FD

7E: Delimiter 00 13: Length 10 01: API frame type and frame ID 00 x 8 : Coordinator 64 bit address FF FE: 16 bit network address 00 00: Options and braodcast radius 48 65 6C 6C 6F: Data (Hello) FD: Checksum

The same command works perfectly with both radios hooked to PCs and results in the XCTU windows.

I have debugged the whole transmit code and its sending the command as it should. I checked the TXREG registers in online debugging with PICKIT3. But nothing is being received in the XCTU window.

I have played with different delays, tried continuous and single transmission and everything I can think of but I get absolutely nothing in the XCTU window. What I want to know is that is that what do I have to do to make it work?

No, that is NOT a broadcast. You are sending to 00 00 00 00 00 00 00 00, which is short-hand for “send to the coordinator”. A coordinator can’t send to itself that way.

You’d want to send (10 01) 00 00 00 00 00 00 FF FF (FF FE 00 etc).

Note that a broadcast on ZigBee chokes the mesh for up to 5 seconds, so while this is an okay test, you won’t want to do this on the final product/prject.

Great looking. Thanks for sharing.



RS GoldCheap WOW Gold