ESP32 bluetooth

vcch75
Posts: 10
Joined: Mon Nov 04, 2019 10:04 pm

ESP32 bluetooth

Postby vcch75 » Mon Nov 04, 2019 10:08 pm

Hi !

I already runned several bluetooth examples, but all of them involve the Esp32 being added by the PC.
i want to do the opposite : the Esp32 connecting to a PC (or a phone) - with or without a pincode.

Can you help me doing this, or tell me whre i could find a code doing that ? I've been googling for weeks, and did not find the way to do it...


vcch75
Posts: 10
Joined: Mon Nov 04, 2019 10:04 pm

Re: ESP32 bluetooth

Postby vcch75 » Wed Nov 06, 2019 7:42 pm

Thanks a lot, exactly what I needed! Any advice on what to do to make this run in arduino/esp32 ?

chegewara
Posts: 872
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 bluetooth

Postby chegewara » Fri Nov 08, 2019 8:41 pm


vcch75
Posts: 10
Joined: Mon Nov 04, 2019 10:04 pm

Re: ESP32 bluetooth

Postby vcch75 » Sat Nov 09, 2019 6:55 pm

Thanks a lot. Will look at it more in details.

vcch75
Posts: 10
Joined: Mon Nov 04, 2019 10:04 pm

Re: ESP32 bluetooth

Postby vcch75 » Wed Nov 13, 2019 8:52 pm

BLEPin:38:14: error: 'class BLESecurity' has no member named 'setStaticPIN'

pSecurity->setStaticPIN(123456);

vcch75
Posts: 10
Joined: Mon Nov 04, 2019 10:04 pm

Re: ESP32 bluetooth

Postby vcch75 » Wed Nov 13, 2019 8:55 pm

I installed the latest ESP32 library and Neil Kolban's BLE library, but i still have the error message :

BLEPin:38:14: error: 'class BLESecurity' has no member named 'setStaticPIN'

pSecurity->setStaticPIN(123456);

^

chegewara
Posts: 872
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 bluetooth

Postby chegewara » Thu Nov 14, 2019 11:59 am

Looks like arduino library has not been updated with this feature. You can copy/paste files from this library:
https://github.com/nkolban/esp32-snippe ... curity.cpp
https://github.com/nkolban/esp32-snippe ... Security.h

vcch75
Posts: 10
Joined: Mon Nov 04, 2019 10:04 pm

Re: ESP32 bluetooth

Postby vcch75 » Thu Nov 14, 2019 8:57 pm

I could run the code but it is not exactly what I wanted to do.

What I would like to do is a soft that connects successively to all the bluetooth devices (which would trigger a message "ESP32 wants to connect with your PC" message on my PC for example). Any idea how to do this ?

chegewara
Posts: 872
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 bluetooth

Postby chegewara » Fri Nov 15, 2019 4:36 am

Then you need ble client on esp32 and peer device, like PC or smartphone, needs to advertise itself. Without that how esp32 could find it?

Who is online

Users browsing this forum: No registered users and 9 guests