Communication between two Bluetooth/BLE devices

Rick1997
Posts: 6
Joined: Thu Feb 09, 2017 1:35 pm

Communication between two Bluetooth/BLE devices

Postby Rick1997 » Mon Feb 20, 2017 9:15 am

I want to create a program that allows me to communicate between my phone and the ESP32 via bluetooth. I don't have a fixed preference for either Bluetooth classic or BLE, but there seems to be more info out there on BLE for the ESP32. I have very little experience with Bluetooth so this is quite a challenge. I managed to get the ESP32 to advertise some data and I think I figured out how advertising works. But this doesn't get me the bidirectional communication that I need. I have looked in to the other examples but I'm unsure they give me what I am looking for. From what I have read on the forum there is no support yet for pairing and communication between two devices in the IoT Development Framework. Is this true? If so, are there plans to add this along with examples associated? I would love to learn more on this so any help is appreciated.

User avatar
pcbreflux
Posts: 28
Joined: Sat Feb 11, 2017 1:00 am
Location: germany
Contact:

Re: Communication between two Bluetooth/BLE devices

Postby pcbreflux » Mon Feb 20, 2017 1:08 pm

Hi,

have you tried the gatt example?
The esp32 as a gatt server let you connect from your phone to the esp32: https://github.com/espressif/esp-idf/tr ... att_server

Maybe this is what you need?
(start easier without "Use raw data for advertising packets and scan response data")

If you want to connect from the esp32 to an other device (could be also you phone if your app is the server) use the gatt client example: https://github.com/espressif/esp-idf/tr ... att_client

Helpfull phone app: nRF Connect (from Nordic Semiconductor)

seph59
Posts: 1
Joined: Thu Mar 30, 2017 12:32 am

Re: Communication between two Bluetooth/BLE devices

Postby seph59 » Thu Mar 30, 2017 12:35 am

Hello Rick1997,

I found your post and I am currently in the same situation you are. I am currently trying to figure out how the gatt_server example program works. Have you made any progress on your goal that you can describe to me?

Thank you

Rick1997
Posts: 6
Joined: Thu Feb 09, 2017 1:35 pm

Re: Communication between two Bluetooth/BLE devices

Postby Rick1997 » Fri Mar 31, 2017 2:38 pm

seph59 wrote:Hello Rick1997,

I found your post and I am currently in the same situation you are. I am currently trying to figure out how the gatt_server example program works. Have you made any progress on your goal that you can describe to me?

Thank you
No, I haven't. I had to move on to other things. What helped me understand this example better was reading the Bluetooth Core Specification on GATT, which can be downloaded here (pages 2217-2274).

Who is online

Users browsing this forum: Google [Bot], VSparxx and 144 guests