Buttonless DFU Service module. More...
Data Structures |
|
| struct | ble_dfu_buttonless_t |
|
Type holding memory used by Secure DFU Buttonless Service.
More...
|
|
| struct | ble_dfu_buttonless_init_t |
|
Type used to initialize the Secure DFU Buttonless Service.
More...
|
|
Macros |
|
| #define | BLE_DFU_SOC_OBSERVER_PRIO 1 |
|
SoC observer priority.
More...
|
|
| #define | BLE_DFU_BUTTONLESS_CHAR_UUID (0x0003) |
| #define | BLE_DFU_BUTTONLESS_BONDED_CHAR_UUID (0x0004) |
| #define | BLE_NORDIC_VENDOR_BASE_UUID |
|
Nordic vendor-specific base UUID.
More...
|
|
Typedefs |
|
| typedef void(* | ble_dfu_buttonless_evt_handler_t )( ble_dfu_buttonless_evt_type_t p_evt) |
|
Nordic Buttonless DFU Service event handler type.
|
|
Enumerations |
|
| enum |
ble_dfu_buttonless_evt_type_t
{
BLE_DFU_EVT_BOOTLOADER_ENTER_PREPARE , BLE_DFU_EVT_BOOTLOADER_ENTER , BLE_DFU_EVT_BOOTLOADER_ENTER_FAILED , BLE_DFU_EVT_RESPONSE_SEND_ERROR } |
|
Nordic Buttonless DFU Service event type .
More...
|
|
| enum |
ble_dfu_buttonless_rsp_code_t
{
DFU_RSP_INVALID = 0x00, DFU_RSP_SUCCESS = 0x01, DFU_RSP_OP_CODE_NOT_SUPPORTED = 0x02, DFU_RSP_OPERATION_FAILED = 0x04, DFU_RSP_ADV_NAME_INVALID = 0x05, DFU_RSP_BUSY = 0x06, DFU_RSP_NOT_BONDED = 0x07 } |
|
Enumeration of Bootloader DFU response codes.
More...
|
|
| enum |
ble_dfu_buttonless_op_code_t
{
DFU_OP_RESERVED = 0x00, DFU_OP_ENTER_BOOTLOADER = 0x01, DFU_OP_SET_ADV_NAME = 0x02, DFU_OP_RESPONSE_CODE = 0x20 } |
|
Enumeration of Bootloader DFU Operation codes.
More...
|
|
Functions |
|
| uint32_t | ble_dfu_buttonless_init (const ble_dfu_buttonless_init_t *p_dfu_init) |
|
Function for initializing the Device Firmware Update module.
More...
|
|
| uint32_t | ble_dfu_buttonless_async_svci_init (void) |
|
Function for initializing the async SVCI interface.
More...
|
|
| uint32_t | ble_dfu_buttonless_backend_init ( ble_dfu_buttonless_t *p_dfu) |
|
Function to initialize the backend Secure DFU Buttonless service which is either supports bonds or not.
More...
|
|
| uint32_t | ble_dfu_buttonless_char_add ( ble_dfu_buttonless_t *p_dfu) |
|
Function for adding the buttonless characteristic.
More...
|
|
| uint32_t | ble_dfu_buttonless_resp_send ( ble_dfu_buttonless_op_code_t op_code, ble_dfu_buttonless_rsp_code_t rsp_code) |
|
Function for sending a response back to the client.
More...
|
|
| void | ble_dfu_buttonless_on_ble_evt ( ble_evt_t const *p_ble_evt, void *p_context) |
|
Function for handling the application's BLE stack events.
More...
|
|
| void | ble_dfu_buttonless_on_ctrl_pt_write ( ble_gatts_evt_write_t const *p_evt_write) |
|
Function for handling control point write requests.
More...
|
|
| uint32_t | ble_dfu_buttonless_bootloader_start_prepare (void) |
|
Function for preparing to enter the bootloader.
More...
|
|
| uint32_t | ble_dfu_buttonless_bootloader_start_finalize (void) |
|
Function for finalizing entering the bootloader.
More...
|
|
Detailed Description
Buttonless DFU Service module.
This module implements a proprietary Buttonless Secure DFU Service. The service can be configured to support bonds or not. The bond support configuration must correspond to the requirement of Secure DFU bootloader.
- Note
- Attention! To maintain compliance with Nordic Semiconductor ASA Bluetooth profile qualification listings, this section of source code must not be modified.
Macro Definition Documentation
| #define BLE_DFU_BUTTONLESS_BONDED_CHAR_UUID (0x0004) |
Value combined with vendor-specific base to create Bonded Buttonless characteristic UUID.
| #define BLE_DFU_BUTTONLESS_CHAR_UUID (0x0003) |
Value combined with vendor-specific base to create Unbonded Buttonless characteristic UUID.
| #define BLE_DFU_SOC_OBSERVER_PRIO 1 |
SoC observer priority.
Priority of this module's SoC event handler.
| #define BLE_NORDIC_VENDOR_BASE_UUID |
Nordic vendor-specific base UUID.
Enumeration Type Documentation
Nordic Buttonless DFU Service event type .
Enumeration of Bootloader DFU response codes.
Function Documentation
| uint32_t ble_dfu_buttonless_async_svci_init | ( | void | ) |
Function for initializing the async SVCI interface.
- Warning
- Ensure that no interrupts are triggered when calling this functions as interrupts and exceptions are forwarded to the bootloader for the period of the call and may be lost.
This configures the async interface for calling to the bootloader through SVCI interface.
- Return values
-
NRF_SUCCESS on success, otherwise an error code.
| uint32_t ble_dfu_buttonless_backend_init | ( | ble_dfu_buttonless_t * | p_dfu | ) |
Function to initialize the backend Secure DFU Buttonless service which is either supports bonds or not.
- Note
- Do not call this function directly. It is called internally by ble_dfu_buttonless_init .
- Parameters
-
[in] p_dfu Nordic DFU Service structure.
- Returns
- NRF_SUCCESS On sucessfully initializing, otherwise an error code.
| uint32_t ble_dfu_buttonless_bootloader_start_finalize | ( | void | ) |
Function for finalizing entering the bootloader.
- Warning
- This function is not to be called. (It is called internally).
- Return values
-
NRF_SUCCESS Finalize was started correctly.
| uint32_t ble_dfu_buttonless_bootloader_start_prepare | ( | void | ) |
Function for preparing to enter the bootloader.
- Warning
- This function is called directly. (It is called internally).
- Return values
-
Any error code from calling sd_ble_gap_disconnect .
| uint32_t ble_dfu_buttonless_char_add | ( | ble_dfu_buttonless_t * | p_dfu | ) |
Function for adding the buttonless characteristic.
- Note
- This will be implemented differently on bonded/unbonded Buttonless DFU service.
- Parameters
-
[in] p_dfu Nordic DFU Service structure.
- Returns
- NRF_SUCCESS on success, otherwise an error code.
| uint32_t ble_dfu_buttonless_init | ( | const ble_dfu_buttonless_init_t * | p_dfu_init | ) |
Function for initializing the Device Firmware Update module.
- Parameters
-
[in] p_dfu_init Structure containing the values of characteristics needed by the service.
- Return values
-
NRF_SUCCESS on successful initialization of the service.
| void ble_dfu_buttonless_on_ble_evt | ( | ble_evt_t const * | p_ble_evt , |
| void * | p_context | ||
| ) |
Function for handling the application's BLE stack events.
Handles all events from the BLE stack of interest to the DFU buttonless service.
- Parameters
-
[in] p_ble_evt Event received from the BLE stack. [in] p_context BLE context structure.
| void ble_dfu_buttonless_on_ctrl_pt_write | ( | ble_gatts_evt_write_t const * | p_evt_write | ) |
Function for handling control point write requests.
Handles write requests to the control point in DFU with bonds or without bonds.
- Parameters
-
[in] p_evt_write GATTS write event.
| uint32_t ble_dfu_buttonless_resp_send | ( | ble_dfu_buttonless_op_code_t | op_code , |
| ble_dfu_buttonless_rsp_code_t | rsp_code | ||
| ) |
Function for sending a response back to the client.
- Parameters
-
[in] op_code Operation code to send the response for. [in] rsp_code Response code for the operation.
- Return values
-
NRF_SUCCESS on success, otherwise an error code.