arduino-libraries/ArduinoBLE

BLE Serial Example

hongkai0818 opened this issue · 10 comments

Hi Possible to add an example on ble serial similar to
https://github.com/sandeepmistry/arduino-BLEPeripheral/tree/master/examples/serial

Thanks

@tigoe any opinions on this?

tigoe commented

I don't love the idea, since BLE isn't serial, and it's confusing to users who think it should show up on their laptop/desktop machines as a serial port. Unless you have an app to pair it with that'll provide a "serial" connection, I think it'll only be confusing.

OTOH, if BLE 4 and 5 now supports real serial, and it can actually show up as a COM port on MacOS and Windows and Linux without having to modify the central device's OS, I am all for it.

Hi, thanks for your reply.
The reason I was asking that is because I have previously explored NRF52DK and Bluefruit NRF52. Both SDK provides examples on both BLE central and peripheral that are exposing to BLEUART (NUS). Current examples in the arduinoBLE do not have the BLEUART example using NUS. That might be good to add BLEUART examples in the future release of the library.

Is it even possible to create a serial connection via regular BT 5 on the nano 33 ble sense?

I'm currently searching for a way to Transfer bulk data and had no luck so far :(

Just asking, because if BLE is the only (recommended) way, a tutorial would be nice..

tigoe commented

Well... I'm building a data logger for model rockets...
The Arduino nano 33 Sense had the perfect fit for me, but i thought that BLE might be the best idea to get the data from the Arduino after recovery...

so we're talking about not more than a few KB if done correctly i think.

I'm currently experimenting with the notification feature to push the values through, but it feels like im abusing it...

tigoe commented

one last question (and i know i'm abusing this topic right now :D)

I have a struct for my logging data points - BLECharacteristic are typed... the largest thing i can get is BLELongCharacteristic or something like that, but I want to transfer my struct as a byte array...

how would I manage that?
I think, there will be others with this problem...

tigoe commented

Thank you all for your help - got it all working.

For anyone who is interested - my code is in https://github.com/adastra-rocketry/adastra-telemetry/tree/master/ArduinoNano33BLESense/Telemetry