You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question
I have a madoka thermostat using BLE and first thing you need to do is to pair. to pair it, it displays a 5 digit code and you need to click a button on the thermostat and do the same on the initiating side. The code changes each time it's paired.
How can I achieve the same in esp32-ble2mqtt? I tried the below json but it did not work. It sees the thermostat and connects but thermostat doesn't show any code as if it's not attempting any pairing/authentication.
"ble": {
"whitelist": [
"F4:93:1C:90:B9:FB", ---> This is the thermostat
"00:11:22:??:??:??" --> this one is dummy, disregard
],
"passkeys": {
"F4:93:1C:90:B9:FB": "?????", ---> I put this ????? to try to make it accept all codes but no pairing attempted
"00:11:22:??:??:??": "123456" --> this one is dummy, disregard
}
}
Additional context
I expect the esp32-ble2mqtt to attempt pairing to the whitelisted thermostat, and accept any code that it gets to complete pairing. Then normal operations can resume.
The text was updated successfully, but these errors were encountered:
I think the issue here is the bonding capabilities this project exposes. It currently only states that it has a keyboard (to enter a pairing code). It sound like, in this case, the pairing is expected to be done by displaying a code on both sides and clicking yes/no.
The current IO capability is set to ESP_IO_CAP_IN (which is KeyboardOnly) while it sound like we might need ESP_IO_CAP_IO (which is DisplayYesNo) or ESP_IO_CAP_KBDISP (which is Keyboard display).
If you're up for it, you can try to apply the following changes and see how it works for you:
diff --git a/main/ble.c b/main/ble.c
index db35bd8..36946bf 100644
--- a/main/ble.c+++ b/main/ble.c@@ -1036,7 +1036,7 @@ int ble_initialize(void)
ESP_ERROR_CHECK(esp_ble_gattc_app_register(0));
ESP_ERROR_CHECK(esp_ble_gatt_set_local_mtu(200));
/* Set security IO capability to KeyboardOnly */
- esp_ble_io_cap_t iocap = ESP_IO_CAP_IN;+ esp_ble_io_cap_t iocap = ESP_IO_CAP_IO;
esp_ble_gap_set_security_param(ESP_BLE_SM_IOCAP_MODE, &iocap,
sizeof(iocap));
or
diff --git a/main/ble.c b/main/ble.c
index db35bd8..36946bf 100644
--- a/main/ble.c+++ b/main/ble.c@@ -1036,7 +1036,7 @@ int ble_initialize(void)
ESP_ERROR_CHECK(esp_ble_gattc_app_register(0));
ESP_ERROR_CHECK(esp_ble_gatt_set_local_mtu(200));
/* Set security IO capability to KeyboardOnly */
- esp_ble_io_cap_t iocap = ESP_IO_CAP_IN;+ esp_ble_io_cap_t iocap = ESP_IO_CAP_KBDISP;
esp_ble_gap_set_security_param(ESP_BLE_SM_IOCAP_MODE, &iocap,
sizeof(iocap));
Question
I have a madoka thermostat using BLE and first thing you need to do is to pair. to pair it, it displays a 5 digit code and you need to click a button on the thermostat and do the same on the initiating side. The code changes each time it's paired.
How can I achieve the same in esp32-ble2mqtt? I tried the below json but it did not work. It sees the thermostat and connects but thermostat doesn't show any code as if it's not attempting any pairing/authentication.
Additional context
I expect the esp32-ble2mqtt to attempt pairing to the whitelisted thermostat, and accept any code that it gets to complete pairing. Then normal operations can resume.
The text was updated successfully, but these errors were encountered: