hawkBit Firmware Over-the-Air for Zephyr Project.
More...
|
enum | hawkbit_response {
HAWKBIT_NETWORKING_ERROR
, HAWKBIT_UNCONFIRMED_IMAGE
, HAWKBIT_PERMISSION_ERROR
, HAWKBIT_METADATA_ERROR
,
HAWKBIT_DOWNLOAD_ERROR
, HAWKBIT_OK
, HAWKBIT_UPDATE_INSTALLED
, HAWKBIT_NO_UPDATE
,
HAWKBIT_CANCEL_UPDATE
, HAWKBIT_NOT_INITIALIZED
, HAWKBIT_PROBE_IN_PROGRESS
} |
| Response message from hawkBit. More...
|
|
hawkBit Firmware Over-the-Air for Zephyr Project.
◆ HAWKBIT_JSON_URL
#define HAWKBIT_JSON_URL "/default/controller/v1" |
◆ hawkbit_config_device_data_cb_handler_t
typedef int(* hawkbit_config_device_data_cb_handler_t) (const char *device_id, uint8_t *buffer, const size_t buffer_size) |
#include <include/zephyr/mgmt/hawkbit.h>
Callback to provide the custom data to the hawkBit server.
This callback is used to provide the custom data to the hawkBit server. The custom data is used to provide the hawkBit server with the device specific data.
- Parameters
-
device_id | The device ID. |
buffer | The buffer to store the json. |
buffer_size | The size of the buffer. |
◆ hawkbit_get_device_identity_cb_handler_t
typedef bool(* hawkbit_get_device_identity_cb_handler_t) (char *id, int id_max_len) |
#include <include/zephyr/mgmt/hawkbit.h>
Callback to get the device identity.
- Parameters
-
id | Pointer to the buffer to store the device identity |
id_max_len | The maximum length of the buffer |
◆ hawkbit_response
#include <include/zephyr/mgmt/hawkbit.h>
Response message from hawkBit.
These messages are used to inform the server and the user about the process status of the hawkBit and also used to standardize the errors that may occur.
Enumerator |
---|
HAWKBIT_NETWORKING_ERROR | |
HAWKBIT_UNCONFIRMED_IMAGE | |
HAWKBIT_PERMISSION_ERROR | |
HAWKBIT_METADATA_ERROR | |
HAWKBIT_DOWNLOAD_ERROR | |
HAWKBIT_OK | |
HAWKBIT_UPDATE_INSTALLED | |
HAWKBIT_NO_UPDATE | |
HAWKBIT_CANCEL_UPDATE | |
HAWKBIT_NOT_INITIALIZED | |
HAWKBIT_PROBE_IN_PROGRESS | |
◆ hawkbit_autohandler()
void hawkbit_autohandler |
( |
void |
| ) |
|
#include <include/zephyr/mgmt/hawkbit.h>
Runs hawkBit probe and hawkBit update automatically.
The hawkbit_autohandler handles the whole process in pre-determined time intervals.
◆ hawkbit_get_action_id()
int32_t hawkbit_get_action_id |
( |
void |
| ) |
|
◆ hawkbit_get_config()
◆ hawkbit_get_ddi_security_token()
static char * hawkbit_get_ddi_security_token |
( |
void |
| ) |
|
|
inlinestatic |
◆ hawkbit_get_server_addr()
static char * hawkbit_get_server_addr |
( |
void |
| ) |
|
|
inlinestatic |
◆ hawkbit_get_server_port()
static uint16_t hawkbit_get_server_port |
( |
void |
| ) |
|
|
inlinestatic |
◆ hawkbit_get_tls_tag()
static sec_tag_t hawkbit_get_tls_tag |
( |
void |
| ) |
|
|
inlinestatic |
◆ hawkbit_init()
int hawkbit_init |
( |
void |
| ) |
|
◆ hawkbit_probe()
#include <include/zephyr/mgmt/hawkbit.h>
The hawkBit probe verify if there is some update to be performed.
- Return values
-
HAWKBIT_NETWORKING_ERROR | fail to connect to the hawkBit server. |
HAWKBIT_UNCONFIRMED_IMAGE | image is unconfirmed. |
HAWKBIT_PERMISSION_ERROR | fail to get the permission to access the hawkBit server. |
HAWKBIT_METADATA_ERROR | fail to parse or to encode the metadata. |
HAWKBIT_DOWNLOAD_ERROR | fail while downloading the update package. |
HAWKBIT_OK | if the image was already updated. |
HAWKBIT_UPDATE_INSTALLED | if an update was installed. Reboot is required to apply it. |
HAWKBIT_NO_UPDATE | if no update was available. |
HAWKBIT_CANCEL_UPDATE | if the update was cancelled by the server. |
HAWKBIT_NOT_INITIALIZED | if hawkBit is not initialized. |
HAWKBIT_PROBE_IN_PROGRESS | if probe is currently running. |
◆ hawkbit_reboot()
void hawkbit_reboot |
( |
void |
| ) |
|
◆ hawkbit_reset_action_id()
int hawkbit_reset_action_id |
( |
void |
| ) |
|
#include <include/zephyr/mgmt/hawkbit.h>
Resets the hawkBit action id, that is saved in settings.
This should be done after changing the hawkBit server.
- Return values
-
0 | on success. |
-EAGAIN | if probe is currently running. |
-EIO | if the action id could not be reset. |
◆ hawkbit_set_config()
#include <include/zephyr/mgmt/hawkbit.h>
Set the hawkBit server configuration settings.
- Parameters
-
config | Configuration settings to set. |
- Return values
-
0 | on success. |
-EAGAIN | if probe is currently running. |
◆ hawkbit_set_custom_data_cb()
#include <include/zephyr/mgmt/hawkbit.h>
Set the custom data callback.
This function is used to set the custom data callback. The callback is used to provide the custom data to the hawkBit server.
- Parameters
-
- Return values
-
0 | on success. |
-EINVAL | if the callback is NULL. |
◆ hawkbit_set_ddi_security_token()
static int hawkbit_set_ddi_security_token |
( |
char * |
token | ) |
|
|
inlinestatic |
#include <include/zephyr/mgmt/hawkbit.h>
Set the hawkBit security token.
- Parameters
-
token | Security token to set. |
- Return values
-
0 | on success. |
-EAGAIN | if probe is currently running. |
◆ hawkbit_set_device_identity_cb()
#include <include/zephyr/mgmt/hawkbit.h>
Set the device identity callback.
This function is used to set a custom device identity callback.
- Parameters
-
- Return values
-
0 | on success. |
-EINVAL | if the callback is NULL. |
◆ hawkbit_set_server_addr()
static int hawkbit_set_server_addr |
( |
char * |
addr_str | ) |
|
|
inlinestatic |
#include <include/zephyr/mgmt/hawkbit.h>
Set the hawkBit server address.
- Parameters
-
addr_str | Server address to set. |
- Return values
-
0 | on success. |
-EAGAIN | if probe is currently running. |
◆ hawkbit_set_server_port()
static int hawkbit_set_server_port |
( |
uint16_t |
port | ) |
|
|
inlinestatic |
#include <include/zephyr/mgmt/hawkbit.h>
Set the hawkBit server port.
- Parameters
-
- Return values
-
0 | on success. |
-EAGAIN | if probe is currently running. |
◆ hawkbit_set_tls_tag()
static int hawkbit_set_tls_tag |
( |
sec_tag_t |
tag | ) |
|
|
inlinestatic |