Retrieving Custom Firmware Version from nRF52 BLE Controller to nRF9160 Host

Retrieving Custom Firmware Version from nRF52 BLE Controller to nRF9160 Host

Product: nRF Connect SDK v2.6.0
Hardware: nRF9160 (Host) connected via UART to nRF52832 (Controller)
Controller Firmware: zephyr/samples/bluetooth/hci_uart_async

Hi, 

I have a custom board featuring an nRF9160 and an nRF52832, connected via UART.

  • The nRF9160 runs my main application and acts as the Bluetooth Host.

  • The nRF52832 runs the hci_uart_async sample, acting as a Bluetooth Controller.

My goal is to enable the nRF9160 to query the custom firmware version (e.g., v0.19.0-3-g4847332acd8a) from the nRF52832. This version string is correctly defined in the VERSION file of the hci_uart_async project. I need this version to send it to our backend over LTE.

Currently, when the Bluetooth stack initializes, the nRF9160 only receives standard HCI information from the controller, not the custom application version I defined.
Log output on nRF9160:

[00:00:51.820,068] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:51.820,098] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:51.820,129] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 54.58864 Build 1214809870
[00:00:51.825,164] <inf> bt_hci_core: Identity: FF:1A:3E:61:5B:4B (random)
[00:00:51.825,195] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x118f, manufacturer 0x0059
[00:00:51.825,225] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x118f
[00:00:51.825,225] <inf> bluetooth: Start advertising


How can I implement a mechanism for the nRF9160 to request and receive the version string of the firmware from the nRF52832 controller?

These are the CONFIGs in prj.conf on the nRF52832 side:

# hci_uart_async
CONFIG_SERIAL=y
CONFIG_UART_ASYNC_API=y

# hci_raw (dependency of hci_uart)
CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_HCI_RAW_H4=y
CONFIG_BT_HCI_RAW_H4_ENABLE=y

# Controller configuration. Modify these for your application's needs.
CONFIG_BT_MAX_CONN=2
CONFIG_BT_BUF_ACL_RX_SIZE=255
CONFIG_BT_BUF_CMD_TX_SIZE=255
CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=255

CONFIG_UART_CONSOLE=n

# Enable system off mode
CONFIG_PM_DEVICE=y
CONFIG_CRC=y
CONFIG_POWEROFF=y


And these are the relevant BLE-Related CONFIGs in prj.conf on the nRF9160 side:

# Bluetooth
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_MAX_CONN=2
## Apperance = Generic Sensor
CONFIG_BT_DEVICE_APPEARANCE=1344

# Device Information Service
CONFIG_BT_DIS=y
CONFIG_BT_DIS_SETTINGS=y
CONFIG_BT_DIS_PNP=n
CONFIG_BT_DIS_SERIAL_NUMBER=y
CONFIG_BT_DIS_FW_REV=y
CONFIG_BT_DIS_SW_REV=y
CONFIG_BT_DIS_HW_REV=y
# increase max length to 25 to hold 22 char ICCID which is our serial number.
CONFIG_BT_DIS_STR_MAX=25


## Enable Sleep Accuracy Update Procedure
CONFIG_BT_SCA_UPDATE=y
## Disable dedicated workqueue for long running GATT requests
CONFIG_BT_LONG_WQ=n

## Buffer configuration for large & efficient link layer and ATT payloads
CONFIG_BT_L2CAP_TX_MTU=498
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_BUF_ACL_RX_SIZE=502

## Pairing and bonding
CONFIG_BT_SMP=y
CONFIG_BT_SMP_DISABLE_LEGACY_JW_PASSKEY=y
CONFIG_BT_BONDABLE=n

# Enable HCI support
CONFIG_BT_HCI=y
CONFIG_BT_H4=y

Related