title: API mode Xbee doesn't send digital samples?
body: <p>I've been playing with getting an <a href="http://en.wikipedia.org/wiki/XBee" rel="nofollow">XBee</a> to transmit whether a push button is up or down.</p>
  
  <p>To do this I have the wire coming out of the circuit connected to DIO4 on the XBee. I used <a href="http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu" rel="nofollow">X-CTU</a> to set DIO4 to digital input mode. Nothing else is enabled.</p>
  
  <p>Now, the sensor XBee is transmitting a <a href="http://en.wikipedia.org/wiki/ZigBee" rel="nofollow">ZigBee</a> 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.</p>
  
  <p>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)?</p>