XiaomiGateway3
XiaomiGateway3 copied to clipboard
After install Xiaomi Home Hub, some bluetooth devices no more avaiable ?
After install Xiaomi Home Hub,
all the bluetooth sensors are not available.
but the bluetooth mesh light/switch can still work>
How can I do to solve this issue
?
me too
Home Assistant Core 2022.6.7 Home Assistant Supervisor 2022.05.3 Home Assistant OS 8.2 Xiaomi Gateway 3 v2.1.0
Check if silabs_ncp_bt is running without issues on the gateway. I've seen many cases where bt settings were corrupted resulting in this process dying and starting up every couple of seconds, effectively not listening to BLE broadcasts.
Do you use supported gateway firmware?
Do you use supported gateway firmware?
I would like to descript more information for this issue I faced.
[6] mgl03_1.5.1_0032_mod20211108.zip works fine, but only 1.5.4 can co-work with Xiaomi home hub
after upgrade to [7] mgl03_1.5.4_0084_mod20220510.zip the Bluetooth mesh devices such as "mesh lemesh.light.wy0c07 by LeMesh" still work fine but all the Bluetooth sensor devices such as "ble MCCGQ02HL by Xiaomi" becomes unavailable.
under the construction of Xiaomi home hub, the original Bluetooth gateways were redefined as two type of sub-gateway (auxiliary gateway and independent gateway) and I found one thing. all the sensor type devices(viewable devices) can be checked under sub-gateway, but Bluetooth mesh devices(controlable devices) not Bluetooth mesh devices(controlable devices) seems handled by Xiaomi home hub directly.
I was using firmware 1.5.4_0090 and I faced all sort of problems (all TH sensors unavailable, the state of switches not updated, etc) with all the Bluetooth and Mesh devices. Until I downgraded to firmware 1.5.0_0102, all Bluetooth and the Mesh devices worked like a charm.
I guess, the best solution for now for @kingwap99 is to downgrade your XiaomiGateway3 to firmware version 1.5.0_0102.
To downgrade the firmware, open a telnet session to the Xiaomi Gateway 3 :
First find out the ip address (xxx.xxx.xxx.xxx) of your Xiaomi Gateway 3
telnet xxx.xxx.xxx.xxx
then you will see this:
Trying xxx.xxx.xxx.xxx... Connected to xxx.xxx.xxx.xxx. Escape character is '^]'.
rlxlinux login:
the login name is admin
rlxlinux login:admin
then run the following 3 commands one after another:
wget -O /tmp/curl "http://master.dl.sourceforge.net/project/mgl03/bin/curl?viasf=1" && chmod +x /tmp/curl
export PATH="$PATH:/tmp"
curl -s -k -L -o /tmp/update.sh https://raw.githubusercontent.com/zvldz/mgl03_fw/main/firmware/mgl03_update.sh && sh /tmp/update.sh
Select firmware 1.5.0_0102
Hope this helps.
@kingwap99 you can try this PR https://github.com/AlexxIT/XiaomiGateway3/pull/672.
@kingwap99 you can try this PR #672.
just updated for 1 hr they look quite well for now and will keep update to you, if any issue thanks a lot
Read readme and don't create issue about unsupported firmwares.
Check if silabs_ncp_bt is running without issues on the gateway. I've seen many cases where bt settings were corrupted resulting in this process dying and starting up every couple of seconds, effectively not listening to BLE broadcasts.
Hello.
This is probably my case.
After some point, all BLE devices became unavailable. Firmware 1.5.0_0102. I tried stock and custom. After your post I checked this process (silabs_ncp_bt) and indeed, it restarts every few seconds. If I run it from the terminal, I get the following error:
Do you know how to fix it? Reflashing does not help.
@freeball155 maybe you have some problems with BT chip firmware. Because it should be flashed with each gateway firmware update.
@freeball155 maybe you have some problems with BT chip firmware. Because it should be flashed with each gateway firmware update.
Is it possible to fix or сразу в морг? :) Below the BLE flashing log:
- Flashing BLE firmware uart-dfu /dev/ttyS1 /tmp/full_ble_1.5.4_0090.gbl 1 OTA_STATE:0 do app!! start update ble firmware!! killall: start_ot.sh: no process killed ota_state.txt is exist killall: ncp_daemon: no process killed sh: write error: Device or resource busy in bootloader Bytes to send:384312 Syncing..DFU OK Bootloader version: 17301508 (0x1080004) DFU packet size:384312 99% finish ncp target version:140 --200--->app ota_state:0 ----->ble app updated
Probably the "sh: write error: Device or resource busy" is bad sign.
@freeball155 maybe you have some problems with BT chip firmware. Because it should be flashed with each gateway firmware update.
Is it possible to fix or сразу в морг? :) Below the BLE flashing log:
* Flashing BLE firmware uart-dfu /dev/ttyS1 /tmp/full_ble_1.5.4_0090.gbl 1 OTA_STATE:0 do app!! start update ble firmware!! killall: start_ot.sh: no process killed ota_state.txt is exist killall: ncp_daemon: no process killed **sh: write error: Device or resource busy** in bootloader Bytes to send:384312 Syncing..DFU OK Bootloader version: 17301508 (0x1080004) DFU packet size:384312 99% finish ncp target version:140 --200--->app ota_state:0 ----->ble app updated
Probably the "sh: write error: Device or resource busy" is bad sign.
This is normal and always shows up.
Check if silabs_ncp_bt is running without issues on the gateway. I've seen many cases where bt settings were corrupted resulting in this process dying and starting up every couple of seconds, effectively not listening to BLE broadcasts.
Hello. This is probably my case. After some point, all BLE devices became unavailable. Firmware 1.5.0_0102. I tried stock and custom. After your post I checked this process (silabs_ncp_bt) and indeed, it restarts every few seconds. If I run it from the terminal, I get the following error: [I][mible_bond] mible_wifi_config_deinit 121: Wifi config deinit [D] : check wifi status 8 [I][mesh_gateway] mible_mesh_query_gateway_ctl_info 5330: id = 336667036, js = {"method":"_sync.ble_mesh_ctl_info","params":{"life":10,"cm_version":"3.1.6_0002","cm_commit_id":"stable-3.1/V3.1.6-2-gff7735d/2021-01-20-12:07:07"}} [I][mesh_gateway] mible_mesh_query_gateway_ctl_info_cb 5143: iv_index 00000000 [E][mesh_gateway] mible_mesh_query_gateway_ctl_info_cb 5146: get iv_flags error [I][mesh_gateway] mible_mesh_query_gateway_ctl_info_cb 5150: iv_flags: 0 [I][mesh_gateway] mible_mesh_query_gateway_ctl_info_cb 5196: unicast address: 0001 [I][mesh_gateway] mible_mesh_query_gateway_ctl_info_cb 5202: group address: feff [I][mesh_gateway] mible_mesh_query_gateway_ctl_info_cb 5230: netkey_id: 00 [I][mesh_gateway] mible_mesh_query_gateway_ctl_info_cb 5249: appkey_id: 0000000000000000 [I][mesh_db] mible_mesh_mgmt_add_appkey 1301: index:0, key_id: 0000000000000000 [I][mesh_gateway] mible_mesh_key_mgmt_add_appkey 254: stack initilising, wait for mesh stack ready [I][mesh_gateway] mible_mesh_query_gateway_netkey 5443: id = 1748469038, js = {"method":"_sync.ble_mesh_ctl_netkey_get","params":{"offset":0,"limit":10}} [I][mesh_sql] mible_mesh_sql_provisioner_search 292: SELECT * FROM mesh_info_v3 [I][mesh_sql] mible_mesh_sql_provisioner_add 247: provisioner has existed [I][mesh_gateway] mible_mesh_gateway_main_thread 3777: mesh thread keep alive, state:1, ot_state:8 [D] : check wifi status 8 [I][mesh_gateway] mible_mesh_query_gateway_netkey_cb 5371: netkey_id: 00 [I][mesh_gateway] mible_mesh_query_gateway_appkey 5579: id = 562199039, js = {"method":"_sync.ble_mesh_ctl_appkey_get","params":{"offset":0,"limit":10}} [I][mesh_gateway] mible_mesh_query_gateway_appkey_cb 5497: appkey_id: 0000000000000000, 00 [I] : local param init success gateway init set sar config set segment delay [W] : [mible_mesh_gateway_init_stack] prov init gecko cmd mesh prov init failed. error: 0xe09
Do you know how to fix it? Reflashing does not help.
The problem is that BLE device database got corrupted. This db is stored in /data which is unchanged when you flash device. What you need to do is reset the gateway by pressing the button 10 times.
Good day, I have the same issue - tried stock and custom 1.5.0_0102. Gateway is not see any ble devices. It was start from latest ofical firmware and I tried to install stock 1.5.0_0102. I also tried reset gateway. If I kill process silabs_ncp_bt and try to start it manually, I recive messages like below. Does it mean that ble module is dead?
[I] : mible rtl8197 gateway: 17:01:35, version:1.5.2
current sql version: 3.33.0
sqlite3_shutdown status = 0
Can now use sqlite on multiple threads, using the same connection
pthread ret = 0
[I] : Init tests rpc
@trvla have you solve problem?
In my case reset helped.
I am having the same issue, on fw 1.5.4-090 i no longer have the bt temperature sensors on home assistant despite having them on mi home, coincidence (or not) is that tjis started after changing the zigbee mode to zmqtt, my question is if i reseg the device will i need to start all over and reconfigure everything?
@trvla have you solve problem?
No, I ordered new one
I had the same issue as @trvla, tried many firmware and issue persist.
Jan 5 22:58:40 rlxlinux user.notice <BT>: ^[[0m[I] : Ble process thread create.
Jan 5 22:58:40 rlxlinux user.notice <BT>: ^[[0m^[[0m[I] : cmd send interval is 00c8
Jan 5 22:58:40 rlxlinux user.notice <BT>: ^[[0mget wifi mac:00 00 00 44 ef 54
Jan 5 22:58:40 rlxlinux user.notice <BT>: ^[[1;32m[D] : send reset
Jan 5 22:58:40 rlxlinux user.notice <BT>: ^[[0minit the user test timer now
Jan 5 22:58:40 rlxlinux user.notice <BT>:
Please reopen the issue if it is still relevant