-
Notifications
You must be signed in to change notification settings - Fork 216
BLE Serial Example #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@tigoe any opinions on this? |
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. |
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.. |
How big is "bulk"? If I remember correctly, BLE transfers data in
something like 20-byte packets, so for something like a file transfer,
you'd need to break it up into those chunks. If you were making a file
transfer API, you'd make it break the file up and packetize it. OTOH, if
you're talking about transfer of sensor data where each reading or group of
readings is less than 20 bytes total, it's no problem. The BLE spec would
have you make a characteristic for each sensor reading, and that's what's
easiest in the API, but you could presumably make a string or array with a
bunch of numbers in it. That's how BLE MIDI works, for example.
…On Thu, Sep 19, 2019 at 3:45 PM Christoph Kretschmer < ***@***.***> wrote:
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 :(
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19?email_source=notifications&email_token=AAC45HY2KQZT56ACKJFPELTQKPJFRA5CNFSM4ISWZMG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7ETOHI#issuecomment-533280541>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC45HYJSV5HZHHXUZYXIKLQKPJFRANCNFSM4ISWZMGQ>
.
|
Well... I'm building a data logger for model rockets... 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... |
That's pretty much what notification feature is for, so don't worry about
it.
T
…On Fri, Sep 20, 2019, 5:14 PM Christoph Kretschmer ***@***.***> wrote:
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...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19?email_source=notifications&email_token=AAC45H3NPSVHL2UOQN7RQ73QKU4MLA5CNFSM4ISWZMG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7H4R7A#issuecomment-533711100>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC45H6GZ2K5OVBHFLSMRJTQKU4MLANCNFSM4ISWZMGQ>
.
|
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? |
Check out the ble midi examples in @sandeepmistry, @don, and
@alasdairallan's book "make: Bluetooth". They use byte arrays. Here's an
example derived from them:
https://github.com/tigoe/SoundExamples/blob/master/MIDI_examples/ArduinoBLEMIDI/ArduinoBLEMIDI.ino
…On Fri, Sep 20, 2019, 6:04 PM Christoph Kretschmer ***@***.***> wrote:
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...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19?email_source=notifications&email_token=AAC45H5TKPHMY4QQJURO4YLQKVCH7A5CNFSM4ISWZMG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7IABIA#issuecomment-533725344>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC45H6SBGJQGYGPJEA7XY3QKVCH7ANCNFSM4ISWZMGQ>
.
|
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 |
Hi Possible to add an example on ble serial similar to
https://github.com/sandeepmistry/arduino-BLEPeripheral/tree/master/examples/serial
Thanks
The text was updated successfully, but these errors were encountered: