import bluetooth as bt
nearby_devices = bt.discover_devices(lookup_names=True)
print("Found {} devices.".format(len(nearby_devices)))
x = int(1)
bluetooth_devices = []
for addr, name in nearby_devices:
new_device = ("{} - Address: {} - Name: {}").format(x, addr, name)
bluetooth_devices.append(new_device)
x += 1
Hi, I am trying to scan the available devices and print them out using pybluez2 but I am not got any success so far. However, there is no error either as It just print : 0 device available
Here is the code i am using:
I want to scan and print the available devices and i am using pybluez2 as pybluez is throwing some error which I was unable to solve so far.