ESP32 Bluetooth SPP with bidirectional communication (send and receive)

suriyaelango
Posts: 2
Joined: Mon Mar 11, 2019 2:07 pm

Re: ESP32 Bluetooth SPP with bidirectional communication (send and receive)

Postby suriyaelango » Mon Mar 11, 2019 2:12 pm

Hi,
Can someone please tell me if Bluetooth SPP supports multiple clients in case of bi-directional communication? If yes, implementation code, please.

gunar.kroeger
Posts: 45
Joined: Fri Jul 27, 2018 6:48 pm

Re: ESP32 Bluetooth SPP with bidirectional communication (send and receive)

Postby gunar.kroeger » Tue Mar 12, 2019 4:20 pm

suriyaelango wrote: Hi,
Can someone please tell me if Bluetooth SPP supports multiple clients in case of bi-directional communication? If yes, implementation code, please.
It does. You will have to save the connection handle from incoming clients and direct the messages with esp_spp_write to the correct handle

suriyaelango
Posts: 2
Joined: Mon Mar 11, 2019 2:07 pm

Re: ESP32 Bluetooth SPP with bidirectional communication (send and receive)

Postby suriyaelango » Mon Mar 18, 2019 7:57 am

The esp_spp_write function is an IDF function. Any chance it works with the Arduino framework for ESP32?

User avatar
ESP_Me-no-dev
Posts: 59
Joined: Mon Jan 04, 2016 6:30 pm

Re: ESP32 Bluetooth SPP with bidirectional communication (send and receive)

Postby ESP_Me-no-dev » Tue Mar 19, 2019 4:01 pm

We already have a library and example in Arduino for SPP use: https://github.com/espressif/arduino-es ... rialBT.ino

SpartaYigit
Posts: 1
Joined: Wed Mar 20, 2019 7:20 pm

Re: ESP32 Bluetooth SPP with bidirectional communication (send and receive)

Postby SpartaYigit » Wed Mar 20, 2019 7:29 pm

ESP_Me-no-dev wrote:
Tue Mar 19, 2019 4:01 pm
We already have a library and example in Arduino for SPP use: https://github.com/espressif/arduino-es ... rialBT.ino
The BluetoothSerial library does not allow to connect directly to other devices (when a UUID is given) using SPP. Is this correct? If not, is there an example to do this in Arduino?

(I want to connect the ESP32 to the Neurosky Mindwave Mobile which uses Serial Port Profile (classic bluetooth). I have looked into the SPP_initiator example and it allows me to connect to the device but couldn't receive any data from it.)

Who is online

Users browsing this forum: Google [Bot], nicola and 32 guests