If I register multiple apps, the ESP_GATTC_CONNECT_EVT is fired on each app with different interfaces gattc_if and same bda
Am I doing something wrong?
I see in example gattc_multi_connect.c information about thin behaviour, but isn't it a bug ?
Code: Select all
I (1008) SRB_BLEC: GATT App registered # 0 : if 3 // ( save gattc_if for application as app[0].gattc_if=3)
I (1008) SRB_BLEC: GATT App registered # 1 : if 4 // ( save gattc_if for application as app[1].gattc_if=4)
I (1018) SRB_BLEC: GATT App registered # 2 : if 5 // ( save gattc_if for application as app[2].gattc_if=5)
I (1018) SRB_BLEC: GATT App registered # 3 : if 6 // ( save gattc_if for application as app[3].gattc_if=6)
I (2038) SRB_BLEC: FOUND DEVICE!
I (2038) SRB_BLEC: srb_ble_client_register (my function) : idx: 0 if: 3
// Here we make esp_ble_gattc_open(app[idx].gattc_if, bda, addr_type, true )
I (2358) SRB_BLEC: Connect if:3 connid:0
I (2368) SRB_BLEC: 72 55 53 07 46 74
// That is normal, Connect for the first device (app[0].gattc_if == 3) and print it's bda
I (2368) SRB_BLEC: Open if:3 status:0
// That is normal, Open for the first device (app[0].gattc_if == 3) and print it's bda
I (2368) SRB_BLEC: Connect if:4 connid:0
I (2368) SRB_BLEC: 72 55 53 07 46 74
// That is strange. ESP_GATTC_CONNECT_EVT is fired for second app's if (app[1].gattc_if == 4)
I (2378) SRB_BLEC: Connect if:5 connid:0
I (2378) SRB_BLEC: 72 55 53 07 46 74
// That is strange. ESP_GATTC_CONNECT_EVT is fired for third app's if (app[2].gattc_if == 5)
I (2388) SRB_BLEC: Connect if:6 connid:0
I (2388) SRB_BLEC: 72 55 53 07 46 74
// That is strange. ESP_GATTC_CONNECT_EVT is fired for fourth app's if (app[2].gattc_if == 5)