How to load a big file in the flash memory ( a binary file)

Hi,

I want to transfer an app_update.bin file from a pc linux to a dongle usb nrf52840. I tried to use the shell command flash load with dd :

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/shell/fs/README.html

But i have always a loss of a thousands of bytes more or less....

I want to transfer this file to be able to update an other nrf52840dk over BLE with my dongle (i use smp_services to do it). I succed to update the nrf52840 but i used loadbin to transfer the file app_update.bin. For my developpement i need to be able to ttransfer the file over usb, could you help me ? is there another way to do it ?

Maybe mcumgr ?

I don't find any example for doing this kind of operation... But it's critical to be able tio update a device nrf52840 with another nrf52840,, i really need help to succed in it

Best regards,

Pierre-yves

Parents Reply
  • Thanks you for your replay!

    My linux does not have a build-in Bluetooth Controller, and my dongle nrf52840 have another soft that is needed, shell command bluetooth to be able to do the same as pc-ble-driver with nrf connect sdk. I had some command in the soft as command for smp protocol central and i succed to upload another device nrf52840 with it.

    But i have probleme in loading the binary file in my central device that have already a software. Do you think it's possible to add hci_usb sample  in my software tio be able to use it as a simple dongle to launch this command ? or do you have anpother idea ?

Children
  • Hi,

    mcumgr takes care of uploading the new image to the other device. If you need to do other things over BLE, then I recommend looking into bluetoothctl.

  • My linux does not have a build-in Bluetooth Controller, i can't use bluetoothctl.

    I understand that mcumgr upload it in the other device but the reason why i want to load a file in my nrf52840 is because i use it with a software as a central BLE device.

    For a transfer, can i use my device as a nrf52840 dongle if hci_usb is not flash in it ?

    I fit's not possible how to load a big file in the nrf52840 ? to be able to upload it with this device after..


    i want to update a nrf52840 with another nrf52840 not with another system...

  • Piwy said:

    My linux does not have a build-in Bluetooth Controller, i can't use bluetoothctl.

    But the dongle does.

    Piwy said:

    I understand that mcumgr upload it in the other device but the reason why i want to load a file in my nrf52840 is because i use it with a software as a central BLE device.

    For a transfer, can i use my device as a nrf52840 dongle if hci_usb is not flash in it ?

    You can combine the functionality of the hci_usb sample with your application.

Related