I am really only using this:
https://github.com/espressif/esp-idf/bl ... emo.c#L114 with 1 line modified. In line 114 I replaced
esp_ble_gap_set_scan_params() with
esp_ble_gattc_open(gattc_if, bda, true). This will skip scanning and should work with all advertising peripherals, if you provide the correct bt-mac as 2nd argument.
I come to the conclusion that I would like to be able to do "GATT over conventional Bluetooth" also on my esp32 as a solution to my original problem. To try this out (dirty hack coming) I added the following line to my copy of gatt_main.c on top of method gatt_connect():
Code: Select all
transport = BT_TRANSPORT_BR_EDR; // my hack to force L2CA_ConnectReq()
This is supposed to mimic the Android behaviour described above. When I run gattc_demo.c on top of this now, my esp32 DOES! reach my non-advertising peripheral for the first time. But for an unknown reason, it is not able to establish a full connection yet. Every time I try, my peripheral complains: "E bt_btm : btm_read_remote_features_complete failed (status 0x08)". Odd. Is anyone aware what this could mean?