Table of Contents
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:
Example:
These commands always return the requested value.
2.1.2. Set commands
These are used to set some parameters within the node.
Syntax:
Example:
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:
Example:
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:
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+RST
Command type: execute
This command resets the radio module.
Example:
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:
2.3. Networking commands
AT+UID
Command type: set, get
This command sets the 64-bit UID of the radio module.
Example:
It can also be used to read the UID of the radio module.
Example:
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:
It can also be used to read the K1 from the radio module
Example:
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:
It is NOT possible to read the PSK, for example:
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+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+LEAVE
Command type: execute
This command orders the module to leave the network it currently joined.
Example:
AT+NWKSTATE?
Command type: get
This command allows the host to check the current state of networking.
Example:
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:
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:
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+LEAVEGRP
Command type: execute
This command orders the module to leave a specific group.
Example:
AT+GRP?
Command type: get
This command returns the list of groups the module has joined.
Example:
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:
Example for group multicast traffic:
Example for all traffic:
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+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+SENDHEX
Command type: execute
This command allows sending data through a previously registered socket. The data is formatted using hexadecimal numbers.
Example:
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+RECVHEX
Command type: execute
This command allows the host to read incoming data from a given socket using hexadecimal format.
Example:
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
Command type: execute
This command allows the host to read incoming data from a given socket using ASCII string format.
Example:
The first number of the response indicates the size of received data. When there is no received data, the response is 0.
Example:
Generated on Thu Oct 12 2023 10:21:01 for embeNET Node AT Commands by 1.9.6