Selecting the PC Bluetooth peripheral #123
-
Hi, if in my PC I have more than one Bluetooth peripheral (e.g. the built in one and an extra USB dongle), is it possible to select the one I want to use with Bless? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
On Linux at least, when the name of the adapter is not specified, bless/bless/backends/bluezdbus/dbus/utils.py Lines 79 to 81 in bd0bdf0 One can specify the controller by setting the server = BlessServer(name=my_service_name, loop=loop, adapter="hci1") The list of adapters you can get via the |
Beta Was this translation helpful? Give feedback.
-
@alessandrotoniolo did @vladak 's solution work for you? Your original idea of simulating both peripheral and server is interesting and may depend on how many independent BLE modules you have on your system. I would imagine this is feasible if you have more than one. |
Beta Was this translation helpful? Give feedback.
On Linux at least, when the name of the adapter is not specified,
hci0
will be used:bless/bless/backends/bluezdbus/dbus/utils.py
Lines 79 to 81 in bd0bdf0
One can specify the controller by setting the
adapter
parameter of theBlessServer
initializer, e.g.:The list of adapters you can get via the
hcitool dev
command.