I need advice for building a bandwidth-optimized link over BLE #4001
Replies: 1 comment
-
Posted at 2022-04-15 by @allObjects If your setup works for the uplink, could a parallel - independent - same-setup work for the downlink as well? Of course, this means doubling the BLE devices per sensor location and make the pairs talk to each other as well as on the data collecting side a peer for broadcasting the commands? It reminds me of the old days - not so long ago - when browser communication was kind of a one-way initiation. Long polling on separate connection and related protocols were the answer to overcome the technical limitations. Posted at 2022-04-15 by @allObjects addendum re protocols - google it. Used it before sockets were available. Roundtrip times were amazing despite the http overhead. Almost real time I could control the (trojan horse modified) firefox browser... or less intrusive, talk to single page app in another browser over the internet via a nio tomcat / getty server in the internet.
Posted at 2022-04-19 by @yerpj Hi @allObjects, thanks for your inputs. Posted at 2022-04-19 by @fanoush
the easiest may be the nordic uart already used for espruino console, you can just print values to console as json data - that's how gadgetbridge connection with phone is done on bangle.js too. x,y,z every 500 (or even 100) ms does not need any kind of bandwidth optimization as currently single BLE packet can hold about 50 bytes of data you may be limited in how many concurrent connections the central device can handle, if this is an issue then advertising may be better/easier as there is no connection with that Posted at 2022-04-19 by @allObjects I was not expecting BLE to do HTTP. It is more about what you got out of it: inspiration by the solution pattern of using for the 'down/command direction' what works for the 'sensor data collection direction'. Posted at 2022-04-20 by @gfwilliams
I'd advise this too. It's just super easy, and Espruino handles this more efficiently than a custom BLE service. If you're looking at x/y/z every 500ms bandwidth isn't going to be much of an issue for you at all though :) Posted at 2022-04-20 by @yerpj Thanks everyone for your inputs!
For one Puck.js it seems definitely to be the best way to go, however I would like to have let's say 5 or more Pucks running simultaneously, and 500ms is a minimum. I did not explain well what I was trying to do: I would like to build a 3d motion sensing platform, a bit like what they use in film-making for motion capture. I am unsure of the precision I will get but it is worth a try. At first I was thinking of using a Raspberry Pi as a central device, able to establish several connections simultaneously, but I would also love to try and evaluate the performance of an Espruino device as a central device, if the feature is being added to the firmware at a given time ;-) Posted at 2022-04-22 by @gfwilliams Ahh, that sounds like a great idea - if you're looking at a bunch of sensors then you may end up limited to using Bluetooth advertising though. Not that it's such a bad option - it's quite nice not needing to pair the devices... I think the max connected devices is 6 or 7 on most PCs, and if you have a bluetooth mouse/keyboard/headphones that eats in to that number... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-04-14 by @yerpj
Hi there,
For a project, I would like to use several Puck.js devices acting as wireless sensors. A computer would serve as the BLE central device, collecting the data.
So far so good, anyone would advise me to use broadcasting, and it would be fine as long as data quantity to be sent is kept low. But I would like to send as much datapoints as possible, like x,y and z acceleration for each Puck.js every 500ms or more if possible.
For such a use-case which BLE profile would you advise me to use? I originally thought of HID profile with binary data encoded in base64, but I also need downlink to send command to the Pucks.js.
If anyone has a clue about which BLE profile would best address my needs, I would love to hear about!
In the meantime, I wish you all a happy Easter.
Beta Was this translation helpful? Give feedback.
All reactions