Add support for multiple adapters/more than 8 controllers.#13
Add support for multiple adapters/more than 8 controllers.#13adangert wants to merge 1 commit intoJonty:masterfrom
Conversation
One main problem with not being able to use more than 8 controllers at once was the fact that each adapter can only handle about 6-7 controllers. The move.pair() function seemed to always just pair controllers to the default adapter, thus filling up a single hci device in /var/lib/bluetooth This change loops through all of the connected adapters as seen by hciconfig, and pairs the move controller with the adapter with the smallest connected controller count using the move.pair_custom() function. Thus allowing for an even spread among the different bluetooth adapters. also removed the dev in scan_enable, since hciconfig dev, doesn't seem to list out all of the connected adapters, while hciconfig by itself does
|
I actually implemented this at 33C3, which was super-tricky as it is both the most 2.4ghz-congested place in Europe and I discovered that I had three bluetooth adapters all with the same MAC address 🙃 Bluetooth only allows for 7 connections per host, and I've found that many adapters don't even allow for that. The proper CSR adapters seem to be best but even they need I too ran into the bluetooth restart problem and narrowed it down to an issue with the interaction between I'm going to leave this PR open as I can't really merge something that is known to be unstable. Hopefully we can both work through the problems and come to a solution! |
|
yeah it very well might be the psmoveapi, I'll try installing the newest version on a pi3 to see if that helps at all. Also when I've gotten the internal bluetooth to work, it's very slow and laggy as well. use these commands to disable the internal bluetooth on the pi3 |
One main problem with not being able to use more than 8 controllers
at once was the fact that each adapter can only handle about 6-7
controllers.
The move.pair() function seemed to always just pair controllers
to the default adapter, thus filling up a single hci device in /var/lib/bluetooth
This change loops through all of the connected adapters as seen by
hciconfig, and pairs the move controller with the adapter with the
smallest connected controller count using the move.pair_custom() function.
Thus allowing for an even spread among the different bluetooth adapters.
also removed the dev in scan_enable, since hciconfig dev, doesn't seem
to list out all of the connected adapters, while hciconfig by itself
does
When testing this on my Pi2 there also seems to be some issues with the bluetooth service restarting
sometimes with multi-adapter use, I'm not sure what the problem is
as I've been able to connect 16 controllers to the pi successfully before.
Using a single adapter seems to still be stable as it was before, It might be good to try
loading oust manually rather than from the image to see if that helps, as well as loading it up on a pi3