2.3 Data types
The definition of each command specifies the data types used for values associated with the command. The
different data types are listed below and are described in the following subsections:
String
Integer
Enumerator
Byte_Array
IPv4_Addr
IPv6_Addr
MAC_Addr
Bd_Addr
List
Binary
2.3.1 String
A string shall consist of a sequence of displayable characters from the ISO 8859-1 character set, except for characters \, " and some special characters, see table below. A string constant shall be delimited by two double quote " characters, for example, “Donald Duck”. If the double quote character " is to be used within a string, for example, “My friend “Bono” is a singer”, they have to be represented as the escape character \". If the backslash character \ is to be used within a string constant, it has to be represented as the escape character \\. An empty string is represented by two adjacent delimiters - "".
Escape character | Special character |
|---|
\r
| Carriage return |
\n
| New line |
\t
| Tab |
\b
| Backspace |
\"
| For using " character inside an AT string |
\\
| Backslash |
\0
| Null character |
\xHH
| For representing any byte. HH is 2 hex characters |
2.3.2 Integer
An integer value consists of a sequence of characters, all in the range {0..9} plus a possible minus (“-”) sign for
negative values. Numeric constants are expressed in decimal format only.
2.3.3 Enumerator
An enumerator value is actually an integer, where all its possible values are specified in each case. Only the
defined values are accepted for the command in question.
2.3.4 Byte_Array
A Byte_Array consists of a sequence of characters expressed in two digit hexadecimal in the ranges {0..9}, {a..f}
and {A..F}. The hexadecimal values are grouped together without delimiters; an example of Byte_Array (three
values) is “800000” (Bit 23 is set), excluding the double quote characters.
2.3.5 IPv4_Addr
An IPv4_Addr is a special text string in dotted decimal notation form (that is, four numbers in the range 0-255
separated by periods). An example IP address is “192.168.0.1”, excluding the double quote characters.
2.3.6 IPv6_Addr
An IPv6_Addr is a special text string represented as eight groups of four hexadecimal digits, each group
representing 16 bits (two octets) and surrounded by brackets. The groups are separated by colons (:). An
example of an IPv6 address is “[2001:0db8:85a3:0000:0000:8a2e:0370:7334]”, excluding the double quote
characters.
2.3.7 MAC_Addr
A MAC_Addr is a Byte_Array of fixed length (6 values). An example MAC_Addr is “01A0F7101C08”, excluding
the double quote characters.
2.3.8 Bd_Addr
A Bd_Addr is a MAC_Addr followed an optional address type, “r” for random address and “p” for public address.
If the address type is omitted, it will default to public. An example Bd_Addr is “01A0F7101C08p”, excluding the
double quote characters.
2.3.9 List
A List is a comma (,) separated list of items, where items can be any of the other data types. For example,
channel list is a list of integers, [1,6,11], inluding the two brackets characters. Example AT+UWCL=[1,6,11]
2.3.10 Binary
The binary data starts with \x01 (SOH - Start Of Header), following by the length of the data in two bytes format (UINT16) follwed by the binary data.
The binary data shall not be terminated with the normal \x0D (\r - Carriage Return).
The binary header is three bytes:
{0x01(SOHStartOfHeader),MSB_datalength,LSB_datalength}
All commands and URC that use binary data are “complete” without the binary data, the binary data is sent directy after the AT command, in most case after the handle.
The AT command follows direcly by the binary data, without any “,” or “\r” or anyting in between.
Example:
AT+USOWB=0{0x01,0x00,0x02,0xFF,0xEE}
This command writes to socket 0, 2 bytes data the data is 0xFF 0xEE.
Note that the brackets { } should not be sent, only indicates the start and end of binary data.
Binary data for Socket, SPS and certicitate upload all use the same Binary data format.
2.3.11 Buffered mode
This is the default data mode, the data is read out after an event has been received. It is possible to stop and control the incoming data flow.
2.3.12 Direct mode
In this mode the data is included in the received event, then data will be sent to the host as soon it is avaliable. It is not possible to stop the incoming data flow.
2.3.13 Transparent mode
In this mode the data is sent and received without any AT commands, the limitation that this mode only works with a point-to-point connection.
2.3.13 Transparent mode persistent
This is the same as transparent mode, but can be storted in flash and be active at startup.