I am having my microcontroller configure my Xbee series 2 as an API coordinator. When I write the PAN ID, it writes the 0x08 AT command like this:
0x7E //start byte
0x00
0x06 //6 bytes long
0x08 //AT command
0x00 //no response
0x49 // ‘I’
0x44 // ‘D’
0x08 // I want my ID to be 8082
0x00
0x08
0x02
then I write the checksum…
But when I read the Xbee on XCTU instead of 8082 for the PAN ID, I get 8000802. It looks like its taking each byte I give it and multiplying it by 16. I don’t understand why, or how to fix this…Please help!
But how do I send that across UART? I thought UART can only send a byte at a time. I ultimately want to send set all 64 bits of the PAN ID and Encryption Key.
The ID parameter is in Hex. You need to send the API frame as all one data packet. That is each byte one right after the other for the frame to be seen and accepted. If you are not familiar with API mode, it might be better for you to start with transparent mode first.