aioble examples for multiple peripherals #12674
Replies: 3 comments 5 replies
-
You have to at least configure the bluetooth stack you are using to support more than one device. Then you have to allow the scanner to restart after connecting as the scanner is stopped during connection. I do this by connecting, doing some basic things that all devices need like service discovery, reading the DIS, CTS, and Battery service, and then creating tasks to handle the device-specific stuff. After the task is created I exit the connection method allowing the scanner to restart. |
Beta Was this translation helpful? Give feedback.
-
It was a challenge figuring out how to build MP. I hope your communications don't need (Bluetooth) pairing. That's a whole new level of headache as pairing is not supported for the PICO_W in the MP distribution. You will have to do a significant amount of coding in modbluetooth_btstack.c and related files. |
Beta Was this translation helpful? Give feedback.
-
Hopefully not, I rebuilt MP for two connections, is there a big memory hit for adding more? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been having some weird issues trying to connect to multiple devices at once. I expect that it should work, but I'm not all that comfortable with the way I'm doing the connections.
It would be really helpful to have a version of the temp_client example that can connect and read from as many temperature sensors are nearby to show the idiomatic way to do device management. If there's any factors that would affect the number of simultaneous connections, it would be very helpful to have a pointer to those as well.
Thanks,
Simon
Beta Was this translation helpful? Give feedback.
All reactions