Hello,
I'm trying to get FOTA over BLE (SoC & external Flash) working on NCS 2.9.0. The sysbuild and MCUboot configurations and overlays seem to be fine. The application builds and runs as expected on a nRF52840 device that has 4MB SPI NOR external flash.
I've had FOTA over BLE running on earlier versions of NCS but now I'm migrating projects over to sysbuild and the latest NCS.
I have verified the sysbuild configurations/overlays with successful DFU over UART for both SoC and external flash use cases. However, I suspect that the BLE / mcumgr configurations may be missing a step or two.
For test purposes, I'm using the Peripheral LBS app, as in the "FOTA over BLE" example in the NCS Intermediate training course.
The nRF52840 device establishes a bonded connection to an iPad running nRF Connect Device Manager. When the Device Manager tries to upload a signed bin (or DFU zip) file, the uploading gets "stuck" as in the screenshot below.
Here's the RTT log for MCUboot & app.
*** Booting MCUboot v2.1.0-dev-12e5ee106034 *** *** Using nRF Connect SDK v2.9.0-7787b2649840 *** *** Using Zephyr OS v3.7.99-1f8f3dc29142 *** I: Starting bootloader I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 I: Boot source: none I: Image index: 0, Swap type: none I: Bootloader chainload address offset: 0x16000 I: Jumping to the first image slot *** Booting My Application v1.0.0 - unknown commit *** *** Using nRF Connect SDK v2.9.0-7787b2649840 *** *** Using Zephyr OS v3.7.99-1f8f3dc29142 *** Modified Bluetooth Peripheral LBS to support FOTA over BLE FOTA over BLE using external Flash on particle_xenon [00:00:00.012,115] <inf> fs_nvs: 2 Sectors of 4096 bytes [00:00:00.012,145] <inf> fs_nvs: alloc wra: 0, fd0 [00:00:00.012,145] <inf> fs_nvs: data wra: 0, 1c [00:00:00.012,359] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision: 2d 79 a1 c8 6a 40 b7 3c f6 74 f9 0b 22 d3 c4 80 |-y..j@.< .t.."... 74 72 82 ba |tr.. [00:00:00.016,418] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002) [00:00:00.016,479] <inf> bt_hci_core: HW Variant: nRF52x (0x0002) [00:00:00.016,510] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 45.41337 Build 3074452168 [00:00:00.017,150] <inf> bt_hci_core: No ID address. App must call settings_load() Bluetooth initialized [00:00:00.017,944] <inf> bt_hci_core: Identity: E0:9B:74:CB:35:3B (random) [00:00:00.017,974] <inf> bt_hci_core: HCI: version 6.0 (0x0e) revision 0x106b, manufacturer 0x0059 [00:00:00.018,005] <inf> bt_hci_core: LMP: version 6.0 (0x0e) subver 0x106b Advertising successfully started Connected Disconnected (reason 19) Connected Disconnected (reason 19) Connected Disconnected (reason 19) Connected [00:04:13.704,620] <wrn> bt_l2cap: Ignoring data for unknown channel ID 0x003a Passkey for 6E:FD:AB:8C:C4:C7 (random): 963626 Security changed: 6E:FD:AB:8C:C4:C7 (random) level 4 Pairing completed: 88:AE:07:41:7D:47 (public), bonded: 1 [00:04:34.888,580] <inf> mcuboot_util: Image index: 0, Swap type: none
The "Disconnected ( reason 19) were before I paired the device to the iPad. After bonding, I'm able to view slot 0 but image upload gets stuck.
app prj.conf:
CONFIG_BT=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_DEVICE_NAME="Nordic_LBS" # Enable the LBS service CONFIG_BT_LBS=y CONFIG_BT_LBS_POLL_BUTTON=y CONFIG_DK_LIBRARY=y CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 # Enable FOTA over BLE CONFIG_MCUMGR=y # Enable MCUMGR management for both OS and Images CONFIG_MCUMGR_GRP_OS=y CONFIG_MCUMGR_GRP_IMG=y # Configure MCUMGR transport to UART CONFIG_MCUMGR_TRANSPORT_BT=y # Dependencies # Configure dependencies for CONFIG_MCUMGR CONFIG_NET_BUF=y CONFIG_ZCBOR=y CONFIG_CRC=y # Configure dependencies for CONFIG_MCUMGR_GRP_IMG CONFIG_FLASH=y CONFIG_IMG_MANAGER=y # Configure dependencies for CONFIG_IMG_MANAGER CONFIG_STREAM_FLASH=y CONFIG_FLASH_MAP=y # Configure dependencies for CONFIG_MCUMGR_TRANSPORT_BT CONFIG_BASE64=y # Disable UART Console and enable the RTT console CONFIG_RTT_CONSOLE=y CONFIG_USE_SEGGER_RTT=y CONFIG_LOG_BACKEND_RTT=y CONFIG_LOG_BACKEND_UART=n CONFIG_UART_CONSOLE=n
Am I missing something in the configuration that is preventing the image uploads over BLE to the nRF52840?
I know Support is currently busy updating DFU/FOTA sections in the NCS Intermediate training course, So, hopefully Support will be able to assist. Thank you.
Regards,
Ravi