fairecasoimeme / ZiGatev2

ZiGate+ (v2) universal zigbee gateway
https://zigate.fr
22 stars 6 forks source link

8000 message: what is status 06 ? #50

Open tcharp38 opened 2 years ago

tcharp38 commented 2 years ago

One of the users who moved to 0005-0322 release get bunch of errors I never saw. So what means status 06 in 8000 message ? Thanks

[23:24:24] Abeille1, Type=8000/Status, Status=00/Success, SQN=00, PacketType=0009, Sent=00, SQNAPS=4E, NPDU=00, APDU=00
[23:24:24] Abeille1, Type=8009/Network state response, Addr=0000, ExtAddr=00158D0006A40016, PANId=1FC3, ExtPANId=15105AC0878E6BD0, Chan=11
[23:24:24] Abeille1, Type=8000/Status, Status=00/Success, SQN=00, PacketType=0024, Sent=00, SQNAPS=4E, NPDU=00, APDU=00
[23:24:24] Abeille1, Type=8000/Status, Status=00/Success, SQN=00, PacketType=0016, Sent=00, SQNAPS=4E, NPDU=00, APDU=00
[23:24:24] Abeille1, Type=8000/Status, Status=00/Success, SQN=00, PacketType=0010, Sent=00, SQNAPS=00, NPDU=00, APDU=00
[23:24:24] Abeille1, Type=8010/Version, Appli=0005, SDK=0322
[23:24:24] Abeille1, Type=8000/Status, Status=00/Success, SQN=00, PacketType=0002, Sent=00, SQNAPS=4E, NPDU=00, APDU=00
[23:24:24]   Zigate mode has been properly changed.
[23:24:35] Abeille1, Type=8012/APS data confirm, Status=00, Addr=FFFC, SQNAPS=4F, NPDU=01, APDU=00
[23:25:04] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=4F, NPDU=00, APDU=00
[23:25:07] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=4F, NPDU=00, APDU=00
[23:25:10] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=4F, NPDU=00, APDU=00
[23:25:13] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=4F, NPDU=00, APDU=00
[23:25:16] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=4F, NPDU=00, APDU=00
[23:25:19] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=4F, NPDU=00, APDU=00
[23:25:22] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=4F, NPDU=00, APDU=00
[23:25:25] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=4F, NPDU=00, APDU=00
[23:25:28] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=4F, NPDU=00, APDU=00
[23:25:31] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=4F, NPDU=00, APDU=00
[23:25:34] Abeille1, Type=8000/Status, Status=00/Success, SQN=00, PacketType=0010, Sent=00, SQNAPS=00, NPDU=00, APDU=00
[23:25:34] Abeille1, Type=8010/Version, Appli=0005, SDK=0322
fairecasoimeme commented 2 years ago

Could I have the debug info from the 0x0100 packet which give the message status ? Status : 0x0006 could be an endpoint unknow

tcharp38 commented 2 years ago

So same trouble with FW 3.21 Endpoint should be known. No mistake.

[2022-11-15 20:46:39]   sendCmdToZigate(Dest=Abeille1, cmd=0010, datas=)
[2022-11-15 20:46:39] Abeille1, Type=8000/Status, Status=00/Success, SQN=00, PacketType=0010, Sent=00, SQNAPS=00, NPDU=00, APDU=00
[2022-11-15 20:46:39] Abeille1, Type=8010/Version, Appli=0005, SDK=0321

[2022-11-15 20:46:42]   prepareCmd(4, CmdAbeille1/4134/OnOff, Action=Off&EP=01)
[2022-11-15 20:46:42]     addCmdToQueue2(Pri=1, Net=Abeille1, Cmd=0092, Payload=024134010100, Addr=4134, AddrMode=02)
[2022-11-15 20:46:42]   sendCmdToZigate(Dest=Abeille1, cmd=0092, datas=024134010100)
[2022-11-15 20:46:42] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0092, Sent=01, SQNAPS=DF, NPDU=00, APDU=00

[2022-11-15 20:46:45]   prepareCmd(4, CmdAbeille1/4134/readAttribute, ep=01&clustId=0006&attrId=0000)
[2022-11-15 20:46:45]     addCmdToQueue2(Pri=4, Net=Abeille1, Cmd=0100, Payload=0241340101000600000000010000, Addr=4134, AddrMode=02)
[2022-11-15 20:46:45]   sendCmdToZigate(Dest=Abeille1, cmd=0100, datas=0241340101000600000000010000)
[2022-11-15 20:46:45] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=DF, NPDU=00, APDU=00
fairecasoimeme commented 1 year ago

So it's weird, there are no reasons. This happens with only one device or all ? Perhaps re-pair the device ? To understand what is the problem, you have to sniff the sequence.

tcharp38 commented 1 year ago

Unfortunately I don't have this pb myself. But he did reflash zigate + erase PDM several times and therefore did repairing. This is really strange and never saw this error before.

tcharp38 commented 1 year ago

Last news..

The user discovered that there is a link with number of registered groups in Zigate. 5 seems ok, 6 may lead to this issue but at least one way to trig this error is to "dump" zigate content with ./DK6Programmer -s /dev/ttyAMA0 -P 115200 -d FLASH:@0x96000=NVM_dump.bin

Removing 1 group seems to remove 06 status.

No idea what it means. These are just observations. Does it inspire something to you ?

tcharp38 commented 1 year ago

Error 6 is back. After a SW reset, the zigate v2 sends 8000 with 06 status, then crash as shown with 8001 looping

The sequence of this crash is

[2023-02-12 19:18:16] Abeille1, Type=0302/PDM loaded (unused). [2023-02-12 19:18:16] Abeille1, Type=8024/Network joined-formed, Status='Formed new network', Addr=0000, ExtAddr=00158D0006A40016, Chan=11 [2023-02-12 19:18:16] Abeille1, Type=8006/Non “Factory new” Restart (unused). [2023-02-12 19:18:16] Abeille1, Type=8001/Log message (unused). [2023-02-12 19:19:03] Abeille1, Type=8000/Status, Status=00/Success, SQN=00, PacketType=0010, Sent=00, SQNAPS=00, NPDU=00, APDU=00 [2023-02-12 19:19:03] Abeille1, Type=8010/Version, Appli=0005, SDK=0321 [2023-02-12 19:19:04] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=91, NPDU=00, APDU=00 [2023-02-12 19:19:04] Abeille1, Type=8000/Status, Status=06/Unknown-06, SQN=00, PacketType=0100, Sent=01, SQNAPS=91, NPDU=00, APDU=00

"readAttribute" that generates 06 status are

8001 decoding gives

 Bus Fault Handler  Stack Register Dump R0 = 0x00000005 R1 = 0x00000000 R2 = 0x000000E0 R3 = 0x02010100 R12 = 0x0000002A LR [R14] = 0x0001964F  [Subroutine Call Return Address] PC [R15] = 0x000187D6  [Program counter] PSR = 0x21000000 REG_SYSTEM_HANDLER_CNTRL_STATE = 0x00070002

More details there: https://github.com/KiwiHC16/Abeille/issues/2490

ValFaure commented 1 year ago

Hello, I'm the user who originally opened the issue on the Abeille repo. I can confirm that the number of groups the PiZigate+ is linked to seems to be important in this case.

Since a few days I've been using the Zigate with only 4 groups and did not get any loss of communication with the equipements, wheareas I couldn't go more than 48 hours without having the Zigate in timeout before that (when linking 6 groups).

Let me know if I can do any more tests that would help.

fairecasoimeme commented 1 year ago

Hello everyone, Sorry for this problem. I confirm that the number of groups greater than five causes this problem. The next firmware release should fix this. The next version seems to be OK for next month.

fairecasoimeme commented 1 year ago

Hello,

you can update here : https://github.com/fairecasoimeme/ZiGatev2/releases/tag/v3.a0

ValFaure commented 1 year ago

Great ! Nice to know you found a solution. Will try this right away.

tcharp38 commented 1 year ago

Cool. Nice to see new FW here. Thanks @fairecasoimeme @ValFaure I let you test v3A0 FW