LoPy4 BLE server



  • Hi,
    I am trying to make an LoPy4 BLE server.
    I need to connect to my lopy with my phone and control leds from an application that I made.
    How can I do?
    I tried with Bluetooth.service() and Bluetooth.advertise()

    Thanks.



  • @xsklero There's an example of a BLE server here: https://docs.pycom.io/firmwareapi/pycom/network/bluetooth/gattscharacteristic.html

    Whatever you try, if you have an issue, you need to be more specific. Tell us what code you are using and the exact issue you are facing.



  • @jcaron I want to control some leds by using bluetooth or web server (wifi).
    I can create an application with MIT AppInventor to control this leds, or maybe with an web server I could make an POST method.
    I tried with examples on pycom forum so I don't have my own code, it's just a copy of others just for trying.

    I am new with lopy board, so if you could help me I would be happy.
    Thanks a lot.



  • @xsklero Please share your code, state what you expect it to do, and what actually happens (or doesn't), including any error messages.

    Note that you should probably also add a characteristic to your service if you want to do anything useful.

    What are you using on your phone to scan for devices, connect, and update the characteristic? Your own app? Something else? Please share details (including the relevant parts of your code if any).



Pycom on Twitter