Read nRF5340 Network Core "FW_INFO" from the App Core

Hello Devzone,

How can the nRF5340 App core read the "version number" of the image flashed to the Network Core, e.g. the FW_INFO fields, or something similar?

I am using NCS 1.9.1.

I am able to manually dump and examine the Network core's binary file and see that I can indeed change the FW_INFO version number by adding CONFIG_FW_INFO_FIRMWARE_VERSION=1234 to my child_image/hci_rpmsg.conf file, but I am unsure as to how the App core can obtain that value at runtime.

When CONFIG_BT_DEBUG is set, the calls to  bt_hci_cmd_send_sync(BT_HCI_OP_VS_READ_VERSION_INFO, NULL, &rsp) seem to return junk data, see below.

[00:00:00.642,761] <inf> bt_hci_core : HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.655,426] <inf> bt_hci_core : HW Variant: nRF53x (0x0003)
[00:00:00.666,503] <inf> bt_hci_core : Firmware: Standard Bluetooth controller (0x00) Version 14.50663 Build 1008232294
[00:00:00.684,448] <inf> bt_hci_core : Identity: FC:DB:21:36:D2:52 (random)
[00:00:00.696,563] <inf> bt_hci_core : HCI: version 5.2 (0x0b) revision 0x22fe, manufacturer 0x0059
[00:00:00.711,212] <inf> bt_hci_core : LMP: version 5.2 (0x0b) subver 0x22fe

I don't believe that these are valid values for: Version 14.50663 Build 1008232294.

I tried hacking where those values seem to be set here in vs_read_version_info() at https://github.com/nrfconnect/sdk-zephyr/blob/d6cd4fc1ceec4bb41c217709c373e5b9ffd05e51/subsys/bluetooth/controller/hci/hci.c#L4555 but the values did not change when I rebuilt and reflashed the network core. Are they controlled/set somewhere else?

I also saw this defined BT_VS_CMD_BIT_READ_BUILD_INFO, but didn't see anywhere that this command type/enum is handled. I attempted to make the HCI call with this command but it failed with: 
[00:00:00.665,740] <wrn> bt_hci_core : opcode 0xfc08 status 0x01
Is this command implemented?

How can I set some kind of version information in the Network Core image and then read that back at runtime from the Application Core?

Thank you for any guidance Slight smile

Parents Reply Children
No Data
Related