I've been playing with getting an XBee to transmit whether a push button is up or down.
To do this I have the wire coming out of the circuit connected to DIO4 on the XBee. I used X-CTU to set DIO4 to digital input mode. Nothing else is enabled.
Now, the sensor XBee is transmitting a ZigBee I/O Data Sample Rx Indicator packet. I used the 'Building Wireless Sensor Networks' book to help parse out the packet. It says a packet always includes the analog sample values and will only include the digital ones if a digital pin is configured. I'm getting a 21 byte packet back, which implies the digital bit sample is not included. The digital mask says IO4 is enabled, and all the analog inputs are disabled. However, it appears the digital values were placed into the analog samples.
This is my confusion. Why is the digital sample being stuffed into the analog sample? Or is the analog sample simply left out if no analog inputs are configured (contrary to what the book says)?