espressif / esp-idf-provisioning-ios

Apache License 2.0
134 stars 64 forks source link

App disconnecting after POP confirmation #47

Closed KonssnoK closed 2 years ago

KonssnoK commented 2 years ago

App issue for: https://github.com/espressif/esp-idf/issues/8739

After inserting POP "abcd1234" in the app and pressing the button the communication gets dropped, and the device restarts advertising.

By doing some digging in the device code the connection gets closed by ESP_GATT_CONN_TERMINATE_PEER_USER.

I (81817) BT_L2CAP: L2CA_SendFixedChnlData()  CID: 0x0004  BDA: 7df1e81556af
I (84707) BT_GATT: GATT_GetConnIdIfConnected status=0

I (84707) BT_L2CAP: L2CA_SetDesireRole() new:x1, disallow_switch:0
E (84707) simple_ble: ESP_GATTS_DISCONNECT_EVT, reason = 13
I (84707) BT_APPL: BTA_DmSetBleAdvParamsAll: 256, 256

I (84717) BT_APPL: adv_type = 0, addr_type_own = 0, chnl_map = 7, adv_fil_pol = 0
KonssnoK commented 2 years ago

it comes out this was happening because Encrypted communication was not selected in the settings. Selecting the option solved the issue. :) (Still, you have to press pair twice to finish the provisioning).