darkxst / silabs-firmware-builder

Silicon Labs firmware builder
https://darkxst.github.io/silabs-firmware-builder/
268 stars 25 forks source link

Problem with flashing sonoff-e with firmware ezsp 7.3.1.0 #14

Closed mamrai1 closed 10 months ago

mamrai1 commented 10 months ago

https://github.com/Koenkk/zigbee-herdsman/issues/319#issuecomment-1674295841

Also tried flashing nvm3 and then reflashing ezsp 7.3.1. 0 on sonoff zbdongle e but i can't probe the device

mamrai1 commented 10 months ago

with 7.2.20 flashing and probe ok. z2m works ok with 7.2.3 flashing and probe ok but z2m fails to start: 2023-08-14T04:36:53.002Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (5) success 2023-08-14T04:36:53.002Z zigbee-herdsman:adapter:ezsp:driv Network ready 2023-08-14T04:36:53.003Z zigbee-herdsman:adapter:ezsp:debg Device join request received: 0 e0798dfffe7d7366 2023-08-14T04:36:53.004Z zigbee-herdsman:adapter:ezsp:debg Requesting 'Node Descriptor' for '0' 2023-08-14T04:36:53.005Z zigbee-herdsman:adapter:ezsp:driv ZDO Node_Desc_req params: {"dstaddr":0} 2023-08-14T04:36:53.007Z zigbee-herdsman:adapter:ezsp:driv EZSP nwk=0, IEEE=0xe0798dfffe7d7366 2023-08-14T04:36:53.007Z zigbee-herdsman:adapter:ezsp:ezsp ==> getKey: {"keyType":1} 2023-08-14T04:36:53.007Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"cls":"getKey","id":106,"isRequest":true,"keyType":1} 2023-08-14T04:36:53.008Z zigbee-herdsman:adapter:ezsp:uart --> DATA (5,6,0): 1d00016a0001 2023-08-14T04:36:53.008Z zigbee-herdsman:adapter:ezsp:uart --> [565f21a93e2a14d1337e] 2023-08-14T04:36:53.008Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (6) 2023-08-14T04:36:53.008Z zigbee-herdsman:adapter:ezsp:ezsp ==> setExtendedTimeout: {"remoteEui64":{"_value":{"type":"Buffer","data":[224,121,141,255,254,125,115,102]}},"extendedTimeout":true} 2023-08-14T04:36:53.017Z zigbee-herdsman:adapter:ezsp:uart <-- [665fa1a93e2a15a85995b5f28fb69e60047c65ddf5535d7a9f766319f87d5e3fa7ebcdde09fc82392458ab8927e27e] 2023-08-14T04:36:53.018Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (6,6,0): 665fa1a93e2a15a85995b5f28fb69e60047c65ddf5535d7a9f766319f87e3fa7ebcdde09fc82392458ab8927e27e 2023-08-14T04:36:53.018Z zigbee-herdsman:adapter:ezsp:uart --> ACK (7) 2023-08-14T04:36:53.018Z zigbee-herdsman:adapter:ezsp:uart --> [87009f7e] 2023-08-14T04:36:53.018Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 1d80016a00001a0001ffd725e30c2998324276189d3af162b000900400000000000066737dfeff8d79e0 2023-08-14T04:36:53.019Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x6a: {"cls":"getKey","id":106,"isRequest":false,"status":0,"keyStruct":{"bitmask":26,"type":1,"key":{"contents":[255,215,37,227,12,41,152,50,66,118,24,157,58,241,98,176]},"outgoingFrameCounter":299008,"incomingFrameCounter":0,"sequenceNumber":0,"partnerEUI64":{"type":"Buffer","data":[224,121,141,255,254,125,115,102]}}} 2023-08-14T04:36:53.019Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (6) success 2023-08-14T04:36:53.019Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"cls":"setExtendedTimeout","id":126,"isRequest":true,"remoteEui64":{"_value":{"type":"Buffer","data":[224,121,141,255,254,125,115,102]}},"extendedTimeout":true} 2023-08-14T04:36:53.019Z zigbee-herdsman:adapter:ezsp:uart --> DATA (6,7,0): 1e00017e0066737dfeff8d79e001 2023-08-14T04:36:53.020Z zigbee-herdsman:adapter:ezsp:uart --> [675c21a92a2a73c1246ab5a8d3b5937b9e7e] 2023-08-14T04:36:53.020Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (7) 2023-08-14T04:36:53.020Z zigbee-herdsman:adapter:ezsp:driv TRUST_CENTER_LINK_KEY: {"cls":"getKey","id":106,"isRequest":false,"status":0,"keyStruct":{"bitmask":26,"type":1,"key":{"contents":[255,215,37,227,12,41,152,50,66,118,24,157,58,241,98,176]},"outgoingFrameCounter":299008,"incomingFrameCounter":0,"sequenceNumber":0,"partnerEUI64":{"type":"Buffer","data":[224,121,141,255,254,125,115,102]}}} 2023-08-14T04:36:53.020Z zigbee-herdsman:adapter:ezsp:ezsp ==> getKey: {"keyType":3} 2023-08-14T04:36:53.025Z zigbee-herdsman:adapter:ezsp:uart <-- [775ca1a92a2ace1e7e] 2023-08-14T04:36:53.025Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (7,7,0): 775ca1a92a2ace1e7e 2023-08-14T04:36:53.025Z zigbee-herdsman:adapter:ezsp:uart --> ACK (0) 2023-08-14T04:36:53.025Z zigbee-herdsman:adapter:ezsp:uart --> [8070787e] 2023-08-14T04:36:53.025Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 1e80017e00 2023-08-14T04:36:53.025Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x7e: {"cls":"setExtendedTimeout","id":126,"isRequest":false} 2023-08-14T04:36:53.025Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (7) success 2023-08-14T04:36:53.026Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"cls":"getKey","id":106,"isRequest":true,"keyType":3} 2023-08-14T04:36:53.026Z zigbee-herdsman:adapter:ezsp:uart --> DATA (7,0,0): 1f00016a0003 2023-08-14T04:36:53.026Z zigbee-herdsman:adapter:ezsp:uart --> [705d21a93e2a16b5e27e] 2023-08-14T04:36:53.026Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (0) 2023-08-14T04:36:53.026Z zigbee-herdsman:adapter:ezsp:ezsp ==> sendUnicast: {"type":0,"indexOrDestination":0,"apsFrame":{"clusterId":2,"profileId":0,"sequence":2,"sourceEndpoint":0,"destinationEndpoint":0,"groupId":0,"options":256},"messageTag":3,"message":{"type":"Buffer","data":[2,0,0]}} 2023-08-14T04:36:53.035Z zigbee-herdsman:adapter:ezsp:uart <-- [005da1a93e2a15b15997bd506304bbafca27e0fc6856190a5ef962f96a7d5e3fa7ebcdde6f8fffc7dbd5d2692d8a7e] 2023-08-14T04:36:53.036Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (0,0,0): 005da1a93e2a15b15997bd506304bbafca27e0fc6856190a5ef962f96a7e3fa7ebcdde6f8fffc7dbd5d2692d8a7e 2023-08-14T04:36:53.036Z zigbee-herdsman:adapter:ezsp:uart --> ACK (1) 2023-08-14T04:36:53.036Z zigbee-herdsman:adapter:ezsp:uart --> [8160597e] 2023-08-14T04:36:53.036Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 1f80016a0000030003f775c95129e65669c75785987e81a33f0170960000000000000000000000000000 2023-08-14T04:36:53.036Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x6a: {"cls":"getKey","id":106,"isRequest":false,"status":0,"keyStruct":{"bitmask":3,"type":3,"key":{"contents":[247,117,201,81,41,230,86,105,199,87,133,152,126,129,163,63]},"outgoingFrameCounter":9859073,"incomingFrameCounter":0,"sequenceNumber":0,"partnerEUI64":{"type":"Buffer","data":[0,0,0,0,0,0,0,0]}}} 2023-08-14T04:36:53.036Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (0) success 2023-08-14T04:36:53.036Z zigbee-herdsman:adapter:ezsp:ezsp ==> {"cls":"sendUnicast","id":52,"isRequest":true,"type":0,"indexOrDestination":0,"apsFrame":{"clusterId":2,"profileId":0,"sequence":2,"sourceEndpoint":0,"destinationEndpoint":0,"groupId":0,"options":256},"messageTag":3,"message":{"type":"Buffer","data":[2,0,0]}} 2023-08-14T04:36:53.037Z zigbee-herdsman:adapter:ezsp:uart --> DATA (0,1,0): 200001340000000000000200000000010000020303020000 2023-08-14T04:36:53.037Z zigbee-herdsman:adapter:ezsp:uart --> [016221a9602a15b259944a27aa5592499d4e27a9eecd658bfda8557e] 2023-08-14T04:36:53.037Z zigbee-herdsman:adapter:ezsp:uart -?- waiting (1) 2023-08-14T04:36:53.037Z zigbee-herdsman:adapter:ezsp:driv CURRENT_NETWORK_KEY: {"cls":"getKey","id":106,"isRequest":false,"status":0,"keyStruct":{"bitmask":3,"type":3,"key":{"contents":[247,117,201,81,41,230,86,105,199,87,133,152,126,129,163,63]},"outgoingFrameCounter":9859073,"incomingFrameCounter":0,"sequenceNumber":0,"partnerEUI64":{"type":"Buffer","data":[0,0,0,0,0,0,0,0]}}} 2023-08-14T04:36:53.044Z zigbee-herdsman:adapter:ezsp:uart <-- [7d3162a1a9602a0d42b83f7e] 2023-08-14T04:36:53.045Z zigbee-herdsman:adapter:ezsp:uart <-- DATA (1,1,0): 1162a1a9602a0d42b83f7e 2023-08-14T04:36:53.045Z zigbee-herdsman:adapter:ezsp:uart --> ACK (2) 2023-08-14T04:36:53.045Z zigbee-herdsman:adapter:ezsp:uart --> [82503a7e] 2023-08-14T04:36:53.045Z zigbee-herdsman:adapter:ezsp:ezsp <== Frame: 208001340018f0 2023-08-14T04:36:53.045Z zigbee-herdsman:adapter:ezsp:ezsp <== 0x34: {"cls":"sendUnicast","id":52,"isRequest":false,"status":24,"sequence":240} 2023-08-14T04:36:53.045Z zigbee-herdsman:adapter:ezsp:uart -+- waiting (1) success 2023-08-14T04:36:53.045Z zigbee-herdsman:adapter:ezsp:erro zdoRequest error 2023-08-14T04:36:53.046Z zigbee-herdsman:adapter:ezsp:debg Node descriptor request for '0' failed (Error: ZdoRequest error), retry Error: ZdoRequest error at Driver.zdoRequest (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:573:19) at EZSPAdapter.nodeDescriptorInternal (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:373:28) at Object.func (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:363:32) at Queue.executeNext (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:32:32)

darkxst commented 10 months ago

can you try 7.1.5 again (Same link). Rebuilt to drop token interface added to my configs around 7.3.

mamrai1 commented 10 months ago

can you try 7.1.5 again (Same link). Rebuilt to drop token interface added to my configs around 7.3.

i was about to write that i suspect something with the token in the nvm

mamrai1 commented 10 months ago

flash715new.log

can you try 7.1.5 again (Same link). Rebuilt to drop token interface added to my configs around 7.3.

i was about to write that i suspect something with the token in the nvm

no same results. probing fails

flash715new.log probe715new.log

darkxst commented 10 months ago

i was about to write that i suspect something with the token in the nvm

had you previously overwritten IEEE address?

darkxst commented 10 months ago

with 7.2.20 flashing and probe ok. z2m works ok with 7.2.3 flashing and probe ok but z2m fails to start:

were these my builds or xsp1989's?

mamrai1 commented 10 months ago

i was about to write that i suspect something with the token in the nvm

had you previously overwritten IEEE address?

no only flashed nvm3 file after downgrading to 6.10 version. backup/restore with bellows works. In the backup file is noticed these lines:

        "ezsp": {
            "manufacturer": "",
            "board": "",
            "version": "7.1.1.0 build 273",
            "stack_version": 9,
            "can_burn_userdata_custom_eui64": true,
            "can_rewrite_custom_eui64": false
        }
mamrai1 commented 10 months ago

with 7.2.20 flashing and probe ok. z2m works ok with 7.2.3 flashing and probe ok but z2m fails to start:

were these my builds or xsp1989's?

no xsp1989's give me some time to check also yours

mamrai1 commented 10 months ago

no probing on both 7.2.2. and 7.2.3 probe722tim.log probe723tim.log

Also tried downgrading to original 6.10.3 from itead and probing fails..Stick is stuck at bootloader. i haven't tried to flash the nvm3 file thought and reflashed directly to 7.1.1

mamrai1 commented 10 months ago

flash731.log nvm.log probeafternvm.log Fixed!! need to flash nvm3_initfile.gbl after flashing your firmwares Tim!! @wastez you can backup the stick with zigpy-cli and then restore it after flashing! commands:

  1. zigpy radio --baudrate 115200 ezsp /dev/ttyACM0 backup zigbee-backup.json
  2. universal-silabs-flasher --verbose --device /dev/ttyACM0 flash --firmware ncp-uart-hw-v7.3.1.0-zbdonglee-115200.gbl --sonoff-reset
  3. universal-silabs-flasher --verbose --device /dev/ttyACM0 flash --firmware nvm3_initfile.gbl
  4. zigpy radio --baudrate 115200 ezsp /dev/ttyACM0 restore zigbee-backup.json
mamrai1 commented 10 months ago

Rebuilt to drop token interface added to my configs around 7.3.

@darkxst Can we also have the correct firmwares v.7.1.5. for zbdongle under your builds?

darkxst commented 10 months ago

need to flash nvm3_initfile.gbl after flashing your firmwares Tim!!

Upgrades are supposed to migrate when the format changes, but good to know.

Can we also have the correct firmwares v.7.1.5. for zbdongle under your builds?

Sure, I will copy back the test builds (with token interface) to the main repo.

mamrai1 commented 10 months ago

need to flash nvm3_initfile.gbl after flashing your firmwares Tim!!

Upgrades are supposed to migrate when the format changes, but good to know.

Probably the issue was the firmwares i used on my stick from @xsp1989.

Can we also have the correct firmwares v.7.1.5. for zbdongle under your builds?

Sure, I will copy back the test builds (with token interface) to the main repo.

Thanks

wastez commented 10 months ago

@mamrai1 Really great that it is working now, but i thought you already did this? (flashing nvm3 after upgrade)

And backup and restore function works without problems? (don't want to rapair everthing)

And any problems with 7.3.1 so far? 7.2.2 makes problems on my setup, that was the reason why i'm asking...... (it begin to hang on some devices)

mamrai1 commented 10 months ago

@mamrai1 Really great that it is working now, but i thought you already did this? (flashing nvm3 after upgrade) Didn't flash it after changing to @darkxst firmware cause flashing other firmware from 7.1.1 to 7.2.2 was working

And backup and restore function works without problems? (don't want to rapair everthing)

Unfortunately child devices connected directly to coordinator might need repairing.

And any problems with 7.3.1 so far? 7.2.2 makes problems on my setup, that was the reason why i'm asking...... (it begin to hang on some devices)

Too early to know.. That's why i asked Tim to upload also 7.1.5 versions

darkxst commented 10 months ago

Here is a branch for 7.1 builds, can easily be updated if Silabs release further updates for this series.. https://github.com/darkxst/silabs-firmware-builder/tree/ezsp7.1/firmware_builds/zbdonglee

wastez commented 10 months ago

@mamrai1

After devices began to hang in 7.2.2 it was not possible to build a map anymore? Do you have this problems?

This happens after a few minutes......

mamrai1 commented 10 months ago

@mamrai1

After devices began to hang in 7.2.2 it was not possible to build a map anymore? Do you have this problems?

This happens after a few minutes......

That was the reason i stayed on 7.1.1. No i have flashed 7.3.1 and waiting to see what happens.. All good so far. Need to repair 2 aqara/xiami sensors that where directly connected to the coordinator but i'm out of the house.. Will fix rhat tomorrow night

wastez commented 10 months ago

I'm unsure if i should do it.... Any news here? The backup restore doesn't make me confident.

mamrai1 commented 10 months ago

But if don't have any problems with 7.1.1 why upgrade?

wastez commented 10 months ago

But if don't have any problems with 7.1.1 why upgrade?

Also thought about it but maybe 7.3.1 will work better (faster for example) But this is not so important. And i also read that the new firmwares are better in range.

Do you have problems under 7.1.1?

mamrai1 commented 10 months ago

Not really.. I have only some bosch motion sensors that sometimes if the parent is unavailable(due to power cut) they stopped reporting motion detection instead of jumping to another parent and i wanted to check if the 7.3.1 helps

wastez commented 10 months ago

@mamrai1 But I’m right that you had the same problem like me on 7.2.2 (hang after a while and no map building?) And these problems don’t appear with 7.3.1 now?

mamrai1 commented 10 months ago

@mamrai1 But I’m right that you had the same problem like me on 7.2.2 (hang after a while and no map building?) And these problems don’t appear with 7.3.1 now?

Yes i confirm the problem with 7.2.2. No problem with 731

wastez commented 10 months ago

Cool. One last question. Have you ever had problems with the backup and restore function? Or is it working every time as it should?

wastez commented 10 months ago

OK i did it and everything worked really well. 2 Devices were child devices of the coordinator and i thought i have to repair it but this was not the case.

As far as i can say the firmware works really well.

wastez commented 10 months ago

@mamrai1 Just want to give you a short status about the firmware. Until now it seems to be better then 7.1.1. Performance is better and also the range increased, until now i'm happy with it.

mamrai1 commented 10 months ago

Doesn't seem to have any affect on range. Of course i already had the trandmit power set to 9db under configuration file:

serial: port: /dev/ttyACM1 adapter: ezsp baudrate: 115200 rtscts: false advanced: transmit_power: 9

Nevertheless the range is still way better than cc2562p. I flashed my cc2652p with router firmware and placed it on the ground floor of the house...network now is very stable

mamrai1 commented 10 months ago

@wastez I also confirm that the 731 firmware with 230400 baudrate also works! If you flash it don't forget to add under configuration yaml the "baudrate: 230400"

wastez commented 10 months ago

@mamrai1 I‘m using the 115200 now. Do you get a better performance with the 234000? Should be in theory….. I also think the 7.3.1 is the best firmware until now.

mamrai1 commented 10 months ago

Not really.. I don't have too many devices to spot any difference in performance. Yes, indeed is the best firmware so far.

darkxst commented 10 months ago

Do you get a better performance with the 234000? Should be in theory…..

It probably wont make any difference for NCP firmware. Yes Zigbee bandwidth is 256k but that is not all going over the serial link for NCP. The higher baudrates are mainly important for the RCP firmwares (Multi-pan in particular) where that data is traversing the serial link.

wastez commented 10 months ago

@darkxst How good are the rcp firmwares working? Are they as fast as the ncp when controlling devices and also so stable using zigbee.

Already thought about it but until I’vent tried it because I have external tbr‘s which are working the most of the time (sometimes I’ve to restart them because of routing problems)

darkxst commented 10 months ago

Generally they are working well, for small networks atleast I have not noticed any Zigbee performance differences to NCP. The shared radio may have some impact on larger networks, but at the same time there is more memory available for routing/child tables so....

The UX around commissioning/pairing thread devices is still a bit rough though (applies equally to skyconnect). Only android can be used for pairing last I checked (iOS had bugs). likely wont work if you also have a Nest OTBR etc. Must use HAOS also, getting it too work on any other install type is likely to be painful. So still squarely in the experimental category, but Thread works well once connected.

The recommended path for thread on HA is still to use Amazon, Nest or Apple TBR's apparently.

mamrai1 commented 10 months ago

@mamrai1 Just want to give you a short status about the firmware. Until now it seems to be better then 7.1.1. Performance is better and also the range increased, until now i'm happy with it.

Seems that the 7.3.1 firmware is crashing my cc2652p router.. Devices that can change router work ok(they jump to another router) but xiaomi o es not. At least the messages are delivered to the coordinator.. On the map they are shown as sibling not childs of the router. Maybe is not the firmware on the coordinator and there is some kind of memory leak on the router.. I will reflash the router and report back