nRF5 SDK v12.1.0
Data Structures | Macros | Enumerations | Functions
DFU BLE Service

Device Firmware Update (DFU) transport layer for Bluetooth low energy. More...

Data Structures

struct  ble_dfu_t
 DFU Service. More...
 

Macros

#define BLE_DFU_SERVICE_UUID   0xFE59
 The UUID of the DFU Service.
 
#define BLE_DFU_CTRL_PT_UUID   0x0001
 The UUID of the DFU Control Point.
 
#define BLE_DFU_PKT_CHAR_UUID   0x0002
 The UUID of the DFU Packet Characteristic.
 

Enumerations

enum  ble_dfu_op_code_t {
  BLE_DFU_OP_CODE_CREATE_OBJECT = 0x01,
  BLE_DFU_OP_CODE_SET_RECEIPT_NOTIF = 0x02,
  BLE_DFU_OP_CODE_CALCULATE_CRC = 0x03,
  BLE_DFU_OP_CODE_EXECUTE_OBJECT = 0x04,
  BLE_DFU_OP_CODE_SELECT_OBJECT = 0x06,
  BLE_DFU_OP_CODE_RESPONSE = 0x60
}
 BLE DFU opcodes. More...
 

Functions

uint32_t ble_dfu_transport_init (void)
 Function for initializing the DFU Service. More...
 
uint32_t ble_dfu_transport_close (void)
 Function for closing down the DFU Service and disconnecting from the host. More...
 

Detailed Description

Device Firmware Update (DFU) transport layer for Bluetooth low energy.

The Device Firmware Update (DFU) Service is a GATT-based service that can be used for performing firmware updates over BLE. Note that this implementation uses vendor-specific UUIDs for the service and characteristics and is intended to demonstrate firmware updates over BLE. See DFU Transport: BLE for more information on the service and the profile.

Enumeration Type Documentation

BLE DFU opcodes.

These types of opcodes are used in control point access.

Enumerator
BLE_DFU_OP_CODE_CREATE_OBJECT 

Value of the opcode field for a 'Create object' request.

BLE_DFU_OP_CODE_SET_RECEIPT_NOTIF 

Value of the opcode field for a 'Set Packet Receipt Notification' request.

BLE_DFU_OP_CODE_CALCULATE_CRC 

Value of the opcode field for a 'Calculating checksum' request.

BLE_DFU_OP_CODE_EXECUTE_OBJECT 

Value of the opcode field for an 'Initialize DFU parameters' request.

BLE_DFU_OP_CODE_SELECT_OBJECT 

Value of the opcode field for a 'Select object' request.

BLE_DFU_OP_CODE_RESPONSE 

Value of the opcode field for a response.

Function Documentation

uint32_t ble_dfu_transport_close ( void  )

Function for closing down the DFU Service and disconnecting from the host.

Return values
NRF_SUCCESSIf the DFU Service was correctly closed down.
uint32_t ble_dfu_transport_init ( void  )

Function for initializing the DFU Service.

Return values
NRF_SUCCESSIf the DFU Service and its characteristics were successfully added to the SoftDevice. Otherwise, an error code is returned.

Documentation feedback | Developer Zone | Subscribe | Updated