Bluetooth on Lopy4 doesn't detect any device



  • Hello everyone, I'm trying to work with bluetooth on lopy4 and first I used this code from https://docs.pycom.io/chapter/tutorials/all/ble.html

    from network import Bluetooth
    bluetooth = Bluetooth()
    bluetooth.start_scan(-1)    # start scanning with no timeout
    while True:
        print(bluetooth.get_adv())
    

    Just to see how it works but it doesn't detect any bluetooth, I already tried with many devices: Iphone, Samsung, Huawei and even laptop, however the problem persists, all I get on the terminal is:
    None
    None
    None
    None
    None
    I don't understand why is not working this code from the documentation and I hope someone could know something about it.



  • Hi @AlejandroReyes,
    I've just tried this code and managed to find my BT headphones with it. The issue could be that your devices don't use BLE, so the LoPy board couldn't find them. Currently, only BLE is supported. You can find more on this on the Bluetooth docs page.

    Let me know if this helped!


 

Pycom on Twitter