Skip to content
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

Update connection command to include optional interface to use #84

Closed
jspaletavert opened this issue Nov 19, 2015 · 2 comments
Closed

Comments

@jspaletavert
Copy link

I'm working on a situation where I'm going to be connecting to upto 20 devices and I want to spread them across 3 or 4 bluetooth adapters. bluepy won't let me select which adapter to use yet.

So I did a little digging and I think I can patch it in quite easily. Here's my plan:
opt_src is always set to NULL in gatt_connect() right now

Instead what I would like is for the conn command to take an additional optional string for the interface to use hci0 hci1 etc... to set the opt_src in the gatt_conn call.

I'm going to make this an optional argument to the conn command so that the default behavior stays the same.

@IanHarvey
Copy link
Owner

I've taken your code and it's now merged on to master with a few bug fixes, along with calandoa's scanning code.

You can now take scan results (the ScanEntry object) and pass it direct to Peripheral's constructor, to make a connection to a device you just scanned. The ScanEntry object keeps a note of the interface being used for the scan, and passes it to Peripheral.connect(), so it ought to work seamlessly.

@kg-meso
Copy link

kg-meso commented Feb 16, 2023

This important feature seems to be failing, see issue #501

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants