10000 Fix issue #157 · norfanos/esp32-snippets@79d58a0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 79d58a0

Browse files
committed
Fix issue nkolban#157
1 parent 006c88c commit 79d58a0

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.project
2+
.cproject
3+
.settings/

cpp_utils/BLEClient.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ void BLEClient::disconnect() {
117117
ESP_LOGE(LOG_TAG, "esp_ble_gattc_close: rc=%d %s", errRc, GeneralUtils::errorToString(errRc));
118118
return;
119119
}
120+
esp_ble_gattc_app_unregister(getGattcIf());
120121
m_peerAddress = BLEAddress("00:00:00:00:00:00");
121122
ESP_LOGD(LOG_TAG, "<< disconnect()");
122123
} // disconnect

cpp_utils/BLEDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void BLEDevice::init(std::string deviceName) {
187187
return;
188188
}
189189

190-
errRc = esp_bt_controller_enable(ESP_BT_MODE_BTDM);
190+
errRc = esp_bt_controller_enable(ESP_BT_MODE_BLE);
191191
if (errRc != ESP_OK) {
192192
ESP_LOGE(LOG_TAG, "esp_bt_controller_enable: rc=%d %s", errRc, GeneralUtils::errorToString(errRc));
193193
return;

0 commit comments

Comments
 (0)
0