Skip to content

Failure to re-connect Bluetooth SPP #4937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lyusupov opened this issue Mar 13, 2021 · 2 comments
Closed

Failure to re-connect Bluetooth SPP #4937

lyusupov opened this issue Mar 13, 2021 · 2 comments

Comments

@lyusupov
Copy link
Contributor

lyusupov commented Mar 13, 2021

Hardware:

Board: ESP32 Dev Module
Core Installation version: 1.0.5
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: yes
Upload Speed: 115200
Computer OS: Windows 10

Description:

Very first Bluetooth SPP connection to an ESP32 device works fine.
However, when we do disconnect and connect action again - the 2nd connection is no longer established.
The only way to get it back - is to make a reset of the ESP32 device.

This happens with recent 1.0.5 release only - 1.0.4 is doing good.

image

@lyusupov
Copy link
Contributor Author

To reproduce:

  1. build the standard SerialToSerialBT example with verbose debug option enabled, then install the sketch into an ESP32

  2. connect a Bluetooth SPP terminal application to the ESP32

  3. type in something

  4. disconnect

  5. try to connect again

image

This is a log of the ESP32 console output:


rst:0x10 (RTCWDT_RTC_RESET),boot:0x37 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5856
entry 0x400806a8
;TµUÍÁÍ2-hal-cpu.c:189] setCpuFrequencyMhz(): PLL: 320 / 4 = 80 Mhz, APB: 800000                                                                             00 Hz
[D][esp32-hal-psram.c:62] psramInit(): PSRAM enabled
ÿ[I][BluetoothSerial.cpp:553] _init_bt(): device name set
The device started, now you can pair it with bluetooth!
[I][BluetoothSerial.cpp:228] esp_spp_cb(): ESP_SPP_INIT_EVT
[I][BluetoothSerial.cpp:231] esp_spp_cb(): ESP_SPP_INIT_EVT: slave: start
[I][BluetoothSerial.cpp:329] esp_spp_cb(): ESP_SPP_START_EVT
[V][BluetoothSerial.cpp:417] esp_bt_gap_cb(): authentication success: Android Phone
[I][BluetoothSerial.cpp:239] esp_spp_cb(): ESP_SPP_SRV_OPEN_EVT
[V][BluetoothSerial.cpp:290] esp_spp_cb(): ESP_SPP_DATA_IND_EVT len=7 handle=129
qqqqq
[V][BluetoothSerial.cpp:290] esp_spp_cb(): ESP_SPP_DATA_IND_EVT len=13 handle=129
qqqqqrrrrrr
[I][BluetoothSerial.cpp:255] esp_spp_cb(): ESP_SPP_CLOSE_EVT

@lyusupov
Copy link
Contributor Author

Duplicates #4915

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant