aws transport for dfu

I currently have a board using  a nrf52840 that has a reliable connection to AWS via a Quectel BG95.

I have DFU implemented and working via Bluetooth with config settings 

CONFIG_BOOTLOADER_MCUBOOT=y

CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP
I'd like to replace the Bluetooth transport with my AWS connection.
I'm  using SDK v2.6.0.
Could you please point me to a starting place to research this?
Parents Reply Children
  • I've made some progress.

    The firmware I want to install is app_update.bin (stored in build/zephyr after a successful build)

    I have built and fully tested firmware and associated server software that will reliably download the app_update.bin from the AWS cloud to my board

    It looks like the DFU Target library is perfect for what I want to do - which is

    1. initialize the target (dfu_target_init())

    2. Download my fiemware - using dfu_target_write() to move each block of downloaded data into the mcu_boot_secondary partition.

    3. finalize the download with dfu_target_done.

    4. Stage the update with dfu_target_schefule_update().

    5. Reboot

    I've modified my build to use static partitions (I copied build/partitions.yml to pm_static.yml)

    Currenty my prj.conf has 

    CONFIG_BOOT_SIGNATURE_KEY_FILE="C:\\Users\\kover\\HomeSmart\\VScod\\RSAKEYS\\privatekey.pem"
    CONFIG_FLASH=y
    CONFIG_IMG_MANAGER=y
    CONFIG_STREAM_FLASH=y
    CONFIG_STREAM_FLASH_ERASE=y
    CONFIG_FLASH_MAP=y
    CONFIG_IMG_ERASE_PROGRESSIVELY=y
    CONFIG_DFU_TARGET=y
    CONFIG_DFU_TARGET_MCUBOOT=y
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_MCUBOOT_IMG_MANAGER=y
    I currently have two issues.
    1. I want to properly sign the firmware/mcu boot with a private key using  CONFIG_BOOT_SIGNATURE_KEY_FILE
    When I do a pristine build i get
    CONFIG_BOOT_SIGNATURE_KEY_FILE couldn't be set. Missing dependencies:
    !MCUBOOT_BUILD_STRATEGY_FROM_SOURCE
    In the Build Problems.
    Note thaat I've tried adding 
    CONFIG_MCUBOOT_BUILD_STRATEGY_FROM_SOURCE=n
    to prj.conf, but I get the same warning.
    2. When my application tries to init the DFU target with
     i=dfu_target_init(DFU_TARGET_IMAGE_TYPE_ANY_APPLICATION,0,filesize,&target_cb);
    -19 (-NO SUCH DEVICE) is returned.
    Any help you can give me woud be greatly appreciatted.
Related