Communication between two Bluetooth/BLE devices
Communication between two Bluetooth/BLE devices
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.
Re: Communication between two Bluetooth/BLE devices
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)
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)
Re: Communication between two Bluetooth/BLE devices
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
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
Re: Communication between two Bluetooth/BLE devices
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).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
Who is online
Users browsing this forum: Google [Bot], VSparxx and 144 guests