Xbee with X-CTU

The Xbee module that we are considering here is Xbee PRO S2B which operates on Zigbee protocol. Zigbee is a standard communication protocol for low-power, wireless networks. These modules are low cost and operate on less power. Xbee is a popular wireless device that is used to transmit and receive data wirelessly.

When data has to sent from one radio to another radio in a network, both the radios need to have same PAN address and channel. The sending radio should know any one of the addresses(64 or 16 bit) of the receiving radio. Twelve different channels are available for communication. When the coordinator forms a network, it will select one among the 12 channels for communication. Multiple networks can be started on a same channel. Each network is identified by its PAN id.

Each network consists of only one coordinator. The network address of coordinator is always assigned as 0x00. Every other device that is added to network is assigned a 16 bit network address. The coordinator is responsible for forming the network. There may exist one to many router and end devices in the network based on the requirement. A router assists in passing information from other router/end devices. An end device is used to send and receive information. Each radio is associated with the following information:

  • unique 64 bit serial number.

  • a dynamically assigned 16-bit address, unique within a network.

  • A short string text called as node identifier

Xbee has a number of input and output pin that can be configured to be read or written to. The input/output pin details of Xbee PRO S2B are listed below in the table.

IO Pin Name

Pin no

Default state

Command

AI0/DIO0

20

Disabled

D0

AI1/DIO1

19

Disabled

D1

AI2/DIO2

18

Disabled

D2

AI3/DIO3

17

Disabled

D3

DIO4

11

Disabled

D4

DIO5

15

Output

D5

DIO6

16

Input

D6

DIO7

12

Output

D7

DIO8

9*

Input

D8

DIO10

6

Output

D10

DIO11

7

Input

D11

DIO12

4

Disabled

D12

Command parameters are listed in the table below. Based on the configuration needed, the command and command parameter need to be passed.

Command Parameter

Description

2

Analog input

3

Digital input

4

Digital output low

5

Digital output high

In the subsequent sections, we will look into building API frames for achieving the following

  • Enable digital output pin and toggle it.

  • Enable digital input pin.

  • Enable analog input pin.

  • Acquiring samples

    • Queried sampling

    • Automatic sampling

    • Change detection sampling

Leave a Reply