FOTA for nrf52 based hci controller

Hi,

I am using nrf52840 to run as an hci controller over UART for nrf91. I was able to implement FOTA over BLE for nrf91, but I would also like to add an option to add FOTA for nrf52. Is there some straightforward way to do that ?

Ideally I just send a special command or signal via pin to nrf52 to switch it to „full BLE” mode where ale data would be handled internally and that way I can just add FOTA in a usual way, but not sure if this is possible.

Best regards,

Michal 

Parents
  • Hi,

    You mention both nRF52840 and nRF52. "nRF52" could mean that your either referring to the nRF52840 or that you have a second nRF52-family device in your product. I'm assuming it is the first, but could you please write out the full device names to avoid any misunderstandings?

    Second question: How have you implemented FOTA over BLE for the nRF9151? I assume it is the nRF52840 which starts the DFU process and transports the new image to the 9151 over UART to the nRF9151. Is this correct?

    Kind regards,
    Andreas

Reply
  • Hi,

    You mention both nRF52840 and nRF52. "nRF52" could mean that your either referring to the nRF52840 or that you have a second nRF52-family device in your product. I'm assuming it is the first, but could you please write out the full device names to avoid any misunderstandings?

    Second question: How have you implemented FOTA over BLE for the nRF9151? I assume it is the nRF52840 which starts the DFU process and transports the new image to the 9151 over UART to the nRF9151. Is this correct?

    Kind regards,
    Andreas

Children
  • Hi Andreas,

    My setup is nrf52840 connected via UART with nrf9151. nrf52840 is a simple BLE controller controller via HCI commands by nrf9151. FOTA is implemented on nrf9151 side, yes. It implements SMP server for the image transfer. So nrf52840 receives all the BLE data and simply sends this to nrf9151.

    Regards,
    Michal

  • Thank you for clarifying and verifying.

    The next issue from what I understand then is how would you identify which of the two SoCs you are going to update in this multi SoC device. As I see it, it is straight forward when you update the 9151 since this is the default, but you would also have to implement support for updating the 52840 through the same SMP server.

    Could you share your partitioning map for both devices?

    Ideally I just send a special command or signal via pin to nrf52 to switch it to „full BLE” mode where ale data would be handled internally and that way I can just add FOTA in a usual way, but not sure if this is possible.

    I would say that this is the way to go, i.e that you do it the same way that you do for updating the 9151, making both devices going into DFU mode, but that you have something that identifies if you're updating the 9151 or the 52840. Roughly something like below:

    If 9151 -> DFU over UART as you've done

    If 52840: Upload new image to mcuboot secondary application partition on the 52840 -> do swap of image -> verify -> reset both devices -> DFU has been complete

    Kind regards,
    Andreas

  • Hi Andreas,

    Partiion map for nrf52840 is:

    		boot_partition: partition@0 {
    			label = "mcuboot";
    			reg = <0x00000000 0x0000C000>;
    		};
    		slot0_partition: partition@c000 {
    			label = "image-0";
    			reg = <0x0000C000 0x00076000>;
    		};
    		slot1_partition: partition@82000 {
    			label = "image-1";
    			reg = <0x00082000 0x00076000>;
    		};
    

    I don't quite get this part:

    "If 52840: Upload new image to mcuboot secondary application partition on the 52840 -> do swap of image -> verify -> reset both devices -> DFU has been complete"

    How do I upload new image to partion on nrf52840 if this only operates in HCI mode? When I connect to my device via Bluetooth all the data by default is transmitted from nrf52840 to nrf9151. That's why implementing DFU for that processor was, let's say, not that complicated. How do I "redirect" this image to nrf52840?

    Best regards,
    Michal

  • I discussed this topic with my colleagues and got another angle to the resolution which may be of help. Your comment w.r.t how to do this when the nRF52840 only operates as a HCI had me thinking.

    What you can do to update the nRF52840 is to follow the method in https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/cellular/lwm2m_client/fota_external_mcu.html

    From here you can

    1. Add the smp client to the nRF9151
    2. Receive the update image over BLE to the nRF9151 and temporary store it where the smp client has access to it (either in mcuboot secondary on the 9151 or in an external flash area). 
    3. Enter serial recovery mode on the nRF52840 and do serial recovery.

    Kind regards,
    Andreas

  • Hi Andreas,

    That approach sounds interesting, however I wonder how can I instruct nrf9151 to store image rather than using it right away. As far as I can tell this example puts nrf52840 in serial recovery right away and then just downloads image over cellular while I need to download image over BLE (through nrf52840) and only then I can use that image.

    Best regards,
    Michal

Related