This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I need use DFU on Linux embeded , how can I do ?

Hi 

I am developing  RX device to connect with Smart Remote 3.  

The RX device system is  Linux embedded. I need to run OTA function in Linux embedded to  update SR3 F/W.  

I already get this link as below, but i don't know how to operate it. Is there any manual, or instructions?

https://github.com/NordicSemiconductor/pc-nrf-dfu-js

Sincerely,

Johnny

Parents
  • For anyone landing here from a search: this works on embedded Linux today —
    and note that pc-nrf-dfu-js has been archived since 2022.

    We built a small Go CLI for this, primarily for our own production test
    benches:

    github.com/.../ed-nrfdfu

    It talks to BlueZ over D-Bus and runs Nordic Secure DFU over BLE from the
    terminal. Single static binary, no runtime and no system dependencies — you
    copy one file onto the target and run it. We publish linux/amd64 and
    linux/arm64 builds.

        ed-nrfdfu --mac "AA:BB:CC:DD:EE:FF" --dfuPath firmware.zip
        ed-nrfdfu --bleName "MyDevice_DFU" --dfuPath firmware.zip

    Where it fits: it does the job on a production bench, running unattended in
    a script. It is an experimental tool though, not a certified production
    component — but it is Apache 2.0, so it is meant to be forked and adapted
    rather than taken as is.

    If you are tight on flash, it compresses well:

        CGO_ENABLED=0 go build -trimpath -ldflags "-s -w"
        upx --best --lzma ed-nrfdfu

    That takes it from ~15 MB down to ~3 MB here. Worth knowing that UPX
    decompresses into RAM at startup, so it trades memory for flash — usually
    the right trade on a board with more RAM than storage, not always.

    One prerequisite: it expects the device to already be advertising in
    DFU/bootloader mode. It does not trigger the buttonless transition from
    application firmware.

    Linux/BlueZ is what we run daily; the macOS and Windows backends are
    implemented but not yet validated on real hardware.

Reply
  • For anyone landing here from a search: this works on embedded Linux today —
    and note that pc-nrf-dfu-js has been archived since 2022.

    We built a small Go CLI for this, primarily for our own production test
    benches:

    github.com/.../ed-nrfdfu

    It talks to BlueZ over D-Bus and runs Nordic Secure DFU over BLE from the
    terminal. Single static binary, no runtime and no system dependencies — you
    copy one file onto the target and run it. We publish linux/amd64 and
    linux/arm64 builds.

        ed-nrfdfu --mac "AA:BB:CC:DD:EE:FF" --dfuPath firmware.zip
        ed-nrfdfu --bleName "MyDevice_DFU" --dfuPath firmware.zip

    Where it fits: it does the job on a production bench, running unattended in
    a script. It is an experimental tool though, not a certified production
    component — but it is Apache 2.0, so it is meant to be forked and adapted
    rather than taken as is.

    If you are tight on flash, it compresses well:

        CGO_ENABLED=0 go build -trimpath -ldflags "-s -w"
        upx --best --lzma ed-nrfdfu

    That takes it from ~15 MB down to ~3 MB here. Worth knowing that UPX
    decompresses into RAM at startup, so it trades memory for flash — usually
    the right trade on a board with more RAM than storage, not always.

    One prerequisite: it expects the device to already be advertising in
    DFU/bootloader mode. It does not trigger the buttonless transition from
    application firmware.

    Linux/BlueZ is what we run daily; the macOS and Windows backends are
    implemented but not yet validated on real hardware.

Children
No Data
Related