Skip to content

Latest commit

 

History

History
653 lines (509 loc) · 19.8 KB

AT-Commands.md

File metadata and controls

653 lines (509 loc) · 19.8 KB

AT-Commands

To make it easy to setup the LoRaWAN® credentials, an AT command interface over USB is implemented. It includes the basic commands required to define the node.

Credits:
Taylor Lee (taylor.lee@rakwireless.com)

REMARK 1 After changing LoRaWAN® parameters the device must be reset by either the ATZ command or pushing the reset button.

REMARK 2 The Serial port connection is lost after the ATZ command or pushing the reset button. The connection must be re-established on the connected computer before log output can be seen or AT commands can be entered again.

REMARK 3 The Serial port is setup for 115200 baud, 8N1. It cannot be changed by AT commands.

REMARK 3 With the usage of WisBlock-API-V2, the AT command interface is compatible with the RAKWireless RUI3 AT commands ↗️. Not all RUI3 AT commands are supported. A list of available AT commands can be retrieved with AT? from the device

Content

Three custom AT commands have been added to the default RUI3 AT command set:


ATC+SENDINT

Description: Set the automatic transmission interval

This command allows to set the interval in seconds between automatic packet transmissions. If set to 0, automatic packet transmission is disabled.

Command Input Parameter Return Value Return Code
ATC+SENDINT? - ATC+SENDINT: "Get or Set the automatic send interval OK
ATC+SENDINT=? - <interval in seconds> OK
ATC+SENDINT=<Input Parameter> <interval in seconds> - OK or AT_PARAM_ERROR

Examples:

ATC+SENDINT?

ATC+SENDINT: Get or Set the automatic send interval 
OK

ATC+SENDINT=?

ATC+SENDINT:60
OK

ATC+SENDINT=60

OK

Back


ATC+STATUS

Description: Show device status

This command allows the user to get the current device status.

Command Input Parameter Return Value Return Code
ATC+STATUS? - ATC+STATUS: Show LoRaWAN status OK
ATC+STATUS=? - < status > OK

Examples:

ATC+STATUS?

ATC+STATUS: Show LoRaWAN status
OK

// When in LoRaWAN mode:

ATC+STATUS=?
Device status:
   RAK4631
   Mode LPWAN
   Auto join enabled
   Network joined
LPWAN status:
   Dev EUI AC1F09FFFE09016C
   App EUI 70B3D57ED00201E1
   App Key 2B84E0B09B68E5CB42176FE753DCEE79
   Dev Addr 26021FB4
   NWS Key 323D155A000DF335307A16DA0C9DF53F
   Apps Key 3F6A66459D5EDCA63CBC4619CD61A11E
   OTAA enabled
   ADR disabled
   Public Network
   Dutycycle disabled
   Join trials 5
   TX Power 0
   DR 3
   Class 0
   Subband 1
   Fport 2
   Unconfirmed Message
   Region AS923-3
   Send Frequency 300

// When in LoRa P2P mode:

ATC+STATUS=?
Device status:
   RAK4631
   Mode P2P
   P2P frequency 916000000
   P2P TX Power 22
   P2P BW 125
   P2P SF 7
   P2P CR 0
   P2P Preamble length 8
   P2P Symbol Timeout 0
   Send Frequency 300

Back


ATC+PORT

Description: Port settings

This command allows the user to access and configure port settings.

Command Input Parameter Return Value Return Code
ATC+PORT? - AT+PORT=<Port><CR>. Get or Set the Port OK
ATC+PORT=? - 1-223 OK
ATC+PORT=<Input Parameter> 1-223 - OK or AT_PARAM_ERROR

Examples:

ATC+PORT?

ATC+PORT: Get or Set the Port=[1..223]
OK

ATC+PORT=?

ATC+PORT:2
OK

ATC+PORT=2

OK

Back


Appendix

Appendix I Data Rate by Region

EU433/EU868/RU864/AS923

Data Rate Configuration Indicative Physical Bit Rate [bit/s]
0 LoRa: SF12 / 125 kHz 250
1 LoRa: SF11 / 125 kHz 440
2 LoRa: SF10 / 125 kHz 980
3 LoRa: SF9 / 125 kHz 1760
4 LoRa: SF8 / 125 kHz 3125
5 LoRa: SF7 / 125 kHz 5470
6 LoRa: SF7 / 250 kHz 11000
7 FSK: 50 kbps 50000
8 ~ 15 RFU

CN470/KR920

Data Rate Configuration Indicative Physical Bit Rate [bit/s]
0 LoRa: SF12 / 125 kHz 250
1 LoRa: SF11 / 125 kHz 440
2 LoRa: SF10 / 125 kHz 980
3 LoRa: SF9 / 125 kHz 1760
4 LoRa: SF8 / 125 kHz 3125
5 LoRa: SF7 / 125 kHz 5470
6 ~ 15 RFU

US915

Data Rate Configuration Indicative Physical Bit Rate [bit/s]
0 LoRa: SF10 / 125 kHz 980
1 LoRa: SF9 / 125 kHz 1760
2 LoRa: SF8 / 125 kHz 3125
3 LoRa: SF7 / 125 kHz 5470
4 LoRa: SF8 / 500 kHz 12500
5 ~ 7 RFU
8 LoRa: SF12 / 500 kHz 980
9 LoRa: SF11 / 500 kHz 1760
10 LoRa: SF10 / 500 kHz 3900
11 LoRa: SF9 / 500 kHz 7000
12 LoRa: SF8 / 500 kHz 12500
13 LoRa: SF7 / 500 kHz 21900
14 ~ 15 RFU

AU915

Data Rate Configuration Indicative Physical Bit Rate [bit/s]
0 LoRa: SF12 / 125 kHz 250
1 LoRa: SF11 / 125 kHz 440
2 LoRa: SF10 / 125 kHz 980
3 LoRa: SF9 / 125 kHz 1760
4 LoRa: SF8 / 125 kHz 3125
5 LoRa: SF7 / 125 kHz 5470
6 LoRa: SF8 / 500 kHz 12500
7 RFU RFU
8 LoRa: SF12 / 500 kHz 980
9 LoRa: SF11 / 500 kHz 1760
10 LoRa: SF10 / 500 kHz 3900
11 LoRa: SF9 / 500 kHz 7000
12 LoRa: SF8 / 500 kHz 12500

IN865

Data Rate Configuration Indicative Physical Bit Rate [bit/s]
0 LoRa: SF12 / 125 kHz 250
1 LoRa: SF11 / 125 kHz 440
2 LoRa: SF10 / 125 kHz 980
3 LoRa: SF9 / 125 kHz 1760
4 LoRa: SF8 / 125 kHz 3125
5 LoRa: SF7 / 125 kHz 5470
6 RFU RFU
7 FSK: 50 kbps 50000
8 ~ 15 RFU RFU

Back


Appendix II TX Power by Region

EU868

By default, MaxEIRP is considered to be +16 dBm.

TXPower Configuration (EIRP)
0 MaxEIRP
1 MaxEIRP - 2 dB
2 MaxEIRP - 4 dB
3 MaxEIRP - 6 dB
4 MaxEIRP - 8 dB
5 MaxEIRP - 10 dB
6 MaxEIRP - 12 dB
7 MaxEIRP - 14 dB
8 ~ 15 RFU

US915

TXPower Configuration (Conducted Power)
0 30 dBm - 2*TXpower
1 28 dBm
2 26 dBm
3 ~ 9 -
10 10 dBm
11 ~ 15 RFU

AU915

By default, MaxEIRP is considered to be +30 dBm.

TXPower Configuration (EIRP)
0 MaxEIRP
1 ~ 10 MaxEIRP - 2*TXPower
11 ~ 10 RFU

KR920

By default, MaxEIRP is considered to be +14 dBm.

TXPower Configuration (EIRP)
0 MaxEIRP
1 MaxEIRP - 2 dB
2 MaxEIRP - 4 dB
3 MaxEIRP - 6 dB
4 MaxEIRP - 8 dB
5 MaxEIRP - 10 dB
6 MaxEIRP - 12 dB
7 MaxEIRP - 14 dB
8 ~ 15 RFU

AS923

By default, Max EIRP isconsidered to be 16 dBm.

TXPower Configuration (EIRP)
0 MaxEIRP
1 MaxEIRP - 2 dB
2 MaxEIRP - 4 dB
3 MaxEIRP - 6 dB
4 MaxEIRP - 8 dB
5 MaxEIRP - 10 dB
6 MaxEIRP - 12 dB
7 MaxEIRP - 14 dB
8 ~ 15 RFU

IN865

By default, MaxEIRP is considered to be 30 dBm.

TXPower Configuration (EIRP)
0 MaxEIRP
1 MaxEIRP - 2 dB
2 MaxEIRP - 4 dB
3 MaxEIRP - 6 dB
4 MaxEIRP - 8 dB
5 MaxEIRP - 10 dB
6 MaxEIRP - 12 dB
7 MaxEIRP - 14 dB
8 MaxEIRP - 16 dB
9 MaxEIRP - 18 dB
10 MaxEIRP - 20 dB
11 ~ 15 RFU

RU864

By default, MaxEIRP is considered to be +16 dBm.

TXPower Configuration (EIRP)
0 MaxEIRP
1 MaxEIRP - 2 dB
2 MaxEIRP - 4 dB
3 MaxEIRP - 6 dB
4 MaxEIRP - 8 dB
5 MaxEIRP - 10 dB
6 MaxEIRP - 12 dB
7 MaxEIRP - 14 dB
8 ~ 15 RFU

CN470

By default, MaxEIRP is considered to be +19.15 dBm.

TXPower Configuration (EIRP)
0 MaxEIRP
1 MaxEIRP 2 dB
2 MaxEIRP 4 dB
3 MaxEIRP 6 dB
4 MaxEIRP 8 dB
5 MaxEIRP - 10 dB
6 MaxEIRP - 12 dB
7 MaxEIRP - 14 dB
8 ~ 15 RFU

EU433

By default, MAxEIRP is considered to be +12.15 dBm.

TXPower Configuration (EIRP)
0 MaxEIRP
1 MaxEIRP - 2 dB
2 MaxEIRP - 4 dB
3 MaxEIRP - 6 dB
4 MaxEIRP - 8 dB
5 MaxEIRP - 10 dB
6 ~ 15 RFU

Back


Appendix III Maximum Transmission Load by Region

M in the following list is the length with MAC header, N is the maximum usable payload size for the user data without MAC header.

EU868

Data Rate M N
0 59 51
1 59 51
2 59 51
3 123 115
4 250 242
5 250 242
6 250 242
7 250 242
8 ~ 15 Not Defined Not Defined

US915

Data Rate M N
0 19 11
1 61 53
2 133 125
3 250 242
4 250 242
5 ~ 7 Not Defined Not Defined
8 61 53
9 137 129
10 250 242
11 250 242
12 250 242
13 250 242
14 ~ 15 Not Defined Not Defined

AU915

Data Rate M N
0 59 51
1 59 51
2 59 51
3 123 115
4 250 242
5 250 242
6 250 242
7 Not Defined Not Defined
8 61 53
9 137 129
10 250 242
11 250 242
12 250 242
13 250 242
14 ~ 15 Not Defined Not Defined

KR920

Data Rate M N
0 59 51
1 59 51
2 59 51
3 123 115
4 250 242
5 250 242
6 ~ 15 Not Defined Not Defined

AS923

Data Rate Uplink MAC Payload Size (M) Downlink MAC Payload Size (M)
UplinkDwellTime = 0 UplinkDwellTime = 1 DownlinkDwellTime = 0 DownlinkDwellTime = 1
0 59 N/A 59 N/A
1 59 N/A 59 N/A
2 59 19 59 19
3 123 61 123 61
4 250 133 250 133
5 250 250 250 250
6 250 250 250 250
7 250 250 250 250
8 RFU RFU

IN865

Data Rate M N
0 59 51
1 59 51
2 59 51
3 123 115
4 250 242
5 250 242
6 250 242
7 250 242
8 ~ 15 Not Defined Not Defined

RU864

Data Rate M N
0 59 51
1 59 51
2 59 51
3 123 115
4 230 222
5 230 222
6 230 222
7 230 222
8 ~ 15 Not Defined Not Defined

CN470

Data Rate M N
0 59 51
1 59 51
2 59 51
3 123 115
4 250 242
5 250 242
6 ~ 15 Not Defined Not Defined

EU433

Data Rate M N
0 59 51
1 59 51
2 59 51
3 123 115
4 250 242
5 250 242
6 250 242
7 250 242
8 ~ 15 Not Defined Not Defined

Back


LoRa® is a registered trademark or service mark of Semtech Corporation or its affiliates.
LoRaWAN® is a licensed mark.