SCHC Network Interface
The content of Acklio FullSDK can be described in its simplistic view as an adaptation layer with the SCHC mechanisms, and a set of interfaces: the Management API, the Datagram API, the Network API and the L2A interface.
Refer to the diagram of layers and interfaces for a better understanding.
The "UDP Client" and "DLMS using Gurux" Demo examples both use the following AT commands in their communication sequences.
About the Error Messages
Error messages of the SCHC interfaces use the following format: AT_ERROR,<layer_id>,<status>
where:
- The layer ID of the Network API is
3
- The status is the numeric value returned by the library and listed in the header file 'fullsdknet.h'.
For example, the error message AT_Error,3,6
means that the session has been aborted by the sender (error 6) at the level of the network interface (layer 3).
Error codes 2, 4, 8 and 9 are not in the table because they are not returned by the FullSDK library.
Send Raw Data
What | Detail |
---|---|
Command | AT+SCHC=SENDB,<ip_data> |
Parameter | <ip_data> - The IPv4/v6 packet to be sent, as an ASCII string containing an hexadecimal value |
Result codes | OK |
AT_PARAM_ERROR | |
AT_ERROR,3,<status> | |
+SENDOK | |
+SENDFAIL,<status>,<error> |
Transmissions
The OK
result code or an error is returned immediately. If OK
was returned, a transmission is attempted.
- If the transmission succeeds,
+SENDOK
and the associated socket ID are returned at the end of the transmission. - If the transmission fails,
+SENDFAIL
, a status and an error are returned at the end of the transmission.
The status that can be returned after a transmission failure the following:
Numeric value | Error code | Comment |
---|---|---|
1 | NET_ERROR | Internal error |
5 | NET_L2_ERR | Error from L2 layer |
6 | NET_SEND_ABORT_ERR | Session aborted by the sender |
7 | NET_RECV_ABORT_ERR | Session aborted by the receiver |
Error Messages
The errors depend on layer 2.
AT_ERROR,3,<status>
reports a network layer error with the following possible values:
Numeric value | Error code | Comment |
---|---|---|
3 | NET_BUFFER_ERR | Buffer error |
5 | NET_L2_ERR | Not joined yet |
10 | NET_TPL_PARAMS_ERR | Template parameters are not completely configured |
11 | NET_BUSY_ERR | Layer is busy, request is ignored |
Reception of Data from a Remote Application
What | Detail |
---|---|
Command | — |
Parameters | — |
Result codes | +RECVOK,<binary_data> |
Received data is an ASCII string containing an hexadecimal value.
The status that can be returned after a reception failure are:
Numeric value | Error code | Comment |
---|---|---|
1 | NET_ERROR | Internal error |
5 | NET_L2_ERR | Error from L2 layer |
6 | NET_SEND_ABORT_ERR | Session aborted by the sender |
7 | NET_RECV_ABORT_ERR | Session aborted by the receiver |
8 | NET_CD_ERR | Error in the CD layer |
9 | NET_RULES_NOT_FOUND_ERR | No CD rules found |