I'm trying to run the Classic Bluetooth "acceptor" example:
https://github.com/espressif/esp-idf/tr ... p_acceptor
With the same sdkconfig configuration settings as the example
I turn on the bluetooth in the phone. I select the ESP32 device.
Then pop up a window with the pairing number:
At the same time this windows pops up, in the terminal i receive the following message:
W (162921) BT_HCI: hcif conn complete: hdl 0x80, st 0x0
W (162940) BT_HCI: hcif link supv_to changed: hdl 0x80, supv_to 8000
As soon as I pair the devices in the phone, the authentication is succesfull, but i receive the following message in the terminal:
W (245220) BT_HCI: hci cmd send: disconnect: hdl 0x80, rsn:0x13
W (245296) BT_HCI: hcif disc complete: hdl 0x80, rsn 0x16
And the connection process stops there. The connection proccess cannot complete
The serial port callback never reach the state: ESP_SPP_SRV_OPEN_EVT (SPP Server connection open)
I think i had this same issue months ago. I think was related with HCI. Now i have a fresh installation, with the latest ESP-IDF version. ESP-IDF works fine. VSCode works fine.
I tried to search the error code rsn:13, but i cannot find any information.
I think is related with the supervision timeout for the HCI link. Where can i change this value?
Bluetooth connection lost after pairing
Bluetooth connection lost after pairing
Last edited by chucrut on Fri Jun 16, 2023 9:18 pm, edited 4 times in total.
Re: Bluetooth connection lost after pairing
I tried with this configuration:
Re: Bluetooth connection lost after pairing
And also tried with HCI instead of PCM
Re: Bluetooth connection lost after pairing
I tested both ESP32 WROOM 32 and ESP32 PICO MINI 02 and their behaviour is slightly different
ESP32 WROOM 32 not even pair
ESP32 PICO MINI 02 pair and disconnect, like the pictures above
ESP32 WROOM 32 not even pair
ESP32 PICO MINI 02 pair and disconnect, like the pictures above
-
- Posts: 9
- Joined: Wed Jun 12, 2024 8:29 am
Re: Bluetooth connection lost after pairing
Hi chucrut! Almost one year later I'm dealing with exactly the same issue with an ESP32-WROOM-32E and a Quest 3. I have created this post before finding yours: https://esp32.com/viewtopic.php?f=19&t=40345
One thing I found is that it may be related to the type of connection. The bt_spp_acceptor uses the Serial Port Profile from the Bluetooth spec. When I tried the a2dp_sink example, which uses the Advanced Audio Distribution Profile, the connection wasn't terminated.
Interestingly though, the bt_spp_acceptor example works with my phone. Have you been able to get to the bottom of this at all or gain any additional insights into this problem?
One thing I found is that it may be related to the type of connection. The bt_spp_acceptor uses the Serial Port Profile from the Bluetooth spec. When I tried the a2dp_sink example, which uses the Advanced Audio Distribution Profile, the connection wasn't terminated.
Interestingly though, the bt_spp_acceptor example works with my phone. Have you been able to get to the bottom of this at all or gain any additional insights into this problem?
-
- Posts: 9
- Joined: Wed Jun 12, 2024 8:29 am
Re: Bluetooth connection lost after pairing
Hey chucrut,
The connection being closed after pairing is normal for SPP. You should still be able to access the paired device later in your application.
The connection being closed after pairing is normal for SPP. You should still be able to access the paired device later in your application.
Who is online
Users browsing this forum: No registered users and 185 guests