14-NOV-2022 56312E32
RYUW122 AT COMMAND GUIDE
THE NOTIFICATION OF USING AT COMMAND
- The RYUW122 can set as role of “ANCHOR” or “TAG”. The distance value will be output through ANCHOR, and the data transmission can be bidirectional.
- First you must use the AT+MODE command to set the module as ANCHOR or TAG.
- Use “AT+NETWORKID” to set the UWB network group. Only those that set with the same NETWORK ID can communicate with each other.
- Use “AT+ADDRESS”to set a unique Address.
- Use “AT+CPIN”to set the UWB network encryption password. Only those that set with the same encryption password can be decoded correctly.
- If you want to transmit data to ANCHOR from TAG, You must use AT+TAG_SEND command.
- If you want to transmit data to TAG from ANCHOR and obtain the distance, You must use AT+ANCHOR_SEND command.
- When TAG is set to the parameter of “AT+TAGD” for power-saving purpose, the “AT+TAG_SEND” and “AT+ANCHOR_SEND” command under the ANCHOR must match the RF duty cycle of TAG.
NETWORK STRUCTURE
AT Command Set
It is required to key in “enter” or “\r\n” in the end of all AT Commands.
Add“ ? ”in the end of the commands to ask the current setting value.
It is required to wait until the module replies +OK so that you can execute the next AT command.
- AT Test if the module can respond to Commands.
Syntax Response AT +OK - Software RESET
Syntax Response AT+RESET +RESET
+READY - AT+MODE Set the wireless work mode.
Syntax Response AT+MODE=<Parameter>
<Parameter>range 0 to 1 0 : TAG mode (Default). 1 : ANCHOR mode
2 : Sleep mode
Example : Set to the ANCHOR mode. AT+MODE=1
*The settings will be memorized in flash.+OK AT+MODE +MODE=1 - AT+IPR Set the UART baud rate.
Syntax Response AT+IPR=<rate>
<rate> is the UART baud rate: 9600
57600
115200(Default)
Example: Set the baud rate as 57600, AT+IPR=57600
*The settings will be memorized in flash.+OK AT+IPR? +IPR=57600 - AT+ CHANNEL Set RF Channel. –
Syntax Response AT+CHANNEL=<Channel>,< Reserved 1>
<Channel> is the RF band. 5 : 6489.6MHz(default)
9: 7987.2 MHz
Example: Set the RF Channel as 7987.2 MHz AT+ CHANNEL =9,0
*The settings will be memorized in flash.+OK AT+ CHANNEL? +CHANNEL=9,0 - AT+BANDWIDTH Set the RF Bandwidth
Syntax Response AT+ BANDWIDTH=<Bandwidth>
<Bandwidth>0~1, list as below: 0: 850 KHz (default)
1: 6.8M
Example: Set the RF bandwidth as 6.8MHz AT+BANDWIDTH=1
*The settings will be memorized in flash.+OK AT+ BANDWIDTH ? + BANDWIDTH=1 - AT+NETWORKID Set the network ID.
Syntax Response AT+NETWORKID=<NETWORK ID>
<NETWORK ID>= 8 BYTES ASCII (default 00000000)
Example: Set the network ID as REYAX123 AT+NETWORKID=REYAX123
*The settings will be memorized in Flash.+OK AT+NETWORKID? +NETWORKID=REYAX123 - AT+ADDRESS Set the ADDRESS ID of module.
Syntax Response AT+ADDRESS=<Address>
<Address>= 8 BYTES ASCII (default 00000000)
Example: Set the address of module as DAVID123. AT+ADDRESS=DAVID123
*The settings will be memorized in Flash.+OK AT+ADDRESS? +ADDRESS=DAVID123 - AT+UID? 96bit Unique ID of module.
Syntax Response AT+UID? +UID=E04737 - AT+CPIN Set the AES128 password of the network.
Syntax Response AT+CPIN=<Password> <Password>: A 32 characters long AES password From
00000000000000000000000000000000 to FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
(default 00000000000000000000000000000000)
Only by same password can the data be recognized. After resetting, the previously password will disappear.
Example: Set the password as below, FABC0002EEDCAA90FABC0002EEDCAA90 AT+CPIN=FABC0002EEDCAA90FABC0002EEDCAA90
*The settings will be memorized in Flash.+OK AT+CPIN? (default)
AT+CPIN? (After setting the password)+CPIN=No Password!
+CPIN=FABC0002EEDCAA90FABC 0002EEDCAA90 - AT+TAGD Set the parameters of TAG RF duty cycle
Syntax Response AT+TAGD=< Time of RF enable >,< Time of RF disable >
< Time of RF enable > From 10 to 28000ms, The minimum interval is 10ms.
< Time of RF disable > From 10 to 28000ms, The minimum interval is 10ms.
(Default AT+TAGD=0,0 RF always enable)
*During the< Time of RF enable >, the pin8(PA7) will output Hi,At this time, the <data> can transmit to the RYUW122 module by AT+ANCHOR_SEND command.
During the< Time of RF Disable >, the pin8(PA7) will output Low.
Example: Set TAG RF duty cycle as 1sec enable then 1 sec disable.
AT+TAGD=1000,1000+OK AT+TAGD? +TAGD=1000,1000 - AT+ANCHOR_SEND Send data to the appointed address
Syntax Response AT+SEND=<TAG Address>,<Payload Length>,<Data>
<TAG Address>8 BYTES ASCII
<Payload Length> Maximum 12bytes
<Data>ASCII Format
Example : Send TEST string to the TAG Address DAVID123. AT+ANCHOR_SEND=DAVID123,4,TEST+OK - AT+TAG_SEND Send data to the module and wait for the anchor to read it.
Syntax Response AT+SEND=<Payload Length>,<Data>
<Payload Length> Maximum 12bytes
<Data>ASCII Format
Example : Send HELLO string to the module. AT+TAG_SEND=5,HELLO+OK - +ANCHOR_RCV Show the received data of ANCHOR actively.
Response +ANCHOR_RCV=<TAG Address>,< PAYLOAD LENGTH>,<TAG DATA>,<DISTANCE> < TAG Address > 8 BYTES ASCII TAG Address
< PAYLOAD LENGTH > From 0 to 12
<TAG DATA> ASCll Format Data
< DISTANCE > The distance between ANCHOR and TAG in cm,The minimum output value is 0cm.
Example: ANCHOR received the Address DAVID123 send 5 bytes data, Content is HELLO string, Distance is 40cm, It will show as below. +ANCHOR_RCV= DAVID123,5,HELLO,40 cm
- +TAG_RCV Show the received data of TAG actively.
Response +TAG_RCV=< PAYLOAD LENGTH>,<DATA>
< PAYLOAD LENGTH > From 0 to 12
<DATA> ASCll Format DataExample: TAG received the Address ARIEL456 send 4 bytes data, Content is TEST string, It will show as below.
+TAG_RCV=4,TEST - AT+CAL Distance Calibration
Syntax Response AT+CAL=<DISTANCE CALIBRATION>
<DISTANCE CALIBRATION> From -100 to +100 (unit: cm)
+0(Default)
Example: Decrease the current output distance by 11cm AT+CAL=-11
*The settings will be memorized in flash.+OK AT+CAL? +CAL=-11 - AT+VER? To inquire the firmware version.
Syntax Response AT+VER? +VER=RYUW122_V1.0 - Other messages
Narrative Response After RESET +RESET +READY
- Error result codes
Narrative Response There is not “enter” or 0x0D 0x0A in the end of the AT Command.
+ERR=1 The head of AT command is not “AT” string. +ERR=2 Parameter failure. +ERR=3 Command failure. +ERR=3 Unknow command. +ERR=5
Basic Command Example
ANCHOR | TAG | |
Command/ Response |
AT+MODE=1 +OK |
AT+MODE=0 +OK |
Command/ Response |
AT+NETWORKID=REYAX123 +OK |
AT+NETWORKID=REYAX123 +OK |
Command/ Response |
AT+ADDRESS=REYAX003 +OK |
AT+ADDRESS=DAVID123 +OK |
Command/ Response |
AT+CPIN=FABC0002EEDCAA90FABC0002EEDCAA90 +OK |
AT+CPIN=FABC0002EEDCAA90FABC0002EEDCAA90 +OK |
Command/ Response |
AT+TAG_SEND=5,HELLO |
|
Command/ Response |
AT+ANCHOR_SEND=DAVID123,4,TEST +ANCHOR_RCV= DAVID123,5,HELLO,40 cm |
+TAG_RCV=5,HELLO |
E-mail: sales@reyax.com
Website: http://reyax.com
Copyright © 2022, REYAX TECHNOLOGY CO., LTD.
Documents / Resources
![]() |
REYAX RYUW122 Command [pdf] Instructions RYUW122, RYUW122 Command, Command |