I have been experimenting with an Arduino hooked up to an Xbee and have had some success getting it recognised by the hub. I have performed a device announce, endpoint report and simple descriptor which then gets the device to show in smartthings as a device.
I now wish to query the device to get the state of connected things to the Arduino (such as buttons, light sensors, motion sensors etc) and I am currently using zigbee.readAttribute in my device handler.
When I call zigbee.readAttribute I get a match descriptor request, is this normal?
I was expecting to receive a read attribute request.
The 78 appears to be the sequence number and changes every request.
I’m guessing the 01 00 is the 16 bit little endian version of the 0x01 I am using in the readAttribute call.
I don’t know what the previous zero byte means as it it not mentioned in the Read Attributes Command frame format.
This then throws doubt in my mind that I am even looking at the right request type in the spec and that maybe it is not a Read Attribute Command.
Mathew, can you paste the entire packet in hex like you did above but for all bytes received. When the xBee is in API mode it will send your microprocessor data through the serial port as API data frames (packets of data with a check sum at the end). They all start with the hex number 0x7E. You will have to decipher what is in these packets to figure out what is going on. For example on page 155 and 156 of the xBee manual you can see the format of two of the common RX data packets.