Running multiple server instances on standalone hub

11 views
Skip to first unread message

jope...@hotmail.com

unread,
Sep 20, 2020, 9:34:34 PM9/20/20
to Rhythm Badges
I was wondering if a standalone could run multiple instances of the standalone "server" at the same time. If I am correct, one hub can only manage around 20 badges which I assume is most likely due to bluetooth not being able to access different badges fast enough.
So if I install multiple bluetooth dongles to the computer and pair them for each instance accordingly, would I be able to run for example 4 instances on one machine?
Of course, the data would be in four different files but as this would be analyzed at later date, this is fine.
I will try this tomorrow as my current development computer is having issues with bluetooth again.

Oren Lederman

unread,
Sep 20, 2020, 9:50:23 PM9/20/20
to jope...@hotmail.com, Rhythm Badges
Multiple hubs, or multiple servers? A single server can handle dozens of hubs sending data.
A single hub can handle about 20 badges (download the data fast enough). If you don't need audio data, you can modify the code not to turn on collection and then it can handle many more badges.
As for running multiple instances of the hub on a single machine - it's not likely to work because of locks on the Bluetooth driver, but I'm not sure. If it does work, you'll probably see a lot of failures when multiple hubs are trying to scan at the same time or connect to a badge at the same time. 
We had an experimental code at some point that used multiple threads to connect to (up to ) 4 badges at the time. It mostly worked, but you can only have one thread attempting to connect at a time. Once connected , you can have 4 or 8 connections (there's a limit, can't remember exactly what it was).

Ideally, you'd have a producer-consumer code, with the producer running scans, and consumers trying to connect the the badges it finds. We ended up not doing that because it was easier for us to get more raspberry pis than getting this code working well enough. 



--
You received this message because you are subscribed to the Google Groups "Rhythm Badges" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rhythm-badge...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rhythm-badges/15ede462-0707-45ab-9e1b-0fd69a9e1f9fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages