(04-22-2020, 07:39 AM)patchedsoul Wrote: What are your thoughts on using uBluetooth and NimBLE so this thing is 100% open?
I'm a big fan of MicroPython and really tempted to lend a hand with wasp-os, but the use of Nordic's softdevices bums me out.
What are your thoughts?
Pretty much the same as yours
.
I'd really prefer to be using an open source BLE stack but the combination of easy to adapt bootloaders and a pre-existing MicroPython port meant using SoftDevice allowed me to get the Python code running so much quicker. In the end I concluded that given MicroPython effectively acts as a HAL there was no point in switching away from SoftDevice immediately... The situation is not perfect but there is no technical debt accumulating related to BLE: it is not *harder* to port MicroPython to NimBLE (or any other BLE stack) than it was when I started wasp-os!
Anyhow there are a couple of options for designing out the SoftDevice.
1. Bring up the Zephyr or MyNewt ports of MicroPython on the watch and then do the small amount of porting required to bring up wasp-os on that. In either of the above scenarios it isn't really geting wasp-os runnig that is the hard bit. The hard bit is replacing wasp-bootloader with something equally robust. To be honest the bootloader is the key component that has made the PineTime fun for me to hack on! Having something that allows me to confidently load *untested* payloads at my watch without really worrying about bricking it it awesome.
2. Bring up NimBLE on bare metal doing all the internal scheduling from a timer interrupt and passing on any unexpected interrupts to the application (in other words develop a NimBLEDevice that provides the same runtime mode that SoftDevice does). From there both MicroPython and wasp-bootloader can be ported to the NimBLEDevice
If I were doing the work I'd be inclined to adopt MyNewt and modify mcuboot a bit so it can exploit the SPI flash (e.g. main image in nRF flash, upgrade image in SPI flash and an emergency NimBLE OTA image in SPI flash that mcuboot copies over the main nRF flash if a button is pressed during boot). The main reason I would take this approach is because it is best for the PineTime community! The resulting bootloader would become neutral on what BLE stack the application uses meaning many different firmwares could use it. There would also likely be improvement found for @
lupyuen 's MyNewt port which would be cool too.