Sie sind auf Seite 1von 27

ZigBee Module AT Commands User Manual

Version 1.2.7

ZHEJIANG REXENSE TECHNOLOGY CO., LTD.

COPYRIGHT INFO The information contained in this document is the proprietary information of Zhejiang Rexense Technology Co., Ltd. (hereinafter referred as Rexense). The contents are confidential and any disclosure to persons other than the officers, employees, agents or subcontractors of the owner or licensee of this document, without the prior written consent of Rexense, is strictly prohibited. Further, no portion of this document may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, without the prior written consent of Rexense, the copyright holder. Rexense publishes this document without making any warranty as to the content contained herein. Further Rexense reserves the right to make modifications, additions and deletions to this document due to typographical errors, inaccurate information, or improvements to products mentioned in the document at any time and without notice. Such changes will, nevertheless be incorporated into new editions of this document VERSION HISTORY V1.0.0 V1.0.1 V1.2.0 V1.2.7 2010/06/18 2010/07/07 2011/06/01 2011/12/19 Preliminary Added AT+UARTRVS=XXUART reverse Added pictures Added AT+SETANT AT+CHOSENCOO AT+MTO

www.rexense.com

Table of Contents
Section1: AT Commands Overview .......................................................................................................... 4 Section 2: AT Commands Detailed Description ................................................................................... 6 2.1 USART Baud rate Configuration ...................................................................................... 6 2.2 PANID Configuration ........................................................................................................... 8 2.3 Communication Channel Configuration ....................................................................... 9 2.4 Antenna Selection Configuration ................................................................................. 10 2.5 Transmitting Power Configuration ............................................................................. 12 2.6 RF Transmitting Mode Configuration ........................................................................ 13 2.7 View Basic Configuration Information ...................................................................... 14 2.8 Reset ........................................................................................................................................ 15 2.9 View the Version Information ....................................................................................... 16 2.10 View MAC Address .......................................................................................................... 17 2.11 Token Restoration ........................................................................................................... 18 2.12 Time Configuration ......................................................................................................... 19 2.13 View Time Information ................................................................................................. 20 2.14 UART Time Gap Configuration ................................................................................... 21 2.15 Channel Availability Scan ............................................................................................. 22 2.16 Sleep Configuration ........................................................................................................ 23 2.17 Wake up Configuration ................................................................................................. 24 2.18 View COO MAC Address ................................................................................................ 25 2.19 Default COO MAC Address Configuration .............................................................. 26 2.20 Network Structure Refreshing ................................................................................... 27

www.rexense.com

Section1: AT Commands Overview


Generally speaking, ZigBee wireless module sends and receives commands or data through serial port. All the commands listed in table 1 will be identified as command and will be executed. All the other data will be wirelessly sent to the target address of the designated module without further processing. All RexBee ZigBee modules support the AT commands listed in table 1. The commands are used to configure the parameters of RexBee Zigbee modules. All RexBee AT commands begin with AT+ with all English words in block capitals. Meanwhile, all the parameters use ASCII code in HEX format without pressing enter. Any illegal command that does not comply with the format listed below will be treated as normal data and be sent out wirelessly. Each type of device supports different commands, as shown in the table below. Table 1: RexBee ZigBee Module AT Commands Summary

Command AT+SETUART=xx-x AT+SETPID=xxxxxxxx AT+SETCH=xx AT+SETANT=xx AT+SETPWR=xx AT+SETPWRMODE=xxxx AT+GEINFO AT+RESET

COO

HHU Router

ZED

Function Set USART Port Set PANID of ZigBee Network Set channel parameters, ranging from 0x0B 0x1A Set antenna selection, supported for REXENSE enhanced ZigBee module only Set the TX power Set the power modes Get basic information of the ZigBee module, such as PANID, channel, etc. Module firmware reset Get the firmware version (HHU and ZED should be awakened before the AT command is executed) Get the MAC address of the current node Module parameters reset to default value Set the time

AT+VER

AT+SHOWADDR AT+RTOKEN AT+TIME=xxxxxxxxxxxxx x

www.rexense.com

AT+SHOWTIME AT+UARTGAP=xx AT+UARTRVS=xx AT+SCAN AT+SLEEP AT+WAKEUP AT+CHOSENCOO AT+CHOSENCOO=xxxxxxx x AT+MTO

Get the time information Set time interval between two USART frames Set if the USART frames should be reversed Scan for available ZigBee network Set module enter sleep mode Wake the module up Get the default COO address of the ZigBee network Default COO MAC Address Configuration Network Structure Refresh

www.rexense.com

Section 2: AT Commands Detailed Description


2.1 USART Baud rate Configuration
Command: AT+SETUART=xx-P Function: USART and parity setting. xx-P: xx=baud rate, in HEX format (please see detailed description in table 2); P=parity (please see detailed description in table 3). The configuration will take effect immediately after the settings is saved. Default setting of RexBee ZigBee module: COO=1115200, 8, N, 1; HHU=115200, 8, N, 1; Router=9600, 8, N, 1; ZED=9600, 8, N, 1; Table 3: USART parity description P Parity

Please configure the correct parameters according to the above description before testing. Table 2: USART baud rate description xx USART Baud Rate

03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10

1200 2400 4800 9600 14400 19200 28800 38400 50000 57600 76800 100000 115200 230400

E O N

Even Odd No parity

www.rexense.com

www.rexense.com

2.2 PANID Configuration


Command: AT+SETPID=xxxxxxxx Function: Configure the PANID to distinguish different ZigBee network in the same area. xxxxxxxx: 4 bytes, in HEX format, high byte in front.

www.rexense.com

2.3 Communication Channel Configuration


Command: AT+SETCH=xx Function: Configure the communication channel. There are 16 channels (communication frequency) , value ranging from 0x0B 0x1A, corresponding to the frequency from 2405MHz 2480MHz respectively, 5MHz for each channel. xx: 1 byte, in HEX format.

www.rexense.com

2.4 Antenna Selection Configuration


Command: AT+SETANT=xx Function: Configure antenna selection. If xx=00, it stands for on-board PCB antenna; xx=01, it stands for external SMA antenna. xx: 1 byte, in HEX format. Description: This command works for enhanced ZigBee module only. The antenna selection of standard ZigBee module is controlled by hardware instead of AT command.

10

www.rexense.com

11

www.rexense.com

2.5 Transmitting Power Configuration


Command: AT+SETPWR=xx Function: Set the transmitting power, in dBm. Sample: AT+SETPWR=+07AT+SETPWR=-03 xx: 1 byte, in HEX format. If the an invalid parameter is configured, the system will return an error. Please set -03 for enhanced ZigBee module; +07 for standard ZigBee module.

12

www.rexense.com

2.6 RF Transmitting Mode Configuration


Command: AT+SETPWRMODE=xxxx Function: Set the power mode. xxxx: 2 bytes, in HEX format, high byte in front. The power mode is defined as below: Bit0=0 Normal TX mode =1 Boost mode. Boost mode, on one hand enhances the RF performance, on the other hand increases the power consumption. Bit1=0 Bi-directional transceiver mode, works for standard ZigBee module without PA. =1 Cross transceiver mode, works for enhanced Zigbee module with PA. Please set the correct parameters according to the ZigBee module type. Set 0000 for standard ZigBee module, 0002 for enhanced ZigBee module.

13

www.rexense.com

2.7 View Basic Configuration Information


Command: AT+GETINFO Function: View basic configuration information, such as PANID, communication channel, TX power, power mode, unique ID, UART, etc. Through this command, users are able to know if two modules can communicate with each other or can join the same network. The PANID and communication channel must be the same for different modules to join the same network.

14

www.rexense.com

2.8 Reset
Command: AT+RESET Function: After the command is executed, the module will commit reset in 6 seconds.

15

www.rexense.com

2.9 View the Version Information


Command: AT+VER Function: View the version information. With this command, users are able to know the version of each module. Please ensure the version is the same for different modules. Please go to www.rexense.com to download the latest firmware version.

16

www.rexense.com

2.10 View MAC Address


Command: AT+SHOWADDR Function: View the MAC address.

17

www.rexense.com

2.11 Token Restoration


Command: AT+RTOKEN Function: Restore factory settings of each parameter (token).

18

www.rexense.com

2.12 Time Configuration


Command: AT+TIME=xxxxxxxxxxxxxx Function: Set time defined by the user. xxxxxxxxxxxxxx: 7 bytes, in HEX format, which stands for Year, Month, Day, Hour, Minute, Second, Weekday, respectively. If this command is executed for COO, the time information will automatically broadcast to all the other nodes in the network.

19

www.rexense.com

2.13 View Time Information


Command: AT+SHOWTIME Function: View the current time information. Front 7 bytes stand for Year, Month, Day, Hour, Minute, Second, Weekday, respectively; the last for time status. Ox00= Uninitialized time; 0x01=Reserve; 0x02=Network time; 0x03=Local time

20

www.rexense.com

2.14 UART Time Gap Configuration


Command: AT+UARTGAP=xx Function: Set time gap between two USART frames, in ms. xx: 1byte, in HEX format.

21

www.rexense.com

2.15 Channel Availability Scan


Command: AT+SCAN=xxxx Function: Scan the availability of the designated communication channel. xxxxx: 2 bytes, in HEX format. Each bit stands for the channel to be scanned. ZigBee in 2.4GHz supports 16 channels in total, corresponding to 2405-2480MHz respectively, 5MHz for each channel. Bit0 stands for Channel 11, Bit1 stands for Channel 12, by parity of reasoning, Bit15 stands for Channel 26. Channels with bit as 1 (in binary) are these to be scanned.

22

www.rexense.com

2.16 Sleep Configuration


Command: AT+SLEEP Function: Set the module enter sleep mode. Description: This command works for ZED and HHU only. Please note ZED will automatically enter sleep mode with a sleeping period of 15 seconds, so users do not need to send this command to ZED purposefully.

23

www.rexense.com

2.17 Wake up Configuration


Command: AT+WAKEUP Function: Wake the module up from sleep mode. Description: Modules are awakened due to the change of RXD voltage level. Please refer to the STM32W chip datasheet (http://www.rexense.com/upload/downloads/Learning/Datasheet_STM32W108.pdf) to know the conditions that may cause the change of RXD voltage level. After the module is awakened, the module will return the slept time (in second), as shown below.

24

www.rexense.com

2.18 View COO MAC Address


Command: AT+CHOSENCOO Function: View COO MAC address. Description: All the devices except COO support this command. Before a node joins a ZigBee network, its default COO MAC address is 0x00000000 (4 byte high address omitted). After the node joins the ZigBee network, users can get the COO MAC address through this command. Note: the previous COO MAC address will stay with the node even if the node is excluded from the previous ZigBee network. The previous COO MAC address of the node will not be updated until it joins a new ZigBee network with a new COO.

25

www.rexense.com

2.19 Default COO MAC Address Configuration


Command: AT+CHOSENCOO=xxxxxxxx Function: Set the default COO MAC Address. Description: The command works for all device type except COO. Users are able to designate the default COO MAC address for the ZigBee node to be added in the ZigBee network with this command. The default COO MAC address will stay with the ZigBee node even if the node is power down. If the designated default COO no longer exists in the ZigBee network, meanwhile there exists another new COO in the same area, the default COO MAC address will be updated to that of the new COO.

26

www.rexense.com

2.20 Network Structure Refreshing


Command: AT+MTO Function: Refresh the network structure. Description: The command works for COO only. After the command is executed, COO will send a broadcast to refresh the network structure in 1 second. Data sending and receiving is not recommended in 3-5 seconds as the network will be very busy due to the broadcast sent by COO.

27

www.rexense.com

Das könnte Ihnen auch gefallen