OTA#

OTA.

Commands in this class are used for configuring OTA DFU using the Apploader.

Note that this class is used on EFR series 1 and is not available for series 2 devices. The Apploader runs as a Bootloader communication plugin on series 2 and the Apploader plugin API supports setting device name and advertising data. Other configurations can be implemented in the Apploader plugin application space.

Functions#

sl_status_t
sl_bt_ota_set_device_name(size_t name_len, const uint8_t *name)
sl_status_t
sl_bt_ota_set_advertising_data(uint8_t packet_type, size_t adv_data_len, const uint8_t *adv_data)
sl_status_t
sl_status_t
sl_bt_ota_set_rf_path(uint8_t enable, uint8_t antenna)

Function Documentation#

sl_bt_ota_set_device_name#

sl_status_t sl_bt_ota_set_device_name (size_t name_len, const uint8_t * name)
Parameters
[in]name_len

Length of data in name

[in]name

OTA device name

Set the device name to be used during the OTA update. The name is stored in the persistent store. Maximum name length is 17 bytes.

Default is "OTA" if a name is not set.

Note that this command is available for EFR series 1 devices only.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 11794 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_ota_set_advertising_data#

sl_status_t sl_bt_ota_set_advertising_data (uint8_t packet_type, size_t adv_data_len, const uint8_t * adv_data)
Parameters
[in]packet_type

This value selects whether data is intended for advertising packets or scan response packets.

  • 2: OTA advertising packets

  • 4: OTA scan response packets

[in]adv_data_len

Length of data in adv_data

[in]adv_data

Data to be set

Set advertising packets in OTA. Maximum 31 bytes of data can be set.

Note that this command is available for EFR series 1 devices only.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 11812 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_ota_set_configuration#

sl_status_t sl_bt_ota_set_configuration (uint32_t flags)
Parameters
[in]flags

OTA configuration flags. This value is given as a bitmask. Flags:

Bit 0: Advertising address

  • 0: Use public device address

  • 1: Use a random address

Bit 1: Application update version check. Check the version number and product ID of the application upgrade before applying. If the version number of the current application can't be determined, this implementation will assume that it is OK to apply the new image. Note that this is not a security feature.

  • 0: Disable version check

  • 1: Enable version check

Bit 2 to 31: Reserved

Default value: 0

Set OTA configuration. The setting is stored in the persistent store.

Note that this command is available for EFR series 1 devices only.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 11847 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_ota_set_rf_path#

sl_status_t sl_bt_ota_set_rf_path (uint8_t enable, uint8_t antenna)
Parameters
[in]enable

If enabled antenna selection is used in OTA, otherwise default antenna is used.

[in]antenna

Set antenna used in OTA. Value should be come from RAIL_AntennaSel_t enum. See antenna path selection in RAIL rail_chip_specific.h.

Set RF path antenna for OTA. This command should be used only if the device has multiple antenna ports. The setting is stored in the persistent store.

Note that this command is available for EFR series 1 devices only.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 11865 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h

Macro Definition Documentation#

sl_bt_cmd_ota_set_device_name_id#

#define sl_bt_cmd_ota_set_device_name_id
Value:
0x01100020

Definition at line 11770 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_ota_set_advertising_data_id#

#define sl_bt_cmd_ota_set_advertising_data_id
Value:
0x02100020

Definition at line 11771 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_ota_set_configuration_id#

#define sl_bt_cmd_ota_set_configuration_id
Value:
0x03100020

Definition at line 11772 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_cmd_ota_set_rf_path_id#

#define sl_bt_cmd_ota_set_rf_path_id
Value:
0x04100020

Definition at line 11773 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_ota_set_device_name_id#

#define sl_bt_rsp_ota_set_device_name_id
Value:
0x01100020

Definition at line 11774 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_ota_set_advertising_data_id#

#define sl_bt_rsp_ota_set_advertising_data_id
Value:
0x02100020

Definition at line 11775 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_ota_set_configuration_id#

#define sl_bt_rsp_ota_set_configuration_id
Value:
0x03100020

Definition at line 11776 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h

sl_bt_rsp_ota_set_rf_path_id#

#define sl_bt_rsp_ota_set_rf_path_id
Value:
0x04100020

Definition at line 11777 of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h