DIO Line passing using XBee 802.15.4

I am trying to use the XBEE 802.15.4 (Series 1) module for wirelessly transmitting GPS data from a remoted GPS receiver to a central module. The central module (Transmitter) is in the cockpit of a small airplane and the remoted module (receiver) is in a pod mounted on the wing strut. The transmitter-to-receiver distance is only 2m and the transmitter transmits only through the plexiglass windscreen to the pod.

I need to send both the GPS serial data as well as the one-pulse-per-second (1PPS) strobe signal to the receiver. So I need to pass both serial data as well as a DIO line. I have everything working very well with 100% reliability of the serial data – about 1000 bytes every sec. However, the DIO signal-passing misses about 1% of the 1PPS signals. I am operating the XBees at 57,600 baud.

I also re-transmit the received 1PPS signal back to the transmitter to enable measuring the round-trip delay in the 1PPS signal. This allows precise timing of other sensor data from inside the remote pod with consideration of the transport delay due to the wireless PPS link.

My setup uses a GPS receiver attached to a microcontroller (mbed LPC1768) and the microcontroller then connected to the xbee (transmitter). A second xbee (receiver) is connected to a second identical mbed microcontroller.

I use the following AT commands to set up the transmitter and receiver for each power-up.

ATID 3141 //network ID
ATMY 1111 //Transmitter ID
ATDL 2222 //Destination ID
ATD1 3 //DIO1 to input to receive re-transmitted 1PPS signal from receiver
ATIC 2 //set DIO1 to signal upon change
ATD0 4 //set DIO0 to output to send 1PPS to receiver
ATIA 2222 //map the transmitter ouput to the receiver input
ATIU 0 //turn off the serial messages when DIO is received
ATWR //write the data to the NVRAM
ATFR //Do a reset
ATCN //Terminate the AT command mode

ATID 3141 //network ID
ATMY 2222 //Receiver ID
ATDL 1111 //Destination ID
ATD1 4 //DIO1 to output receive transmitted 1PPS
ATIA 1111 //map the receiver ouput to the transmitter input
ATIU 0 //turn off the serial messages when DIO is received
ATD0 3 //write the data to the NVRAM
ATIC 1 //Do a reset
ATWR //Terminate the AT command mode

Regarding the AT commands, I am puzzled over the use of the ATD1/ATD0 pairing. The text in the specification (page 23 of the XBee/XBee-PRO Modules 802.15.4 Product Manual) describes the I/O Line passing. This describes a “virtual wire” between the DIO lines that are set up in pairs. My questions are:

  1. Do I need to bother with the ATIC (change detection) command once these pins are paired? Is the pairng enough to establish the change detection?
  2. Do I need to set a sample rate (ATIR command) or are the lines just paired with the changes in the DIO lines detected automatically?
  3. Do I need to set the ATIU to turn off any serial messages associeted with the DIO line passing?

The 1PPS signal from the GPS receiver is trapped by the microcontroller with 100% success. The mbed microcontroller creates a digital pulse (0-to-1-back-to-0) using one of its DIO output lines connected to the Xbee DIO line. The duration of this microcontroller-generated pulse is 1 millisec.

Any suggestions would be appreciated

Some more data after further testing.

I have reduced the XBee datarate from 57,600 to 38,400 baud. Also, I have lengthened the Microcontroller-generated pulse width from 1msec to about 1.8msec. The data transmission robustness seems to be sensitive to this pulse width. Finally, I have reduced the GPS messages so that the once-per-sec message packet is about 400 bytes.

For my bench testing, the transmitter/receiver pair are 2-3 ft apart. The 802.15.4 XBees have the small wire antenna. In a lengthy test of 2000 secs, I missed 18 1PPS signals (about 1%) and I also had 4 errors in the GPS Serial message transmission. The GPS data messages have a CRC at the end so I can detect anomalous messages. I also monitor the GPS data at the transmitter end and the GPS data as detected there is perfect – so the errors are in the XBee transmission link.

Yes you need to use either the Sample Rate with a number of samples before transmit set or use the IO change detect. One or the other need to be set.

No, IU is not needed. That only tells the module to output on the UART any DIO line data that has been sent via an API frame.