embeNET Node AT Commands

This page contains documentation of the embeNET Node AT Commands.

1. Scope and purpose

This specification defines the AT commands protocol that is used to control an embeNET enabled node through a serial interface (UART). This document is a comprehensive description of the AT commands. It serves as reference documentation and may be used to implement the protocol itself.

2. AT Commands reference

2.1. Types of commands

In general there are 3 types of commands:

2.1.1. Get commands

These are used to read some information from the node.

Syntax:

AT+command?

Example:

AT+UID?

These commands always return the requested value.

2.1.2. Set commands

These are used to set some parameters within the node.

Syntax:

AT+command=value1,value2,…,valueN

Example:

AT+UID=1122334455667788

These commands always return OK, if the set was successful or ERROR if one or more of the values set was not accepted by the radio module. Beware, that accepting or not a given value may depend on the state the module is currently in. For example it is not possible to change the UID of the radio module once it connects to the network.

2.1.2. Execute commands

These are used to execute a particular operation within the radio module.

Syntax:

AT+command

Example:

AT+RST

2.1.4. Command result

When the module receives a malformed or unknown command it should respond with ERROR. The same applies if the command parameters are malformed or incorrect. If the command is executed successfully it always returns OK.

2.2. General commands

AT

This command is used to check communication between the host and the radio module.

For example:

AT
OK

The command returns a result code OK if the radio module is connected properly. If the module is in the error state, it would return a result code ERROR.

AT+FVER?

Command type: get

This command returns information about the firmware version of the radio module.

Example:

AT+FVER?
1.0.123

AT+RST

Command type: execute

This command resets the radio module.

Example:

AT+RST
OK

AT+LITIME?

Command type: get

This command reads the local time from the radio module. This is the number of milliseconds elapsed since the module was reset.

Example:

AT+LTIME?
3405
OK

2.3. Networking commands

AT+UID

Command type: set, get

This command sets the 64-bit UID of the radio module.

Example:

AT+UID=1122334455667788
OK

It can also be used to read the UID of the radio module.

Example:

AT+UID?
1122334455667788
OK

The UID value is always a 64-bit number expressed in hexadecimal format. The leading zeros can be omitted.

The default value of UID is read from the hardware EUI64 number if the radio module supports that. Otherwise the default value is 0 and it MUST be set by the host before any networking begins. The UID can be set or changed only before the module attempts to join the network. Any attempt to set UID once the module is in the process of joining or leaving the network or has joined the network will return ERROR.

AT+K1

Command type: set, get

This command sets the 128-bit K1 key in the radio module.

Example:

AT+K1=00112233445566778899aabbccddeeff
OK

It can also be used to read the K1 from the radio module

Example:

AT+K1?
00112233445566778899aabbccddeeff
OK

Default value for K1 is 0 and it MUST be set by the host before any networking begins.The K1 key can be set or changed only before the module attempts to join the network. Any attempt to set K1 once the module is in the process of joining or leaving the network or has joined the network will return ERROR.

AT+PSK

Command type: set

This command sets the 128-bit PSK in the radio module.

Example:

AT+PSK=00112233445566778899aabbccddeeff
OK

It is NOT possible to read the PSK, for example:

AT+PSK?
ERROR

Default value for PSK is 0 and it MUST be set by the host before any networking begins.

The PSK can be set only before the module attempts to join the network. Any attempt to set PSK once the module is in the process of joining or leaving the network or has joined the network will return ERROR.

AT+JOIN

Command type: execute

This command starts the network joining process.

Example:

AT+JOIN
OK

AT+QUICKJOIN

Command type: execute

This command starts the network joining process using (if possible) the quick join credentials stored from the previous networking session.

Example:

AT+QUICKJOIN
OK

AT+LEAVE

Command type: execute

This command orders the module to leave the network it currently joined.

Example:

AT+LEAVE
OK

AT+NWKSTATE?

Command type: get

This command allows the host to check the current state of networking.

Example:

AT+NWKSTATE?
2
OK

Possible results are:

  • 0: the module is in IDLE (default), not joined to any network
  • 1: the module is in the process of joining the network
  • 2: the module has joined the network
  • 3: the module is in the process of leaving the network

AT+BRADDR?

Command type: get

This command allows the host to get the IPv6 address of the border router.

Example:

AT+BRADDR?
aaaa:bbbb:cccc:dddd::0000:0000:0000:0001
OK

If the module is not connected to any network, the returned address is 0.

AT+PADDR?

Command type: get

This command allows the host to get the IPv6 address of the parent.

Example:

AT+PADDR?
aaaa:bbbb:cccc:dddd::0000:0000:0000:0123
OK

If the module is not connected to any network, the returned address is 0.

AT+JOINGRP

Command type: execute

This command orders the module to join a specific group.

Example:

AT+JOINGRP=17
OK

AT+LEAVEGRP

Command type: execute

This command orders the module to leave a specific group.

Example:

AT+LEAVEGRP=17
OK

AT+GRP?

Command type: get

This command returns the list of groups the module has joined.

Example:

AT+GRP?
17,19
OK

2.4. Socket commands

AT+REGSOCK

Command type: execute

This command allows the host to register an UDP socket. By default the user can register up to 16 sockets. Each socket can be set up to handle a specific type of traffic.

Example for unicast traffic:

AT+REGSOCK=1001
OK

Example for group multicast traffic:

AT+REGSOCK=1001,"17"
OK

Example for all traffic:

AT+REGSOCK=1001,"ALL"
OK

The parameters for this command are:

  • Port number (mandatory).
  • Handled traffic and group number (optional)

AT+UNREGSOCK

Command type: execute

This command allows the host to unregister an UDP socket. Example:

AT+UNREGSOCK=1001
OK

AT+SOCK?

Command type: get

This command returns the list of registered sockets. This list will also include sockets that are registered by the module itself (for example, for the ENMS service).

Example:

AT+SOCK?
61617,1001
OK

AT+SENDHEX

Command type: execute

This command allows sending data through a previously registered socket. The data is formatted using hexadecimal numbers.

Example:

AT+SENDHEX=1001,48656C6C6F
OK

AT+SENDTXT

Command type: execute

This command allows sending data through a previously registered socket. The data is formatted using text string (ASCII) which is quoted.

Example:

AT+SENDHEX=1001,"Hello world!"
OK

AT+RECVHEX

Command type: execute

This command allows the host to read incoming data from a given socket using hexadecimal format.

Example:

AT+RECVHEX=1001
5,48656C6C6F
OK

The first number of the response indicates the size of received data. When there is no received data, the response is 0.

Example:

AT+RECVHEX=1001
0
OK

AT+RECVTXT

Command type: execute

This command allows the host to read incoming data from a given socket using ASCII string format.

Example:

AT+RECVTXT=1001
12,"Hello world!"
OK

The first number of the response indicates the size of received data. When there is no received data, the response is 0.

Example:

AT+RECVTXT=1001
0
OK
Go to Top