Replies: 2 comments
|
Cool, thanks. I actually have a working BLE SPP using the new BLE class I'm writing in the PR. It was my way of testing if the new class structure had all the functionality I needed (and since I had to start from scratch, it was really an iterative process). https://github.com/earlephilhower/arduino-pico/blob/99ca2e53fcaa40ad873ff17ffc5e4e6410bba13b/libraries/BLE/src/BLEServiceUART.cpp I also made it work like a real serial port (implementing arduino::hardwareSerial) and had it do stuff like buffer and flush automatically after a configurable timeout so you can use it like I still think it's an awful way to implement a UART but I guess it's good enough for small messages and I know people do use it. The BT Implementers forum specifically didn't include a standard "serial" service (and they made a LOT of standard services) because they wanted folks to make their own custom services/characteristics per use case instead of shoehorning everything into a virtual UTF-8 stream. |
|
I will continue working on this as a library, since my application has specific needs and I don't want to drive you crazy supporting them. For example, when I run a scanner to find the device, the scanner needs to report the advertising string. With BTStack, this is not a given. Claude had to come up with a couple of versions before it started working. Once you publish the BLE support, I will take a look and, if it meets my needs, I will be happy to use it; until then, I will continue on my own path. BTW, the advantage of the Nordic BLE service for me is that the user does not have to pair anything. My client looks up the advertisement and then connects. The data transfers are fairly short, so my solution is tailored to my application. Thanks for all the effort. |
Uh oh!
There was an error while loading. Please reload this page.
Hi Phil,
I see you are working on BLE UART support in the BBB branch. I do not know if you have things working yet, but I have a working sketch that connects to nRF Connect and passes data. I am attaching the code. Click on the link and it will download. Please feel free to use the code if it is at all helpful. FYI, I used Claude to create the code. This is an .ino file even though it has a .c extension.
BLE Nordic UART Service.c
All reactions