Skip to main content
Version: 5.0

DTLS AT Commands

Set or Get the DTLS Layer Parameters

The expected format of the PSK and its ID should be HEX ASCII. For security reasons, it is recommend that:

  • The ID is 4 bytes long (8 characters in ASCII).
  • The Key is at least 16 bytes long (32 characters in ASCII).

Possible hexadecimal numbers are 0 to 9, a to f or A to F.

For example:

  • Key : 11223344556677881122334455667788.
CommandAT#CONFDTLS=<key_id, key, [nbr_try, handshake_timeout]>AT#CONFDTLS?
Parameter<key_id> - See format expectations above
Parameter<key> - See format expectations above
Parameter<nbr_try> - Optional
Parameter<handshake_timeout> - Optional
Result codesOK#CONFDTLS: <psk_id>,<psk>,<nbr_try>,<handshake_timeout>

Perform a DTLS Handshake

Result codesOK


The OK result code or an error is returned immediately. If OK was returned, a transmission is attempted.

#HANDSHAKE, the associated socket ID, a status and an error are returned at the end of the transmission.

The status that can be returned after a transmission failure are:

Numeric valueError codeComment
1DTGS_ERRORInternal error
10DTGS_L2_ERRError from L2 layer
11DTGS_SEND_ABORT_ERRSession aborted by the sender
12DTGS_RECV_ABORT_ERRSession aborted by the receiver
25DTGS_HANDSHAKE_ERRDTLS handshake failed