This page contains documentation of the embeNET Node AT Commands.
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.
In general there are 3 types of commands:
These are used to read some information from the node.
Syntax:
Example:
These commands always return the requested value.
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.
These are used to execute a particular operation within the radio module.
Syntax:
Example:
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.
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.
Command type: get
This command returns information about the firmware version of the radio module.
Example:
Command type: execute
This command resets the radio module.
Example:
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:
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.
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.
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.
Command type: execute
This command starts the network joining process.
Example:
Command type: execute
This command starts the network joining process using (if possible) the quick join credentials stored from the previous networking session.
Example:
Command type: execute
This command orders the module to leave the network it currently joined.
Example:
Command type: get
This command allows the host to check the current state of networking.
Example:
Possible results are:
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.
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.
Command type: execute
This command orders the module to join a specific group.
Example:
Command type: execute
This command orders the module to leave a specific group.
Example:
Command type: get
This command returns the list of groups the module has joined.
Example:
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:
Command type: execute
This command allows the host to unregister an UDP socket. Example:
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:
Command type: execute
This command allows sending data through a previously registered socket. The data is formatted using hexadecimal numbers.
Example:
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:
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:
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:
Any question or remarks? Just write us a message!
Feel free to get in touch