Skip to content

BluetoothSerial not connect #3669

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
peppeve opened this issue Jan 25, 2020 · 20 comments
Closed

BluetoothSerial not connect #3669

peppeve opened this issue Jan 25, 2020 · 20 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@peppeve
Copy link

peppeve commented Jan 25, 2020

I try to use the example SerialtoserialBTM trying to connect a esp32 with an HC-05, set correct name, pin and address but no connection getted.

String MACadd = "20:13:08:26:14:11"; uint8_t address[6] = { 0x20, 0x13 , 0x08 , 0x26 , 0x14 , 0x11 }; //uint8_t address[6] = {0x00, 0x1D, 0xA5, 0x02, 0xC3, 0x22}; String name = "HC-05"; char *pin = "1234";

[E][BluetoothSerial.cpp:800] isReady(): BT is not initialized. Call begin() first
[I][BluetoothSerial.cpp:225] esp_spp_cb(): ESP_SPP_INIT_EVT
[I][BluetoothSerial.cpp:522] _init_bt(): device name set
[I][BluetoothSerial.cpp:119] btSetPin(): pin set
[I][BluetoothSerial.cpp:119] btSetPin(): pin set
[I][BluetoothSerial.cpp:718] connect(): master : remoteName
[I][BluetoothSerial.cpp:387] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:387] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
[I][BluetoothSerial.cpp:387] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
Failed to connect. Make sure remote device is available and in range, then restart app.
Failed to connect. Make sure remote device is available and in range, then restart app.
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (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:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
[E][BluetoothSerial.cpp:800] isReady(): BT is not initialized. Call begin() first
[I][BluetoothSerial.cpp:225] esp_spp_cb(): ESP_SPP_INIT_EVT
[I][BluetoothSerial.cpp:522] _init_bt(): device name set
[I][BluetoothSerial.cpp:119] btSetPin(): pin set
[I][BluetoothSerial.cpp:119] btSetPin(): pin set
[I][BluetoothSerial.cpp:718] connect(): master : remoteName
[I][BluetoothSerial.cpp:387] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 58:20:59:4e:05:94
[I][BluetoothSerial.cpp:344] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT : EIR : Redmi : 5
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:333] esp_bt_gap_cb(): ESP_BT_GAP_DISC_RES_EVT
[I][BluetoothSerial.cpp:336] esp_bt_gap_cb(): Scanned device: 20:13:08:26:14:11
[I][BluetoothSerial.cpp:387] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
[I][BluetoothSerial.cpp:387] esp_bt_gap_cb(): ESP_BT_GAP_DISC_STATE_CHANGED_EVT
Failed to connect. Make sure remote device is available and in range, then restart app.
Failed to connect. Make sure remote device is available and in range, then restart app.
The device started in master mode, make sure remote BT device is on! Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app. Failed to connect. Make sure remote device is available and in range, then restart app.

@GPSFan
Copy link

GPSFan commented Jan 25, 2020

I have been experiencing the same problem for quite some time, however I have made some progress. IIRC the original BluetoothSerial code was tested with a Bluetooth GPS device. The ones I have, Qstarz BT-Q816 and BT-Q1000, use a BT module based on the RF Micro Devices SiW3500.
At first, I was only trying to get the BT Serial in Master mode to connect to an HC-05, lots of print statements later, I was at wits end so I tried esp32-IDF and after a long learning curve I got the HC-05 to connect. I then went back to the esp32-arduino source code and compared it to the IDF code.... too many differences for me to be sure of anything, ie 1.04 (3.2) vs the latest Github IDF master.
So then I dug out my BT GPS receivers and both would connect to the esp32 using the 1.04 based code.

I think that the HC-05 is different from other BT Classic serial adapters like the JDY-30 and those based on the SiW3500. Even though it advertises the same SPP capabilities, there is something different in how it responds to discovery requests.
I bought 3 JDY-30 modules and found I could connect to them just as to the SiW3500 based BT GPS devices.
My conclusion is to wait for the IDF 4.0 based esp32-arduino code to be released and try again with the HC-05.

@peppeve
Copy link
Author

peppeve commented Jan 25, 2020

@GPSFan
I updated to 1.04 and get connected.

[I][BluetoothSerial.cpp:510] _init_bt(): device name set The device started in master mode, make sure remote BT device is on! [I][BluetoothSerial.cpp:225] esp_spp_cb(): ESP_SPP_INIT_EVT [I][BluetoothSerial.cpp:722] connect(): master : remoteAddress [I][BluetoothSerial.cpp:290] esp_spp_cb(): ESP_SPP_DISCOVERY_COMP_EVT Connected Succesfully!
but my HC-05 send a lot of data out (i can check with my mobile connected to him), but nothing i see on the serial monitor. Then connection seem to be ok but no data exchanged.

@GPSFan
Copy link

GPSFan commented Jan 25, 2020

What version firmware is your HC-05?
AT+VERSION?\n\r

@gogasan24ru
Copy link

Hello. I have same issue.
My AT+VERSION returns linvorV1.8

@peppeve
Copy link
Author

peppeve commented Jan 26, 2020

@

What version firmware is your HC-05?
AT+VERSION?\n\r

I can't check, my hc-05 is installed inside an electrical box since 5 years.

1 similar comment
@peppeve
Copy link
Author

peppeve commented Jan 26, 2020

@

What version firmware is your HC-05?
AT+VERSION?\n\r

I can't check, my hc-05 is installed inside an electrical box since 5 years.

@GPSFan
Copy link

GPSFan commented Jan 26, 2020

The HC-05's I have use: VERSION: 2.0-20100601
The Internet tells me that there are several more versions:
VERSION: 2.0-20100601
VERSION 3.0-20170601
VERSION:4.0-20190815
Linvor version 1.5
linvor V1.8
I would expect differences and similarities between them all. I have no clue as to how the ones other than VERSION: 2.0-20100601 operate.
peppeve, if it's been there for 5 years, it is probably not VERSION:4.0-20190815.
All of these are based on the CSR (Cambridge Silicon Radio) BC417 chip.
The JDY-30 ones I have are based on the Beken BK3231 chip, these work with the 1.04 esp32-arduino code. My HC-05's with firmware VERSION: 2.0-20100601 do not.
From the commit activity here lately I would expect a new release soon. Then, if it still doesn't work, will be the time to poke more at the problem.

@peppeve
Copy link
Author

peppeve commented Jan 26, 2020

@GPSFan I tested with the new version of the Bluetooth serial library coming from idf 4 repository, but nothing change.

@GPSFan
Copy link

GPSFan commented Jan 26, 2020

IMHO the BluetoothSerial.cpp and .h files are not the ones that matter, it's the esp-hal code that does the lower level interaction with the BlueDroid Classic stack that matters, there are so many changes between 3.2 (1.04) and the GitHub head that it's impossible for me to tell where the problem might lie. I am perfectly willing to wait for the next release and start debugging from a fresh release.

@GPSFan
Copy link

GPSFan commented Jan 26, 2020

My application (which is working mostly) gets data from a 115200 UART port on a u-blox M9N connected to the JDY-30 then via Bluetooth Classic to a M5StickC (in SPP Master mode) where the UBX protocol messages are parsed and the Sat positions and SNR are graphed. I'm doing this in esp32-arduino now, but may move to esp32-IDF if the application gets too complex. I thought of using an esp32 on both ends, but I had the HC-05 modules and it should have worked, I believe it will with an HC-05 when the IDF 4.x is integrated into the esp32-arduino code. In the mean time, I got the JDY-30's to see if they would work and the did, so I continued development of my esp32 app/sketch/program.

@peppeve
Copy link
Author

peppeve commented Jan 26, 2020

My hc-05 in installed on my domotic house system, I have around 25 Arduino pro mini around my house made 5/6 years ago that communicate by a simple rs475 protocol. The hc-05 is used to bridge all data on the bus to my phone for debug or drive lights open door, Chech consumptions, etc. Now I upgrade my system with an esp32 emulating Philips hue light, for drive my system by Alexa. For do this I need to bridge my esp32 to my old bus rs485 by the hc-05 already installed on the system.

@GPSFan
Copy link

GPSFan commented Jan 26, 2020

Having HC-05's already installed in equipment is why I am interested in this problem. If I was starting from scratch I'd not use HC-05's as the JDY-30 is as cheap and works. Better to use an esp32 derivative and have full control of the firmware.

@peppeve
Copy link
Author

peppeve commented Feb 8, 2020

@GPSFan any news?

@peppeve
Copy link
Author

peppeve commented Apr 6, 2020

@GPSFan update? found a solution?

@GPSFan
Copy link

GPSFan commented Apr 7, 2020

I tried the idf-release/v4.0 and was able to get the hc-05 to connect, but no data transfer. I see that there has just been an update to that branch so I'll give it another try when I get another round tuit...
Sorry for not responding sooner, busy times here...

@stale
Copy link

stale bot commented Jun 6, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Jun 6, 2020
@vanniaz
Copy link

vanniaz commented Jun 11, 2020

I noticed that BluetoothSerial is reporting "connected" even when there is no device connected, so when you say that it connects but does not transfer data, the problem could be in the connection.
I opened a new issue for this:
#4081

@stale
Copy link

stale bot commented Jun 11, 2020

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label Jun 11, 2020
@stale
Copy link

stale bot commented Aug 11, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 11, 2020
@stale
Copy link

stale bot commented Aug 25, 2020

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

4 participants