Enable Digital Input Pin in Xbee

In this post we will go through the process of remotely configuring the XBee end device I/O pin as digital input from XBee coordinator using Digi X-CTU software. The I/O pin we are considering in our case is DIO4(pin no 11) on the end device.

Hardware/Software environment settings

  • One XBee node configured as Zigbee Coordinator API (Firmware version: 21A7)
  • One XBee node configured as Zigbee End Device API(Firmware version: 29A7)
  • Digi X-CTU application software (Version: 5.2.8.6)

The approach followed here, to configure remote end device from coordinator is by passing AT commands in API mode. While working with API firmware version, we need to check Enable API in the PC Settings tab of the X-CTU.

Enable API

In XBee we have the API frame type 0x17, called Remote AT Command Request frame, available to ease our job in setting the pin as digital input.

API Frame to Enable a DIO Pin as Digital Input

7E 00 10 17 01 00 13 A2 00 40 A9 E4 A2
Delimiter Length of payload Frame Type Frame ID 64 bit address of destination
FF FE 02 44 34 03 49
16 bit network address of destination Command options AT command Command parameter Checksum

Length of payload: Calculated by the number bytes between Frame Type and Command parameter. In the above, there are 16 bytes(HEX equivalent 10) between Frame Type and Command parameter.
Frame Type: 0x17 for Remote AT Command Request frame.
Frame ID: 0x01 for ACK.
64 bit address of the destination: Assigned by the manufacturer.
16 bit address of the destination: Assigned by the coordinator while forming network.
Command Options: 0x02 for update.
AT Command: D4(0x4434).
Command Parameters: 0x03 for digital input.

Checksum: Calculated by adding all bytes after length(exclude delimiter and length) and then keeping only the lowest 8 bits of the result. Next subtract the result from 0xFF to obtain checksum.

In X-CTU, go to Terminal Tab and select Assemble Packet. This will pop up send packet window. Select display as HEX. Enter the API frame that you would like to transfer to the remote end device here and click on send data.

Enable Digital Input Pin in Xbee
The text in blue is the API frame passed out from the coordinator to the remote end device. The text in red is the response received from the remote end device by the coordinator. The API response frame type is 0x97, called Remote Command Response.

7E 00 0F 97 01 00 13 A2 00 40 A9 E4 A2
Delimiter Length of payload Frame Type Frame ID 64 bit address of source
B4 53 44 34 00 C4
16 bit network address of source AT command Command status Checksum

Length of payload: Calculated by the number bytes between Frame Type and Command parameter. In the above, there are 15 bytes(HEX equivalent 0x0F) between Frame Type and Command status.
Frame Type: 0x97 for Remote Command Response frame.
Frame ID: 0x01 .
64 bit address of the source: Address of the remote radio returning this response.
16 bit address of the source: Network address of the remote radio.
AT Command: D4(0x4434).
Command Status: 0x0o for OK.
Checksum: Calculated by adding all bytes after length(exclude delimiter and length) and then keeping only the lowest 8 bits of the result. Next subtract the result from 0xFF to obtain checksum.

 

Leave a Reply