Problem configuring XBEE 2 API Coordinator without XCTU

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!

You have too many characters in your ID value. The value is in hex so the actual value you would provide is 0x8082 and nothing else.

is 8082 a hex?
then just put 0x8082.

That would be correct. The ID value is in Hex characters so you would just use 0x8082 in the API frame for the value.

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.

or you want to send “8082” sequentially in the packet??
maybe, try to put it in ascii

‘8’ hexascii is 0x38
‘0’ “" 0x30
‘8’ "
” 0x38
‘2’ “______” 0x32

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.