Hi,
So as I can't currently connect my Arduino to my Xbee coordinator (I forgot to bring literally anything but the Arduino and Xbee mesh kit modules home when I last left the office) I thought I'd connect it to CoolTerm so I can see the hex data it would transmit if it could talk to the Xbee. Here's what the first frame of the RemoteAtCommand example returns, this should send IR = 0xffff to the address 0x0013a200 400a3e02.
7e 00 7d 31 17 01 00 7d 33 a2 00 40 0a 3e 02 ff fe 02 49 f2 ff ff 10
I've underlined the address - it should start 00 13 a2 00, but it doesn't. Now if I change the address to 0xdeadbeef 400a3e02 I get:
7e 00 7d 31 17 01 de ad be ef 40 0a...
Digging a little further, setting SH to other values gives me this (after 7e 00 7d 31 17 01 every time):
- 00000000 = 00 00 00 00
- 10000000 = 10 00 00 00
- 11000000 = 7d 31 00 00 00
- 01000000 = 01 00 00 00
- 01100000 = 01 10 00 00
- 01110000 = 01 7d 31 00 00
- 00100000 = 00 01 00 00
So it looks like whenever 0x11 is in the address, instead of getting 11 from the Arduino I get 7d 31. In binary terms, of course, I should be seeing 0001 0001 but I instead get 0111 1101 0010 0001. That makes absolutely no sense to me.
I've tried it with 12 - that works fine. 13 gives (as above) 7d 33, but 14, 15, 16, 17, 18 and 19 all work.
What's going on? Am I being spectacularly short-sighted or is this legitimately broken? Browsing the github issues doesn't suggest it's fundamentally and completely broken, but I have just read that the Arduino package manager (which is how I installed it) downloads an old version, so I'll try doing it manually and see if that changes anything.