Zephyr Bluetooth DFU Emulation (NRF52840) #81521
Unanswered
vChavezB
asked this question in
Show and tell
Replies: 2 comments
-
Absolutely incredible to be able to end-to-end test a DFU in an emulated environment! Including the bootloader and swap! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just some updates on my side.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been testing out the
bumble
HCI Controller Stack from Google with Renode and Zephyr. I made a proof of concept to emulate completley DFU over a virtual HCI Controller (bleak +bumble) with renode.My use case for this application is to develop high level functional tests for custom DFUs with MCUBoot.
Wanted to show a short demo of the application. On the left side is the zephyr logs from the emulated firmware on renode. On the right side I am using pyrenode +
smpclient
to communicate with the Zephyr SMP Server. The demo connects to the Zephyr SMP server, sends an image for upgrade, and resets the emulated board. Afterwards MCUBoot does the swap and then I check that the image has been changed.zephyr_bumble_renode_demo.mp4
The main advantage of this setup is that I can emulate the firmware on pipeline and require no hardware (nor BlueZ) as I use bumble as the HCI Controller stack (python). As I am using Bleak as my BLE frontend, the code is reusable and works with real and virtual hardware (renode). I will attempt to make it work with Android Emulator as I would like to do functional tests of a an Android App as SMP Client.
To make this work I developed a bumble backend for bleak and added support for the Flash controller of the NRF52840 in renode. In theory it should be doable to test this with other Zephyr boards as long as they have a UART (perhaps USB ?) that can be used as HCI Transport. Then in renode I expose the emulated HCI UART over a socket and connect it to Bumble (via Bleak).
Beta Was this translation helpful? Give feedback.
All reactions