XiaomiGateway3 icon indicating copy to clipboard operation
XiaomiGateway3 copied to clipboard

Xiaomi Gateway 3 ZHA enable error after upgrade from 1.5.1 to 2.0.5

Open rtemelcea opened this issue 3 years ago • 12 comments

022-02-19 17:31:14 DEBUG utils Try to update Zigbee NCP to version v6.7.10 2022-02-19 17:31:14 DEBUG elelabs_ezsp_utility RESET FRAME 2022-02-19 17:31:16 DEBUG elelabs_ezsp_utility sendVersion: V4 2022-02-19 17:31:16 DEBUG elelabs_ezsp_utility EZSP v7 detected 2022-02-19 17:31:16 DEBUG elelabs_ezsp_utility sendVersion: V7 2022-02-19 17:31:16 DEBUG elelabs_ezsp_utility getValue: VER 2022-02-19 17:31:16 DEBUG utils NCP state: normal, version: NCP v6.6.2-126 2022-02-19 17:31:16 DEBUG elelabs_ezsp_utility launchStandaloneBootloader: BOOT 2022-02-19 17:31:18 DEBUG elelabs_ezsp_utility RESET FRAME 2022-02-19 17:31:18 DEBUG ezsp NCP first line error: b'@\x00\r\n' 2022-02-19 17:31:18 DEBUG utils NCP state: None, version: NCP v6.6.2-126 2022-02-19 17:31:18 DEBUG utils Try to update Zigbee NCP to version v6.7.10 2022-02-19 17:31:18 DEBUG elelabs_ezsp_utility RESET FRAME 2022-02-19 17:31:18 DEBUG ezsp NCP first line error: b'@\x00\r\n' 2022-02-19 17:31:18 DEBUG elelabs_ezsp_utility RESET FRAME

rtemelcea avatar Feb 19 '22 15:02 rtemelcea

I am using the custom open telnet command and i am on firmware 1.5.0_0102 stock

rtemelcea avatar Feb 19 '22 15:02 rtemelcea

Try to reboot gateway before change mode

AlexxIT avatar Feb 19 '22 16:02 AlexxIT

This is the new log

2022-02-19 19:07:52  DEBUG    utils         Try to update Zigbee NCP to version v6.7.10
2022-02-19 19:07:52  DEBUG    elelabs_ezsp_utility  RESET FRAME
2022-02-19 19:07:53  DEBUG    elelabs_ezsp_utility  sendVersion: V4
2022-02-19 19:07:53  DEBUG    elelabs_ezsp_utility  EZSP v7 detected
2022-02-19 19:07:53  DEBUG    elelabs_ezsp_utility  sendVersion: V7
2022-02-19 19:07:53  DEBUG    elelabs_ezsp_utility  getValue: VER
2022-02-19 19:07:53  DEBUG    utils         NCP state: normal, version: NCP v6.6.2-126
2022-02-19 19:07:53  DEBUG    elelabs_ezsp_utility  launchStandaloneBootloader: BOOT
2022-02-19 19:07:56  DEBUG    elelabs_ezsp_utility  RESET FRAME
2022-02-19 19:07:56  DEBUG    ezsp          NCP first line error: b'@\x00\r\n'
2022-02-19 19:07:56  DEBUG    utils         NCP state: None, version: NCP v6.6.2-126
2022-02-19 19:07:56  DEBUG    utils         Try to update Zigbee NCP to version v6.7.10
2022-02-19 19:07:56  DEBUG    elelabs_ezsp_utility  RESET FRAME
2022-02-19 19:07:56  DEBUG    ezsp          NCP first line error: b'@\x00\r\n'
2022-02-19 19:07:56  DEBUG    elelabs_ezsp_utility  RESET FRAME
2022-02-19 19:08:00  DEBUG    base          10.11.0.6 [MQTT] zigbee/send b'{"cmd":"report","id":2000000009,"did":"lumi.0","time":1645290478796,"rssi":0,"zseq":0,"params":[{"res_name":"8.0.2024","value":0},{"res_name":"8.0.2157","value":27044}],"dev_src":"0"}'
2022-02-19 19:08:00  DEBUG    base          10.11.0.6 [LUMI] 6490c1781978 (lumi.gateway.mgl03) recv {'channel': 0}
2022-02-19 19:08:06  DEBUG    ezsp          NCP first line error: b"'\xf8\x8c\x861\x86\xa9\x95\xd0l\xe5\x13\xd8E|\x07\xe4\x13\x07\xaf%\xb0\x88%\xfa\xae\xa61\x86\xa9\x95\x90L\xe11\xd8G\\\x07\xa4\x13\x07\x8f\x07\xb0\x88"
2022-02-19 19:08:06  DEBUG    utils         NCP flash error
2022-02-19 19:08:06  DEBUG    utils         Try to update Zigbee NCP to version v6.7.10
2022-02-19 19:08:06  DEBUG    elelabs_ezsp_utility  RESET FRAME
2022-02-19 19:08:06  DEBUG    ezsp          NCP first line error: b'@\x00\r\n'
2022-02-19 19:08:06  DEBUG    elelabs_ezsp_utility  RESET FRAME
2022-02-19 19:08:16  DEBUG    ezsp          NCP first line error: b'%\xf8\xae\xa6\x13\x86\x8b\x97\xd0l\xe1\x13\xd8e|\x07\xe4\x13\x07\xaf%\xb0\x88%\xfa\xae\x861\x86\xa9\x95\x90L\xe11\xd8G\\\x07\xa4\x13\x07\x8f\x07\xf0\x88'
2022-02-19 19:08:16  DEBUG    utils         NCP flash error

rtemelcea avatar Feb 19 '22 17:02 rtemelcea

image

Here is my hassio config

rtemelcea avatar Feb 19 '22 17:02 rtemelcea

Tell the story of your gateway. What have you done with it before? From the beginning. Have you flashed it? Or anything else.

AlexxIT avatar Feb 20 '22 15:02 AlexxIT

Bought it around September 2020, used it for a while directly in homekit and mi app. After that I decided to go with homeassistant and used your integration around the beginning of 2021. Everything worked fine until the first version after 1.5.1. Over time i had a combination of the modded firmware and stock firmware, only recommended versions from your github. Now I have stock firmware, but I even tried the modded firmware. Is there a way to manually update the NCP firmware and in a verbose way to debug it more?

Razvan Temelcea

rtemelcea avatar Feb 20 '22 16:02 rtemelcea

Yes. You can manually change firmware via telnet https://github.com/zvldz/mgl03_fw/tree/main/zigbee

This is the first time I've seen such an error. Is the zigbee chip working now? Can it work with Xiaomi/Aqara devices in MiHome mode?

I know how to recover a zigbee chip from very difficult situations. Let me know if manual installation via telnet does not help.

AlexxIT avatar Feb 21 '22 10:02 AlexxIT

As of right now, I rolled back to 1.5.1 and I’m using zha that way. Also tried using my Xiaomi bulbs with mi app and they work. When I have the chance, I will update the zigbee firmware manually and I will post the results. To make sure, I should update the firmware, install the 2.0.5 version then enable zha.

Razvan Temelcea

rtemelcea avatar Feb 21 '22 15:02 rtemelcea

I experienced the same issue. Tried manually flash the zigbee firmware via telnet, and for me it is not working on 1.5.1 mod, 1.5.1 stock, 1.5.0 mod, 1.5.0 stock. It seems the progress always stuck at Detecting EZSP version. I ended up flash the firmware back to 1.4.6 mod and it was able to detect EZSP v7 and flashed the zigbee firmware succesfully.

jiajiey avatar Feb 22 '22 14:02 jiajiey

The same error on 2.0.4, 2.0.6 versions of Xiaomi Gateway 3, firmware version 1.5.0_0102

vagabondan avatar Feb 23 '22 22:02 vagabondan

Detected EZSP v7 Rebooting to bootloader Sending upload command Sending ncp-uart-sw_mgl03_6_7_10_z2m.gbl, 1548 blocks: Give your local XMODEM re ceive command now. Xmodem sectors/kbytes sent: 0/ 0kRetry 0: Got 0d for sector ACK

Retry 0: Got 0d for sector ACK Retry 0: Got 0d for sector ACK Retry 0: Got 0d for sector ACK

Upgraded to 1.5.1 modded . This is the manual zigbee firmware upgrade(tries take a lot of time) Issue happens on 1.4.7 modded and 1.5.0 modded

rtemelcea avatar Feb 27 '22 22:02 rtemelcea

Any suggestion?

rtemelcea avatar Mar 13 '22 23:03 rtemelcea

Please reopen the issue if it is still relevant

AlexxIT avatar Apr 09 '23 05:04 AlexxIT