You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/04/26 08:44:56 UTC

[GitHub] [mynewt-nimble] Teu97 opened a new issue #975: Can't discover services after connecting 5 times without bonding

Teu97 opened a new issue #975:
URL: https://github.com/apache/mynewt-nimble/issues/975


   Hi all,
   
   I'm implementing the nimble Bluetooth stack (esp-idf v4.1.1) into my ESP32-WROOM-32D project which has been set as BLE peripheral. After connecting 5 times using the NRF connect application (Android or IOS does not matter), I cannot discover services any longer. I have already tried several things but I can't figure out what goes wrong.
   
   The settings:
   ```C++
   void CEspNimbleBluetoothDevice::Init()
   {
     esp_err_t result;
     result = esp_nimble_hci_and_controller_init();
     Assert(result == ESP_OK);
   
     nimble_port_init();
   
     ble_hs_cfg.reset_cb = PeripheralOnResetCallback;
     ble_hs_cfg.sync_cb = PeripheralOnSyncCallback;
     ble_hs_cfg.gatts_register_cb = GattRegisterEventCallback;
     ble_hs_cfg.gatts_register_arg = reinterpret_cast<void*>(this);
     ble_hs_cfg.store_status_cb = ble_store_util_status_rr;
   
     ble_hs_cfg.sm_io_cap = BLE_SM_IO_CAP_NO_IO; // No input/output capabilities (just works)
     ble_hs_cfg.sm_bonding = 1; // Enable bonding
     ble_hs_cfg.sm_sc = 1; // Use secure connection
     ble_hs_cfg.sm_our_key_dist = BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID; // Enable LTK + IRK
     ble_hs_cfg.sm_their_key_dist = BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID; // Enable LTK + IRK
   
     ble_svc_gap_init();
     ble_svc_gatt_init();
   
     memset(m_serviceTable, 0, sizeof(m_serviceTable));
     memset(m_characteristicRegistrationTable, 0, sizeof(m_characteristicRegistrationTable));
   }
   ```
   
   The SDK config is set as follows:
   <img src="https://user-images.githubusercontent.com/83207230/116048849-e77c4e80-a675-11eb-9601-2241d4ff3ffe.png" width="400">
   
   Steps that I execute:
   1. Push pairing button, so that the ESP accepts new connections by advertising with its name.
   2. Scan and connect with the NRF connect application.
   3. See if services can be discovered under the client tab.
   4. Disconnect.
   
   After repeating this 5 times, step 3 will not display any services. Logging in the application shows that discovering resulted in a nill. And also in the ESP logging does not give me any information about discovering.
   
   Hope someone can help, thanks in advance!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] Teu97 commented on issue #975: Can't discover services after connecting 5 times without bonding

Posted by GitBox <gi...@apache.org>.
Teu97 commented on issue #975:
URL: https://github.com/apache/mynewt-nimble/issues/975#issuecomment-826919946


   For more details see: https://github.com/espressif/esp-nimble/issues/25.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-nimble] Teu97 closed issue #975: Can't discover services after connecting 5 times without bonding

Posted by GitBox <gi...@apache.org>.
Teu97 closed issue #975:
URL: https://github.com/apache/mynewt-nimble/issues/975


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org