I have tried search but haven't found anything.
Is there any way to detect the nearest Bluetooth device?
I have made code like this:
It return time how long it takes to connect to Bluetooth device with that address. Point is that it errors because of number 5.Code:x = time() try: b = socket.socket(socket.AF_BT, socket.SOCK_STREAM) b.connect((address,5)) b.close() except: q = 1 y = time() return y-x
However this takes very long time.. especially if Bluetooth device isn't in area.
I have tried make it stop connecting after X seconds but without success.
Thanks in advance.

Reply With Quote


