Initialize Bluetooth Serial and BLE server

If both BLE and Bluetooth are required to operate in the code, the initialization sequence seems to be critical.

Complete initialization of a BLE server and then separate initialization of Bluetooth Serial didn’t work. The correct sequence seems to be

Here is a code extract that worked for me

Full code example for the initialization can be found in this Github repo.

Facebooktwitterredditpinterestlinkedintumblrmail

One comment

  • Vlad

    Hello. I also need btserial and ble running at the same time. Tried following your example, but unfortunately I got a problem. Btserial and ble work together, but I can connect my android application to btserial only once ((As soon as the application disconnects from btserial, it cannot reconnect until I restart esp. Maybe you can give me a hint? Thank you in advance.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Free Link Directory