Python Forum

Full Version: Python BLE Scanner not detecting device
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I wrote a program that is supposed to recognize a skin-care device via Bluetooth. Upon scanning the skin, the device will send the data of someone's skin to the terminal.

Here is the code that I have so far:

import bluetooth

nearby_devices=bluetooth.discover_devices(lookup_names=True);

for addr, name in nearby_devices:
    print("Name = ", name)
    print("Address = ", addr)
This is just the first part of the project.

Here is the problem:
The first time I ran the code, the program did read a device, but it was not the address, nor name of the skin-reading device. The second time I ran it, the program DID NOT detect any devices at all.

I turned on the skincare device, and the Bluetooth was active, so my "Bluetooth and other device settings" could read it. Oddly, the program that I wrote did not recognize it at all.

Did I miss something?