Skip to main content
Version: 5.0

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

WhatDetail
CommandAT+SCHC=SENDB,<ip_data>
Parameter<ip_data> - The IPv4/v6 packet to be sent, as an ASCII string containing an hexadecimal value
Result codesOK
 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 valueError codeComment
1NET_ERRORInternal error
5NET_L2_ERRError from L2 layer
6NET_SEND_ABORT_ERRSession aborted by the sender
7NET_RECV_ABORT_ERRSession 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 valueError codeComment
3NET_BUFFER_ERRBuffer error
5NET_L2_ERRNot joined yet
10NET_TPL_PARAMS_ERRTemplate parameters are not completely configured
11NET_BUSY_ERRLayer is busy, request is ignored

Reception of Data from a Remote Application

WhatDetail
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 valueError codeComment
1NET_ERRORInternal error
5NET_L2_ERRError from L2 layer
6NET_SEND_ABORT_ERRSession aborted by the sender
7NET_RECV_ABORT_ERRSession aborted by the receiver
8NET_CD_ERRError in the CD layer
9NET_RULES_NOT_FOUND_ERRNo CD rules found