Arduino-HardwareBLESerial icon indicating copy to clipboard operation
Arduino-HardwareBLESerial copied to clipboard

STM32WB5x support, arduino Print class & host capability

Open thijses opened this issue 1 year ago • 0 comments

i wanted to use this nice library for a project using an STM32WB55, which only took a few lines ('STM32duinoBLE library) then i decided to implement the Arduino Print class inheritance (mostly for fun) then i needed two STM32WB55's to talk to each other, so i added a host-mode (which is really what prompted me to make this pull-request. I think it's pretty useful to have a simple library for basic 2-way communication between microcontrollers using BLE. It's something i've used BT classic (using an ESP32) for several times).

The code needs a critical eye, probably some reformatting (if you want) and perhaps an update of the README, but it does at least appear to work (on my machine ;) ). The dependence on the STM32duinoBLE also comes with the requirement of having the right BLE stack flashed, so a reference to those instructions might be wise. One notable issue i'm still investigating is that BLE and I2C on the STM32WB55 don't seem to mix very well. Long I2C operations can kill the BLE connection, so there's probably an interrupt/subroutine blocker in the I2C code somewhere.

thijses avatar Oct 16 '23 08:10 thijses