Astarte device API for Zephyr 0.7.2
Astarte device SDK for Zephyr RTOS
Loading...
Searching...
No Matches

Functions for device pairing. More...

Macros

#define ASTARTE_PAIRING_CRED_SECR_LEN   44
 Number of characters in the string representation of a Base64 encoded credential secret.
 

Functions

astarte_result_t astarte_pairing_register_device (int32_t timeout_ms, const char *device_id, char *out_cred_secr, size_t out_cred_secr_size)
 Register a new device to Astarte.
 

Detailed Description

Functions for device pairing.

Macro Definition Documentation

◆ ASTARTE_PAIRING_CRED_SECR_LEN

#define ASTARTE_PAIRING_CRED_SECR_LEN   44

Number of characters in the string representation of a Base64 encoded credential secret.

Function Documentation

◆ astarte_pairing_register_device()

astarte_result_t astarte_pairing_register_device ( int32_t timeout_ms,
const char * device_id,
char * out_cred_secr,
size_t out_cred_secr_size )

Register a new device to Astarte.

Will perform the registration for a new device to the Astarte instance.

Parameters
[in]timeout_msTimeout to use for the registration, in ms.
[in]device_idUnique identifier to use to register the device instance. This identifier is a base64 URL encoded 128 bits value.
[out]out_cred_secrReturned credential secret.
[in]out_cred_secr_sizeSize of the output buffer for the credential secret.
Returns
ASTARTE_RESULT_OK if successful, otherwise an error code.