|
Astarte Device SDK ESP32
ESP32 device SDK for the Astarte platform
|
Astarte pairing functions. More...

Go to the source code of this file.
Data Structures | |
| struct | astarte_pairing_config_t |
Functions | |
| struct astarte_pairing_config | __attribute__ ((deprecated("Please use astarte_pairing_config_t"))) |
| astarte_err_t | astarte_pairing_get_credentials_secret (const astarte_pairing_config_t *config, char *out, size_t length) |
| get the credentials secret. | |
| astarte_err_t | astarte_pairing_register_device (const astarte_pairing_config_t *config) |
| register a device. | |
| astarte_err_t | astarte_pairing_get_mqtt_v1_credentials (const astarte_pairing_config_t *config, const char *csr, char *out, size_t length) |
| obtain a new Astarte MQTT v1 certificate. | |
| astarte_err_t | astarte_pairing_get_mqtt_v1_broker_url (const astarte_pairing_config_t *config, char *out, size_t length) |
| get the Astarte MQTT v1 broker URL. | |
Variables | |
| const char * | base_url |
| const char * | jwt |
| const char * | realm |
| const char * | hw_id |
| const char * | credentials_secret |
Astarte pairing functions.
| astarte_err_t astarte_pairing_get_credentials_secret | ( | const astarte_pairing_config_t * | config, |
| char * | out, | ||
| size_t | length | ||
| ) |
get the credentials secret.
Get the credentials secret from NVS. If it isn't present, register the device to obtain it, save it and return it.
| config | A struct containing the pairing configuration. |
| out | A pointer to an allocated string which the credentials secret will be written to. |
| length | The length of the out buffer. |
| astarte_err_t astarte_pairing_get_mqtt_v1_broker_url | ( | const astarte_pairing_config_t * | config, |
| char * | out, | ||
| size_t | length | ||
| ) |
get the Astarte MQTT v1 broker URL.
Get the URL of the broker which the device will connect to.
| config | A struct containing the pairing configuration. |
| out | A pointer to an allocated string where the URL will be written. |
| length | The length of the out buffer. |
| astarte_err_t astarte_pairing_get_mqtt_v1_credentials | ( | const astarte_pairing_config_t * | config, |
| const char * | csr, | ||
| char * | out, | ||
| size_t | length | ||
| ) |
obtain a new Astarte MQTT v1 certificate.
Call Pairing API to obtain a new Astarte MQTT v1 certificate.
| config | A struct containing the pairing configuration. |
| csr | A PEM encoded NULL-terminated string containing the CSR |
| out | A pointer to an allocated buffer where the certificat will be written. |
| length | The length of the out buffer. |
| astarte_err_t astarte_pairing_register_device | ( | const astarte_pairing_config_t * | config | ) |
register a device.
Perform a device registration as agent.
| config | A struct containing the pairing configuration. |