Skip to content

Nrf52840 AT Instruction Description Documentation

1, Summarize


The AT command is the initial setting for the default serial port used on the device. The default baud rate is 115200.

2, AT command format


AT commands have the standard format AT+XXX, where XXX indicates a command. There are four available command behaviors:

AT+XXX? provides a short description of the given command, e.g. AT+DEVEUI?.

AT+XXX is used to run the command, e.g. AT+VER.

AT+XXX=? Used to get the value of a given command, e.g. AT+CFS=?

AT+XXX=< value > is used to provide a value to a command, e.g. AT+CFM=1.

The output format is as follows:

AT+XXX=< value > < CR> < LF>

< CR > < LF > < Status < CR> < LF>

< CR > stands for “Carriage Return” and < LF> stands for “Line Feed”.

If no value is returned, no < value> < CR > < LF> output is returned. Each command (except for special planning) returns a status string that is preceded and followed by the format < CR > < LF> < Status < CR> < LF> .

Possible status codes include:

OK: the command ran correctly with no errors.

AT_ERROR: General error.

AT_PARAM_ERROR: One parameter of the command was in error.

3, AT Command Manual


1). general order

AT

This command is used to check if the communication is working properly

command input parameter return value Return code
AT - - OK

AT +APIVER

This command is used to check the lorawan protocol version number

command input parameter return value Return code
AT+HARDWAREVER - Lorawan protocol version OK

AT +HARDWAREVER

This command is used to check the hardware version number

command input parameter return value Return code
AT+HARDWAREVER - Motherboard version number OK

2). LoRaWAN Key and ID

AT+APPEUI

Description: Application Identifier

This command is used to access the unique application identifier in OTAA mode.

command input parameter return value Return code
AT+APPEUI? - AT+APPEUI:Get or set the application EUI (8 bytes, hexadecimal) OK
AT+APPEUI=? - < 8 hex > OK
AT+APPEUI=< Input > < 8 hex > - OKAT_PARAM_ERROR

typical example

AT+APPEUI=0102030405060708

OK

AT+APPEUI=010203040506070809

AT_PARAM_ERROR

AT+APPEUI=?

AT+APPEUI=0102030405060708

OK

AT+DEUI

Description: Device EUI

This command is used to access the unique terminal device ID. for OTAA mode.

command input parameter return value Return code
AT+DEUI? - AT+DEUI:Get or set device EUI (8 bytes, hex) OK
AT+DEUI=? - < 8 hex > OK
AT+DEUI=< Input> < 8 hex > - OKAT_PARAM_ERROR

typical example:

AT+DEUI=?

AT+DEUI=1122334455667788

OK

AT+DEUI=1122334455667788

OK

AT+APPKEY

Description:Application Key

This command is used to access the application key in OTAA mode.

command input parameter return value Return code
AT+APPKEY? - AT+APPKEY:Get or set the application key (hexadecimal 16 bytes) OK
AT+APPKEY=? - < 16 hex > OK
AT+APPKEY=< Input > < 16 hex > - OKAT_PARAM_ERROR

typical example

AT+APPKEY=01020AFBA1CD4D20010230405A6B7F88

OK

AT+APPKEY=01020AFBA1CD4D20010230405A6B7F

AT_PARAM_ERROR

AT+APPKEY=?

AT+APPKEY=01020AFBA1CD4D20010230405A6B7F88

OK

AT+NWKKEY

Description: network session key

This command is used for network session key in OTAA mode.

command input parameter return value Return code
AT+NWKKEY? - AT+NWKKEY:Get or set the application key (hexadecimal 16 bytes) OK
AT+NWKKEY=? - < 16 hex > OK
AT+NWKKEY=< input> < 16 hex > - OKAT_PARAM_ERROR

typical example:

AT+NWKKEY=01020AFBA1CD4D20010230405A6B7F88

OK

AT+NWKKEY=01020AFBA1CD4D20010230405A6B7F

AT_PARAM_ERROR

AT+NWKKEY=?

AT+NWKKEY=01020AFBA1CD4D20010230405A6B7F88

OK

AT+DADDR

Description: device address

This command is used to access the device address in ABP mode.

command input parameter return value Return code
AT+DEVADDR? - AT+DEVADDR:Get or set device address (hexadecimal 4 bytes) OK
AT+DEVADDR=? - < 4 hex > OK
AT+DEVADDR=< Input > < 4 hex > - OKAT_PARAM_ERROR

typical example:

AT+DEVADDR=01020A0B

OK

AT+DEVADDR=?

AT+DEVADDR=01020A0B

OK

AT+FNWKSKEY

DESCRIPTION: Key for device to network server message integrity.

This command is used to verify the key for message integrity from the device to the network server (Node to Network Server).

command input parameter return value Return code
AT+FNWKSKEY? - AT+FNWKSKEY:Get or set the application session key. OK
AT+FNWKSKEY=? - AT+FNWKSKEY=< 16 hex > OK
AT+FNWKSKEY=< Input > < 16 hex > - OKAT_PARAM_ERROR

typical example:

AT+FNWKSKEY=01020AFBA1CD4D20010230405A6B7F88

OK

AT+FNWKSKEY=?

AT+FNWKSKEY=01020AFBA1CD4D20010230405A6B7F88

OK

AT+SNWKSKEY

DESCRIPTION: Key for device to web server message integrity.

This command is used to verify the key for subsequent message integrity from the device to the web server.

command input parameter return value Return code
AT+SNWKSKEY? - AT+SNWKSKEY:Get or set the application session key. OK
AT+SNWKSKEY=? - AT+SNWKSKEY=< 16 hex > OK
AT+SNWKSKEY=< Input > < 16 hex > - OKAT_PARAM_ERROR

typical example:

AT+SNWKSKEY=01020AFBA1CD4D20010230405A6B7F88

OK

AT+SNWKSKEY=?

AT+SNWKSKEY=01020AFBA1CD4D20010230405A6B7F88

OK

AT+NWKSKEY

Description: network session key

This command is used to get or set the network session key in ABP mode.

command input parameter return value Return code
AT+NWKSKEY? - AT+NWKSKEY:Get or set the application session key. OK
AT+NWKSKEY=? - AT+NWKSKEY=< 16 hex > OK
AT+NWKSKEY=< Input > < 16 hex > - OKAT_PARAM_ERROR

typical example:

AT+NWKSKEY=01020AFBA1CD4D20010230405A6B7F88

OK

AT+NWKSKEY=?

AT+NWKSKEY=01020AFBA1CD4D20010230405A6B7F88

OK

AT+APPSKEY

Description: Application session key

This command is used to set the application session key in ABP mode.

command input parameter return value Return code
AT+APPSKEY? - AT+APPSKEY:Get or set the application session key. OK
AT+APPSKEY=< Input > < 16 hex > - OKAT_PARAM_ERROR

typical example:

AT+APPSKEY=01020AFBA1CD4D20010230405A6B7F88

OK

AT+APPSKEY=01020AFBA1CD4D20010230405A6B7F

AT_PARAM_ ERROR

3). LoRaWAN network management

AT+TYPE

Description:Select LoRaWAN admission method

This command is used to join the LoRaWAN network admission method.

command input parameter return value Return code
AT+TYPE=< Input > - - OK

typical example:

AT+TYPE=2

OK

4). LoRaWAN Joining and sending

AT+JOIN

Description: join LoRaWAN network

This command is used to join LoRaWAN network.

command input parameter return value Return code
AT+JOIN=< Input > < Param1 > Param1 = 0:ABPParam1 = 1:OTAA - OK

typical example:

AT+JOIN

OK

AT+SEND

Description: Send Data

This command provides a method of sending data on a dedicated port number.

command input parameter return value Return code
AT+SEND=< Input > < port > :< payload > :< msg > - OK

typical example:

AT+SEND=10:0:12345

OK

AT+ ADR

Description: adaptive rate

The data adaptive rate that this command is used to access.

command input parameter return value Return code
AT+ADR=? - AT+ADR=(0 or 1) OK
AT+ADR=< Input > 0 or 1 - OK

typical example:

AT+ADR=?

AT+ADR=1

OK

AT+ DR

Description: data rate

This command is used to pick up and configure the data rate setting.

command input parameter return value Return code
AT+DR=? - AT+DR=< Input > OK
AT+DR=< Input > < Input > - OK

typical example:

AT+DR=?

AT+DR=3

OK

AT+DR=2

OK

AT+ DCS

Description: data rate

This command is used to pick up and configure the data rate setting.

command input parameter return value Return code
AT+DCS=? - AT+DCS=< Input > OK
AT+DCS=< Input > < Input > - OK

typical example:

AT+DCS=?

AT+DCS=1,1250

OK

AT+DCS=1,1250

OK

AT+ TXP

Description:Set Transmit Power

This command sets the transmit power.

command input parameter return value Return code
AT+TXP=? - AT+TXP=< Input > OK
AT+TXP=< Input > < Input > - OK

typical example:

AT+TXP=?

AT+TXP=22

OK

AT+TXP=22

OK

AT+ RX2DR

Description:Set Transmit Power

This command sets the transmit power.

command input parameter return value Return code
AT+RX2DR=? - AT+RX2DR=< Input > OK
AT+RX2DR=< Input > < Input > - OK

typical example:

AT+RX2DR=?

AT+RX2DR=5

OK

AT+RX2DR=5

OK

AT+BAND

Description:Set frequency band

This command is used to set the frequency band.

command input parameter return value Return code
AT+BAND=? - AT+BAND=< Input > OK
AT+BAND=< Input > < Input > - OK

typical example:

AT+BAND=?

AT+BAND=1

OK

AT+BAND=1

OK

No relevant api commands found Reference is to LoRaWAN® AT commands for STM32CubeWL - Application note official command set.

command functionality
AT+CLASS Sets/gets the LoRa class
AT+JN1DL 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+RX2FQ Sets/gets the frequency of the Rx window 2.

OTAA network access command

AT+APPEUI=89:89:89:89:89:89:89:89

AT+DEUI=78:78:78:78:78:78:78:78

AT+APPKEY=61:69:2A:12:8D:87:8A:3C:E0:52:0E:A2:87:F7:F8:F9

AT+NWKKEY=4F:EA:84:A3:6C:11:EB:C5:0E:C0:F3:43:6F:87:F4:D1

AT+TYPE=2

AT+BAND=1

AT+JOIN

AT+SEND=10:0:1234

ABP network access command

AT+DADDR=26:0B:81:2B

AT+FNWKSKEY=A2:93:5B:94:80:B0:79:80:C0:E0:F0:EA:E2:65:3E:8C

AT+SNWKSKEY=E7:FB:34:04:5E:4B:EC:AE:0B:37:00:BF:44:12:74:E5

AT+NWKSKEY=BE:C4:A8:63:3B:37:92:07:2C:D1:40:D6:5B:FB:A7:18

AT+APPSKEY=CA:F6:DB:11:A8:D1:BD:E1:52:16:38:F0:32:83:24:1D

AT+TYPE=1

AT+BAND=1

AT+JOIN

AT+SEND=10:0:1234