How to maintain a bluetooth connection for more than a few seconds?

spierepf
Posts: 3
Joined: Sat Dec 05, 2020 3:31 am

How to maintain a bluetooth connection for more than a few seconds?

Postby spierepf » Sat Dec 05, 2020 3:39 am

I've compiled the code under `https://github.com/espressif/esp-idf/tr ... _bt/hfp_hf` and uploaded it to my ESP32.

When I try to pair the device with my linux computer, it connects for a few seconds, and then immediately disconnects.

Here is the log on my computer:

Code: Select all

[NEW] Device B4:E6:2D:DE:90:FF ESP_HFP_HF
[NEW] Device 77:CB:89:BC:03:CE 77-CB-89-BC-03-CE
[CHG] Device B4:E6:2D:DE:90:FF Connected: yes
[CHG] Device B4:E6:2D:DE:90:FF UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device B4:E6:2D:DE:90:FF ServicesResolved: yes
[CHG] Device B4:E6:2D:DE:90:FF Paired: yes
[CHG] Device B4:E6:2D:DE:90:FF Trusted: yes
[CHG] Device B4:E6:2D:DE:90:FF ServicesResolved: no
[CHG] Device B4:E6:2D:DE:90:FF Connected: no
nothing in particular appears in the serial console from the ESP32.

If I try the `hf con;` command in the serial console I get this response:

Code: Select all

[0;31mE (144747) CNSL: Command [hf con;]
connect
[0;33mW (149877) BT_SDP: SDP - Rcvd conn cnf with error: 0x4  CID 0x41

I (149887) BT_HF: APP HFP event: CONNECTION_STATE_EVT
I (149887) BT_HF: --connection state disconnected, peer feats 0x0, chld_feats 0x0
[0;31mE (174557) CNSL: Command [hf con;]
connect
[0;33mW (179687) BT_SDP: SDP - Rcvd conn cnf with error: 0x4  CID 0x42

I (179687) BT_HF: APP HFP event: CONNECTION_STATE_EVT
I (179687) BT_HF: --connection state disconnected, peer feats 0x0, chld_feats 0x0
What should I try next?

Who is online

Users browsing this forum: No registered users and 103 guests