Enable mcumgr features on NRF5340 DK board while Bluetooth HCI_USB program is running

Hello community,

I am trying for multiple firmware updates for my NRF5340 DK board. 

What I am doing is I have build and flashed the SMP server sample program found /zephyr/samples/subsys/mgmt/mcumgr/smp_svr

After flashing this application, I can see my board recognised as a ttyACM0 device while I perform ls /dev.

Using the mcumgr tool I am also able to flash the Bluetooth HCI_USB sample program and after confirming the image and resetting the board, the board now acts as a bluetooth controller. I can verify this using the bluetoothctl command.

Now If I want to do a firmware upgrade, I dont have any way in the HCI_USB application to go back to smp server application. How can I perform multiple firmware updates using mcumgr?

Can virtual com port concept be useful here? If yes then I would like to have a detailed tutorial for this .

  • I am able to upload a sample program using mcumgr when I enable SMP server configuration in HCI_USB program. But in that instance it does not detect at a bluetooth device.

  • Copying boards/nrf52840dk_nrf52840.conf/overlay to boards/nrf5340dk_nrf5340_cpuapp.conf/overlay in my sample, I get this:

    Try to follow the steps that I follow. Does it look the same to you?
    Let me know about anything that is different on your end.

  • Hello   apologies for the extreme delay in answering . I kind of solved the issue of enabling the controller board as a bluetooth controller as well as enable it to listen to mcumgr specific comamnds. 

    Instead of HCI_USB I had used HCI_UART sample program. I had enabled all mcugmr featues in the prj.conf file.

    In the overlay file I had specified two ACM ports - First one to be used for MCUMGR specifiec commands and the other to be used to attach the nrf board as a bluetooth HCI controller.

  •   I had successfully used the HCI_UART program to open 2 virtual ports - once for attaching the bluetooth device to HCI and another for accepting MCUMGR specific commands. The two functionalities are working fine but there is an issue with the scanning while using the program. In my use case I have been using BlueZ which communicates via the Dbus for various bluetooth related commands. What I have observed during my testing is that after a certain time the bluetooth controller is unable to detect any advertising devices. I have to do a power reset for it to make it scan again only to get the same issue after sometime. 

    More details of this problem is being discussed on another thread posted by one my acquaintance :

     NRF5340 HCI_USB & HCI_UART Stop Scanning 

    Let me know if you have anything on this that can be of help

  • You are in good hands with Torbjørn, he is more experienced with USB than I am. In fact I asked him for assistance with this ticket.

    But thanks for pointing out that ticket, I will keep an eye on it!

Related