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

nrfutil with the builtin BLE interface?

I am trying to determine if it is possible to implement a "OS native" BLE transport layer for nrfutil. That is, use the Bluetooth interface the machine and remove the need for a "nrf dongle". (On Linux to begin with). Before I waste to much time on it, can someone please tell me if this is even possible? As there is both a iOS and Android DFU app I guess it is? Unless there is some required BLE feature present in the iOS/Android API:s that is not present in the Windows/MacOS/Linux API:s? Perhaps someone already researched the topic and could share their findings?

Parents Reply Children
  • Hi,

    I am also interested to have nrfutil running with native BLE on Linux, on my MAC that use BCM2046 running Ubuntu 18.04 and on my raspberry that use Debian Buster.

    On both the bluetooth interface available is hci0.

    I installed your pc-nrfutil (os_ble-6.1.0) branch on my linux but I have some questions:

    which is the port that need to be used on nrfutil command?

    Bluetooth is associated the hci0 interface. If i run the command:

    nrfutil -v dfu ble -ic NRF52 -a "D2B307388F02" -p hci0 -pkg pkg_app_v1_1_5.zip


    Traceback (most recent call last):
      File "/usr/local/bin/nrfutil", line 8, in <module>
        sys.exit(cli())
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 829, in __call__
        return self.main(*args, **kwargs)
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 782, in main
        rv = self.invoke(ctx)
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1259, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1066, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 610, in invoke
        return callback(*args, **kwargs)
      File "/usr/local/lib/python3.6/dist-packages/nordicsemi/__main__.py", line 1155, in ble
        is_jlink = port_is_jlink(port)
      File "/usr/local/lib/python3.6/dist-packages/nordicsemi/__main__.py", line 1092, in port_is_jlink
        raise NordicSemiException('Board not found')
    pc_ble_driver_py.exceptions.NordicSemiException: Board not found

    If I run the command using the nrf52840 dongle, it works fine:

    nrfutil -v dfu ble -ic NRF52 -a "D2B307388F02" -p /dev/ttyACM0 -pkg pkg_app_v1_1_5.zip

    Thanks for any sugestions

  • Hello! The os_ble branch is currently in a rather dirty state and commands not implemented. You can try the following:

    ```

    cd pc-nrfutil

    python3 nordicsemi/bleak_dfu_cli.py $DFU_ADDR $NRF_ZIP_PKG_PATH

    ```

    where `$DFU_ADDR` is the BLE address (assumes device already in DFU.)
    you also might need to append `pwd` to PYTHONPATH.

Related