I have some Series 2 XBees running ZB firmware (2X41), and would like to read analog inputs from remote routers. As I understand it, this can only be done in API mode. When I attempt this, the remote command response contains a status of 0x02 (Invalid Command), so I’m trying to take a few steps back and get the simplest possible configuration working first – reading an analog input on a local device.
In AT mode, everything works. I load ZigBee Router AT firmware (Version 2241) on an XBee and restore factory defaults.
I enter command mode (+++)
configure AD0 as an analog input (ATD02)
apply changes (ATAC)
and force a sample. (ATIS)
I get the expected output.
Then, I load ZigBee Router API firmware (Version 2341), and attempt to follow the same steps. I’m using the “Assemble Packet” feature of X-CTU.
Configure AD0 as an analog input:
7E 00 05 08 01 44 30 02 80
7E 00 04 08 01 41 43 72
Force a sample:
7E 00 04 08 01 49 53 5A
The response I get has a status of 0x02 (Invalid command):
7E 00 05 88 01 49 53 02 D8
Can anyone tell me what I’m doing wrong? Thanks!
I have the same problem. I also have this problem with AT%V command, status of 2 is returned.
The problem occurs running either the router or coordinator firmware, talking to either a local or remote Series 2 XBee running ZB firmware.
My hardware is a bit different - I’m running a BL4S100 board from Rabbit Semiconductor. I have the XBee Series 2 plugged into this board. I get these results if I run the XBee_Web_Gateway.c sample application, or the AT_interactive.c sample application.
i tried a remote ATIS command and i got it to work, finally. But how do you find out which bytes are samples of d0 or d1 etc? atis with only d0 enabled sends back 6 bytes, atis with just d1 also sends 6 bytes back but when i send a remote atis and both pins are enabled i get 10 bytes back! is there something wrong with the samples?
I think the command isn’t yet supported in the ZB firmware. I tried versions 2341 and 2321 without luck, but version 1320 (XB24-B ZigBee Router/End Device API) worked. Try downgrading – AT%V didn’t work for me either until I loaded version 1320.
We also try XBee module and may fall down same trap which you had experienced.
1320 was installed into but did not work well for IS command. We just see 0X02. May I ask what version of coordinator you use when you succeeded?
We use X-CTU but it is not effective way to confirm.
Would you let me know more effective way if you have?
You are correct. The IO sampleing is only supported on End Devices and on AT Routers. The next firmware release which will be 2x6x will support sampling on all targets. The official realese of the firmware will probably take another month or so, but you could check with Digi Applications from time to time before that to see if the firmware were available.
A remote command response has the following bytes (after the API identifier):
[64-bit address] + [16-bit address] + [Command Name] + [Status] + [IO Data] + [Checksum]
The IO data is the same for a local IS or a remote IS:
[# Samples] + [Digital Mask] + [Analog Mask] + [Digital IO Data] + [Analog Data (if applicable)]