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?
It should be possible, yes, if you change the nrfutil source code from communicating with an nRF dongle over serial to using the native BLE support of the OS. As long as the OS supports BLE 4 there should be no technical restrictions that prevents you from doing something like that. As for the amount of work required it is difficult to say.
The reason for nrfutil not using native OS support for BLE, is mainly that the project was started at a time when such support was virtually non-existing. Still today there are systems out there that lack native support, and we are using the proven and tested transport relying on dongles.
Thanks for the reply! I have already checked the source, but there was some things I couldn't directly translate to simple BLE communication (like the SoftDevice triggered events) and that's why I'm asking. Will dive further in to the source then.
I see. For BLE transport for DFU, nrfutil builds on pc-ble-driver-py, which is serialization of our SoftDevice (BLE stack.) Therefore what you see is the SoftDevice API.
If this is of interest to anyone you can follow the progress here: https://github.com/5frank/pc-nrfutil in the branch 'os_ble'.
I just made a successful DFU upgrade on linux. The BLE lib used is crossplattform so should work on windows and MacOS but this not (yet) tested.
Thank you for sharing!