I want to discover Bluetooth devices without devices that already I have already paired. But my python script shows the Bluetooth device that are ON + the device sthat I have paired with. How I can filter just devices that are ON and ignore the paired devices from PC without deleting them.
This is my script
import bluetooth
def search():
devices = bluetooth.discover_devices(duration=1, lookup_names = True)
return devices
if __name__=="__main__":
while True:
results = search()
if (results!=None):
for addr, name in results:
print ("{0}".format(name))
print ("{0}".format(addr))