SMP Server modification

Hello, 

I´m working with the SMP server sample, but I need to modify that one for the following feature related to OTA:

1. Update Nordic firmware with the image system of the protocol.
2. Update other MCUs over SPI (not Nordic family) with the file transfer of the SMP server.

OTA updates will be performed over Bluetooth low-energy. 

So, for that, I need to modify the SMP over Bluetooth low energy stack. What is the best/easy roadmap for that?

Thank you

  • Hi,

    You can apply the principles from this application to your product: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/cellular/lwm2m_client/README.html. As a quick explanation this application showcases how to receive an update image over cellular to a nRF91-based device and then in Evaluating LwM2M Advanced Firmware Update for external MCU it showcases how to perform DFU for an external MCU.

    The procedure should be relative MCU agnostic.

    Kind regards,
    Andreas

  • Hi,

    Thank you for the recommendations. I´m unsure if adapting that application layer protocol over ble is possible. What do you think? (I´m using the nRF54L15 and am not likely to change to an nRF9160.)

    On the other hand, customizing the SMP-Server and the mcu-mgr stack appears to be a more robust option, as we can use the mobile phone/computer device manager application for OTA over Bluetooth low-energy or UART.

    Let me know your opinion and if it is feasible to customize the SMP server. 

    Thank you!





     

  • Hi,

    The method you're describing is perfectly viable.

    We also have the smp client and smp server samples that you can use as a basis, that might be a less cluttered starting point.

    Agustin Perez said:
    I´m unsure if adapting that application layer protocol over ble is possible. What do you think? (I´m using the nRF54L15 and am not likely to change to an nRF9160.)

    No worries, I was mostly thinking about showcasing how to do the transport between the client and the server. From there you can replace the cellular part of the application layer protocol with the method you want to send from your controller/phone/computer device manager.

    Feel free to ask follow ups,

    Kind regards,
    Andreas

  • Hi,

    Thank you again for your support.

    The roadmap we believe is the best is the following: 

    1. Move the smp-server and the mcu manager subsystem to our custom folder.
    2. Modify the mcumgr over Bluetooth (smp_bt.c) because we want to intercept the ble packets and put them into a queue for sending over SPI to the other MCUs for the FOTA.

    Besides, the file transfer over SMP will be used to update two external flashes, so we need to modify that in the mcumgr too.

    What's your opinion about whether that roadmap is feasible? Do you have any suggestions for improving that? 

    Thank you!

  • Hi,

    I believe it is feasible, but I will have to add a disclaimer that I can't give you any guarantees that this is the best approach since it is up to you and the company to evaluate the design of your project properly. But as mentioned, from what you explain to me, I believe this will work, specially if you dissect the samples I've sent you and understand how they transport the update image from one MCU to external MCUs.

    One note that you probably already have thought about is that you will have to ensure when you store up the packets in the queue is that you know which device is going to receive this image, so that you send the data to the correct external flash device.

    Kind regards,
    Andreas

Related