STMICROELECTRONICS STM32L0 Ultra Low Power MCUs User Manual
- October 30, 2023
- STMicroelectronics
Table of Contents
STMICROELECTRONICS STM32L0 Ultra Low Power MCUs
Product Information
The RYLR993 module is a LoRa SOC core-based device that uses the AT command set developed by REYAX for controlling the module. The module supports LoRaWAN communication and provides features such as activation by personalization, over-the-air activation, and long-range radio technology. The module also supports the use of keys, IDs, and EUIs for management purposes. Additionally, the module can be used to join and send data on the LoRa network and perform radio tests.
Product Usage Instructions
To use the RYLR993 module, the user must send AT commands to the module using
a serial interface. The AT command set provided by REYAX consists of a series
of short text strings that can be used to perform various operations such as
joining the LoRa network, sending data to the network, and setting parameters.
The user can also manage keys, IDs, and EUIs using the module.
For example, to join the LoRa network, the user can send the following
command:
- AT+JOIN
- To check the link status, the user can send:
- AT+LINKC
- To send data to the LoRa network, the user can use the following command:
- AT+SEND
- The RYLR993 module also supports radio test commands. To perform a radio test, the user can use the following command:
- AT+RADIO=1
- For more detailed information on using the RYLR993 module, please refer to the product user manual.
General information
The document applies to the REYAX RYLR993 module that are LoRa SOC core-based devices.
Acronym | Definition |
---|---|
ABP | Activation by personalization |
ETSI | European telecommunications standards institute |
LoRa | Long range radio technology |
LoRaWAN | LoRa wide-area network |
OTAA | Over-the-air activation |
RF | Radio frequency |
RSSI | Received signal strength indicator |
SNR | Signal-to-noise ratio |
Overview
The following sections contain the interface description, the AT commands definition, and the description of some use cases and of the embedded software.
AT commands
The AT command set is a standard developed by REYAX to control module. The
command set consists of a series of short text strings for performing
operations such as joining, data exchange and parameters setting.
The AT commands are used to drive the LoRa module and to send data. The AT
commands are sent through the UART.
- Baud rate: 9600
- Data: 8 bits
- Parity: none
- Stop: 1 bit
- Flow control: none
All commands are of the form AT+XXX, with XXX denoting the command. The following command behaviors are available:
- AT+XXX? provides a short help of the given command (such as AT+DEUI?).
- AT+XXX is used to run a command (such as AT+JOIN).
- AT+XXX=? is used to get the value of a given command (such as AT+CFS=?).
- AT+XXX=
is used to provide a value to a command (such as AT+SEND=2:Hello).
Output of the commands is provided on the UART. The output format is typically :
Considering:
-
is returned when help AT+XXX? and get AT+XXX=? commands are run. -
and stands for the carriage return and line feed. - When no value is returned, then
is not returned at all. - Every command, except ATZ (MCU reset), returns a status string, that is preceded and followed by
. Possible status are: - OK: command run correctly without error.
- AT_ERROR: generic error
- AT_PARAM_ERROR: parameter of the command is wrong.
- AT_BUSY_ERROR: LoRa network is busy, so the command could not complete.
- AT_TEST_PARAM_OVERFLOW: parameter is too long.
- AT_NO_NETWORK_JOINED: LoRa network is not joined.
- AT_RX_ERROR: error detection during the reception of the command
More details on each command description and examples are given in the next sections. Each command preceded by # is provided by the host to the module, then the return of the module is printed.
AT_RX_ERROR
In case of AT_RX_ERROR, the command is corrupted when received in AT_Slave.
Hence the command is not run.
However, in case of long commands, some spurious characters can still be in
the queue, ready to be processed as a command. So, in case the user receives
an AT_RX_ERROR, the user must first send
Example
AT command overview
Command | Parameters | Description |
---|
General Commands
AT| None| Check if the interface is available.
AT| [?]| Help of all supported commands.
ATZ| None| Reset
AT+VL| [=verb_lvl], where verb_lvl = [0:3]| Sets/gets the verbose level.
AT+LTIME| [=?]| Gets the local time in UTC format.
Keys, IDs and EUIs management commands
AT+APPEUI| [=01:02:03:04:05:06:07:08]| Sets/gets the application EUI.
AT+NWKKEY| [=2B:7E:15:16:28:AE:D2:A6:AB:F 7:15:88:09:CF:4F:3C]| ****
Sets/gets the network root key
AT+APPKEY| [=2B:7E:15:16:28:AE:D2:A6:AB:F 7:15:88:09:CF:4F:3C]| ****
Sets/gets the application root key.
Command | Parameters | Description |
---|---|---|
AT+APPSKEY | [=2B:7E:15:16:28:AE:D2:A6:AB:F 7:15:88:09:CF:4F:3C] | **** |
Sets/gets the application session key.
AT+NWKSKEY| [=2B:7E:15:16:28:AE:D2:A6:AB:F 7:15:88:09:CF:4F:3C]| ****
Sets/gets the network session key.
AT+DADDR| [=01:02:0A:0B]| Sets/gets the device address.
AT+DEUI| [=01:23:45:67:89:AB:CD:EF]| Sets/gets the module unique ID.
AT+NWKID| [=127]| Sets/gets the network ID.
LoRa join and send data commands
AT+JOIN| [=mode] where mode = 0 (ABP) or
mode = 1 (OTAA)
| ****
Joins the network.
AT+LINKC| –| Piggyback link check MAC command request to the next uplink
AT+SEND| [=port_nb:confirmedmode:data]
where confirmedmode = 0 or 1.
| ****
Sends packets to the network.
LoRa network management commands
AT+VER| [=?]| Gets the LoRaWAN version.
AT+ADR| [=adr_enable] where
adr_enable = 0 or 1
| ****
Sets/gets the adaptive data rate functionality.
AT+DR| [=datarate] where datarate = [0:7]| Sets/gets the data rate.
AT+BAND| [=region] where region = [0:9]| Sets/gets the active region
AT+CLASS| [=class] where class = [A, B or C]| Sets/gets the LoRa class.
AT+DCS| [=dutycycle] where dutycycle = 0 or 1| Sets/gets duty cycle settings.
AT+JN1DL| ****
[=delay] where delay in ms| Sets/gets the join delay on Rx window 1.
AT+JN2DL| Sets/gets the join delay on Rx window 2.
AT+RX1DL| Sets/gets the delay of the Rx window 1.
AT+RX2DL| Sets/gets the delay of the Rx window 2.
AT+RX2DR| [=datarate] where X = [0:7]| Sets/gets data rate of the Rx window 2.
AT+RX2FQ| [=freq] where freq in Hz| Sets/gets the frequency of the Rx window
2.
AT+TXP| [=txpow] where txpow = [0:7]| Sets/gets the transmit power.
AT+PGSLOT| [=periodicity]| Sets/gets the ping slot.
Radio tests commands
AT+TTONE| ****
None
| Sets the RF tone test.
AT+TRSSI| Sets the RF RSSI tone test.
AT+TCONF
| [=freq:pow:bw:sf:cr:lna:pa
:mod:paylen:freqdev
:lowdropt:BT] [=868000000:14:125:12:4/5:0:0:
1:255:0:0:0 for example
| ****
Sets/gets the config LoRa RF test.
AT+TTX| [=nb_packets_sent]| Sets the number of packets to be sent for PER RF
Tx test.
AT+TRX| [=nb_packets_received]| Sets the number of packets to be received for
PER RF Rx test.
Command| Parameters| Description
---|---|---
AT+CERTIF| [=mode] where mode = 0 (ABP) or
mode = 1 (OTAA)
| ****
Sets the module in LoRaWAN certification with join mode.
AT+TTH| [=
| Starts RF Tx hopping test from Fstart to Fstop (in Hz or MHz), Fdelta in Hz
AT+TOFF| None| Stops RF tests.
Information command
AT+BAT| None| Gets the battery level.
Event table
The table below details the events that the AT_Slave application sends as a
notification to the host module.
Event | Return value | Description |
---|---|---|
+EVT:JOINED | None | Notifies an host module has been join on the gateway by |
OTAA.
+EVT:JOIN FAILED
| ****
None
| Notifies the host module has not completed the join transaction (ID/Keys
error, Tx not received by the gateway, Rx not received or not decrypted). In
this case, the AT+JOIN must be recalled.
+EVT:| :
+EVT:| RX_
+EVT:
| ****
RX_
:
| Notifies the host module that an asynchronous frame has been received on a
RX window with extended downlink parameters. This event replaces the previous
event when at least one link check request (AT+LINKC) has been executed.
+EVT:SEND_CONFIRMED| None| Notifies the host module that a Tx frame has been
acknowledge by the gateway.
General commands
AT
Description | Attention is used to check if the link is working properly. |
---|---|
Syntax | AT |
Arguments | None |
Response | None |
Result code |
Example:
AT?
Description | Provides the short help of all supported commands. |
---|---|
Syntax | AT? |
Arguments | None |
Response | None |
Result code |
Example:
ATZ – MCU reset
Description| The command generates a NVIC reset: resets the whole system
including radio and microprocessor.
---|---
Syntax| ATZ
Arguments| None
Response| None
Result code| None (NVIC_Reset action)
Example:
The displayed keys by command above after ###### (DevEUI, AppEui, and DevAddr) are just informative and not a command response.
AT+VL – Verbose level
Description | Sets/gets the verbose level of the application. |
---|
Syntax
| AT+VL=
AT+VL=?
Arguments
|
1: VLEVEL_L
2: VLEVEL_M
3: VLEVEL_H
Response|
Result code
|
Examples:
AT+LTIME – Local time in UTC format
Description | Gets the local time in UTC format. |
---|---|
Syntax | AT+LTIME=? |
Arguments | None |
Response | |
Result code |
Example:
AT+OPMODE – Set operating mode
Description | Select LoRaWAN mode or REYAX RYLR998 proprietary mode |
---|---|
Syntax | AT+OPMODE= |
AT+OPMODE=?
Arguments|
1: REYAX RYLR998 proprietary mode
*RYLR993 can’t set up the NETWORKID, only accept the default NETWORKID=18 of the RYLR998. When entry this mode please refer to the AT command of RYLR998.
Response|
Result code|
Example:
Keys, IDs and EUIs management
AT+APPEUI – Application identifier
Description | Sets/gets the application EUI. |
---|
Syntax
| AT+APPEUI=
AT+APPEUI=?
Arguments|
Response|
Result code
|
Examples:
AT+NWKKEY – Network root key
Description| Sets/gets the network root key. This key is used only in OTAA
mode.
---|---
Syntax
| AT+NWKKEY=
AT+NWKKEY=?
Arguments|
Response|
Result code
|
Examples:
AT+APPKEY – Application root key
Description| Sets/gets the application root key. This key is used only in OTAA
mode.
---|---
Syntax
| AT+APPKEY=
AT+APPKEY=?
Arguments|
Response|
Result code
|
Examples:
AT+APPSKEY – Application session key
Description
| Sets/gets the application session key. This key is used only in OTAA and APB
modes. In OTAA mode, this key is replaced during the derivation process with
the application root key and JoinAccept response information.
---|---
Syntax
| AT+APPSKEY=
AT+APPSKEY=?
Arguments|
Response|
Result code
|
Example:
AT+NWKSKEY – Network session key
Description
| Sets/gets the network session key. This key is used in OTAA and ABP modes.
In OTAA mode, this key is replaced during the derivation process with the
network’s root key and JoinAccept response information.
---|---
Syntax
| AT+NWKSKEY=
AT+NWKSEY=?
Arguments|
Response|
Result code
|
Example:
AT+DADDR – Device address
Description | Sets/gets the device address. |
---|
Syntax
| AT+DADDR=
AT+DADDR=?
Arguments|
, 4-byte value separated by ”:” (hexadecimal format string)Response|
Result code
|
Examples:
AT+DEUI – Device EUI
Description | Sets/gets the device EUI. |
---|
Syntax
| AT+DEUI=
AT+DEUI=?
Arguments|
Response|
Result code
|
Examples:
AT+NWKID – Network ID
Description | Sets/gets the network ID. |
---|
Syntax
| AT+NWKID=
AT+NWKID=?
Arguments|
Response|
Result code
|
Examples:
Join and send data on LoRa network
Description | Join the LoRa network. |
---|---|
Syntax | AT+JOIN= |
Arguments
|
0: join to a network by ABP 1: join to a network by OTAA
Response| +EVT:JOINED or +EVT:JOIN_FAILED
Result code
|
AT+JOIN – Join LoRa network
Examples:
AT+LINKC – Link check request
Description| Piggyback link check MAC command request to the next uplink. The DemodMargin and
NbGateways output information is provided into the extended Rx events +EVT:RX.
---|---
Syntax| AT+LINKC
Arguments| None
Response| None
Result code
|
Examples:
AT+SEND – Send data to LoRa network
Description| Sends application packets with specified and AppPort and payload
to LoRaWAN network.
---|---
Syntax| AT+SEND=
Arguments
| •
•
– 0: unconfirmed message
– 1: confirmed message
•
Response| +EVT:SEND_CONFIRMED
Result code
|
Examples:
LoRa network management
AT+VER – Firmware version
Description | Gets the version of the AT_Slave firmware. |
---|
Syntax
| APP_VERSION: Vx.y.z
MW_LORAWAN_VERSION: Va.b.c
Arguments| None
Response|
Result code|
Example:
AT+ADR – Adaptive data rate functionality
Description | Sets/gets the adaptive data rate functionality. |
---|
Syntax
| AT+ADR=
AT+ADR=?
Arguments
|
• 0: ADR disabled
• 1: ADR enabled (default)
Response|
Result code
|
Examples:
AT+DR – Data rate
Description | Sets/gets the Tx data rate. |
---|
Syntax
| AT+DR=
AT+DR=?
Arguments| in the range [0,1,2,3,4,5,6,7]
Response|
Result code
|
Note : To be able to set data rate, the ADR must be disabled.
Examples:
AT+BAND – Active region
Description | Sets/gets the active region. |
---|
Syntax
| AT+BAND=
AT+BAND=?
Arguments
|
0: AS923 (RYLR993)
1: AU915 (RYLR993_AK)
5: EU868
6: KR920 (RYLR993_AK)
7: IN865 (RYLR993)
8: US915
9: RU864 (RYLR993_AK)
Response|
Result code
|
Examples:
AT+CLASS – LoRa class
Description | Sets/gets the LoRa class. |
---|
Syntax
| AT+CLASS=
AT+CLASS=?
Arguments|
Response|
Result code
|
Examples:
AT+DCS – Duty cycle settings
Description | Sets/gets the duty cycle settings. |
---|
Syntax
| AT+DCS=
AT+DCS=?
Arguments
|
0: duty cycle disabled 1: duty cycle enabled
Response|
Result code
|
Examples:
AT+JN1DL – Join delay on Rx window 1
Description| Sets/gets the join accept delay between the end of the Tx and the
join Rx window 1 (in ms).
---|---
Syntax
| AT+JN1DL=
AT+JN1DL=?
Arguments|
Response|
Result code
|
Examples:
AT+JN2DL – Join delay on Rx window 2
Description| Sets/gets the join accept delay between the end of the Tx and the
join Rx window 2 (in ms).
---|---
Syntax
| AT+JN2DL=
AT+JN2DL=?
Arguments|
Response|
Result code
|
Examples:
AT+RX1DL – Delay of the Rx window 1
Description| Sets/gets the delay between the end of the Tx and the Rx window 1
(in ms).
---|---
Syntax
| AT+RX1DL=
AT+RX1DL=?
Arguments|
Response|
Result code
|
Examples:
AT+RX2DL – Delay of the Rx window 2
Description| Sets/gets the delay between the end of the Tx and the Rx window 2
(in ms).
---|---
Syntax
| AT+RX2DL=
AT+RX2DL=?
Arguments|
Response|
Result code
|
Examples:
AT+RX2DR – Data rate of the Rx window 2
Description | Sets/gets the Rx window 2 data rate (0-7 corresponding to DR_X). |
---|
Syntax
| AT+RX2DR=
AT+RX2DR=?
Arguments|
Response|
Result code
|
Examples:
AT+RX2FQ – Frequency of the Rx window 2
Description | Sets/gets the Rx window 2 frequency. |
---|
Syntax
| AT+RX2FQ=
AT+RX2FQ=?
Arguments|
Response|
Result code
|
Examples:
AT+TXP – Transmit power
Description | Sets/gets the transmit power. |
---|
Syntax
| AT+TXP=
AT+TXP=?
Arguments|
Response|
Result code
|
Examples:
AT+PGSLOT – Ping slot
Description | Sets/gets the unicast ping slot periodicity. |
---|
Syntax
| AT+PGSLOT=
AT+PGSLOT=?
Arguments
|
Ping slot periodicity is 2< periodicity >, in seconds.
Response|
Result code
|
Example
Radio test commands
AT+TTONE – RF tone test
Description | Starts a RF tone test. |
---|---|
Syntax | AT+TTONE |
Arguments | None |
Response | None |
Result code
|
Example:
AT+TRSSI – RF RSSI tone test
Description | Starts a RF RSSI tone test. |
---|---|
Syntax | AT+TRSSI |
Arguments | None |
Response |
Result code
|
Example
AT+TCONF – LoRa RF test configuration
Description | Sets/gets the LoRa RF test configuration. |
---|
Syntax
| AT+TCONF=
AT+TCONF=?
Arguments
| •
---|---
•
•
– LoRa (in kHz)
◦ 0: 7.8125
◦ 1: 15.625
◦ 2: 31.25
◦ 3: 62.5
◦ 4: 125
◦ 5: 250
◦ 6: 500
–| FSK: 4800 to 467000 Hz
•
– LoRa: SF5 to SF12 bit/s
–| FSK: 600 to 300000 bit/s
•
–| 1: 4/5
–| 2: 4/6
–| 3: 4/7
–| 4: 4/8
•
– 0: Off
–| 1: On
•
– 0: Off
–| 1: On
•
–| [0: FSK
– 1: LoRa
– 2: BPSK(Tx)
•
•
•
– 0: Off
–| 1: On
– 2: Auto (1 when SF11 or SF12, 0 otherwise)
•
– 0: no Gaussian filter applied
–| 1: BT = 0,3
–| 2: BT = 0,5
–| 3: BT = 0,7
–| 4: BT = 1
Response
| • Freq=
• Power=
• Bandwidth=
• SF=
• CR=
• LNA State=
• PA Boost State=
• Modulation
• Payload len=
•
• LowDRopt[0 to 2]=
•
---|---
Result code
|
Note :
Examples:
AT+TTX – Packets to be sent for PER RF TX test
Description | Starts a PER RF TX test with the number of packets to be sent. |
---|---|
Syntax | AT+TTX= |
Arguments | |
Response | None |
Result code
|
Example:
AT+TRX – Packets to be received for PER RF RX test
Description| Starts a PER RF RX test with the number of packets to be
received.
---|---
Syntax| AT+TRX=
Arguments|
Response| None
Result code
|
Example:
AT+TTH – RF Tx hopping test
Description| Starts RF Tx hopping test from Fstart to Fstop, with Fdelta
steps.
---|---
Syntax| AT+TTH=
Arguments
| •
•
•
•
Response| None
Result code
|
Example:
AT+CERTIF – Module in LoRaWAN certification with join mode
Description| Starts the module in LoRaWAN certification and with the choice of
join mode.
---|---
Syntax| AT+CERTIF=
Arguments
|
0: join to a network by ABP 1: join to a network by OTAA
Response
| +EVT:JOINED
+EVT:JOIN_FAILED
Result code
|
Examples:
AT+TOFF – RF test
Description | Stops the RF test. |
---|---|
Syntax | AT+TOFF |
Arguments | None |
Response | None |
Result code |
Example:
Information
AT+BAT – Battery level
Description | Gets the battery level (in mV). |
---|---|
Syntax | AT+BAT=? |
Arguments | None |
Response | |
Result code |
Example:
AT+TEMP – Temperature
Description | Gets the temperature of module (in Celsius degree °C). |
---|---|
Syntax | AT+TEMP=? |
Arguments | None |
Response | |
Result code |
Example:
Examples
Here are some basic examples that describe how to use the AT commands. In the following sections, commands provided by the host are preceded by #, and comments are embraced with / /.
Join and send in unconfirmed mode
Join and send in the confirmed mode
Rx received data
It is possible to retrieve data sent from a specified port, when +EVT:RX is
received.
Class B enables request
The example below shows how to do a Class B request through an AT command
sequence.
E-mail : sales@reyax.com
Website : http://reyax.com
Copyright © 2022, REYAX TECHNOLOGY CO., LTD
References
- REYAX: IoT Solution Provider|Modules, Wireless Solution & IoT Connectivity
- REYAX: IoT Solution Provider|Modules, Wireless Solution & IoT Connectivity
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>