""" filters the objects based on their support """ commodity to apply an interface to a proxy object """ĭef filter_by_interface(objects, interface_name): With the bus take place throught the ObjectManager.GetManagedObjects import dbus Since the adoption of the version 5 of the Bluetooth API most of the functions used in the solutions were dropped and the interaction If anyone has got some code to share I would be really happy. Įdit: I think DBUS might be what I should be reading up on. Still don't know how to do this in Python. I've checked the C source, found out that this might not be as easy as I thought it would be. Probably because they are not discoverable once paired: import bluetoothįor d in bluetooth.discover_devices(flush_cache=True):Įdit: I found and installed "bluez-tools". Much like the list I'm getting in All Settings -> Bluetooth in Ubuntu/Unity.ītw, the following does not list already paired devices on my machine, even if they are on/nearby. The "only" thing I need right now is to be able to list already paired devices, whether they are on, off, nearby or not. "If no criteria are specified, then returns a list of all nearby services detected." Reading the PyBluez docs I would expect any nearby device to show up if I don't specify any criteria: I know how to list services for a device using its address, and can connect successfully: services = bluetooth.find_service(address='.') I'm trying to list all nearby/discoverable bluetooth devices, including those already paired, using Python on Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |