How to Run AT command in API mode

In ZigBee Operator, it is very easy to run AT command in API mode.

Here are the examples for run get firmware AT command “VR”.

In XBee/XBee-Pro ZB profile.

Steps:

Switch to XBee/XBee Pro ZB Profile.

Input ASCII characters “VR” in command field and click button “Send” will send the command.

Here is screenshot of the quick send panel.

image

Here is the message in log window.

Send:(21:25:54) 7E 00 04 08 01 56 52 4E

Data Parsed: 7E 00 04 08 01 56 52 4E
AT Command
Frame ID: 0x01
Command: VR
Para(Hex):
Para(Text):

Rec:(21:25:54)7E 00 07 88 01 56 52 00 21 70 3D
Data Parsed: 7E 00 07 88 01 56 52 00 21 70 3D
AT Command Response
Frame ID: 1
Command: VR
Status: 0 = OK
Para: 21 70

ZigBee Operator will send a data frame to module. It starts with “7E” and “08” is the flag for AT command. The “0x56 0x52” are ASCII code for character “VR”. The command are not case sensitive. Both “VR” and “vr” works.

The module will send a “AT Command Response” data frame to ZigBee Operator. The last line “Para” is the command result. In this sample, it is “21 70”, means the firmware is 2170, the firmware for API Zigbee coordinator.

To run a command with a parameters, like “SN”command, which  sets the number of sleep periods to not assert the On/Sleep pin on wakeup if no RF data is waiting for the end device. The default value for this command is 1. Send “SN” command without any parameter like example above will return the value.

Here are the message in Log window.

Send:(21:39:51) 7E 00 04 08 01 53 4E 55

Data Parsed: 7E 00 04 08 01 53 4E 55
AT Command
Frame ID: 0x01
Command: SN
Para(Hex):
Para(Text):

Rec:(21:39:51)7E 00 07 88 01 53 4E 00 00 01 D4
Data Parsed: 7E 00 07 88 01 53 4E 00 00 01 D4
AT Command Response
Frame ID: 1
Command: SN
Status: 0 = OK
Para: 00 01 

The value of SN is 1.

To set a value for SN, input the value in Parameters field. The value are in hex. Input “20” in parameters will set the value to 20.

image

Here are the message in Log window.

Send:(21:46:06) 7E 00 05 08 01 53 4E 20 35

Data Parsed: 7E 00 05 08 01 53 4E 20 35
AT Command
Frame ID: 0x01
Command: SN
Para(Hex):20
Para(Text):

Rec:(21:46:06)7E 00 05 88 01 53 4E 00 D5
Data Parsed: 7E 00 05 88 01 53 4E 00 D5
AT Command Response
Frame ID: 1
Command: SN
Status: 0 = OK
Para:

It showed that command are run success.

Run “SN” command and leave parameters field blank will query the value of SN again.

Here are the message in Log window.

Send:(21:48:34) 7E 00 04 08 01 53 4E 55

Data Parsed: 7E 00 04 08 01 53 4E 55
AT Command
Frame ID: 0x01
Command: SN
Para(Hex):
Para(Text):

Rec:(21:48:34)7E 00 07 88 01 53 4E 00 00 20 B5
Data Parsed: 7E 00 07 88 01 53 4E 00 00 20 B5
AT Command Response
Frame ID: 1
Command: SN
Status: 0 = OK
Para: 00 20 

The value of SN is 20 now.

It is same for 802.15.4 devices, just switch to 802.15.4 profile and send command there.

image

This entry was posted in ZigBee & XBee and tagged , , , . Bookmark the permalink.