fairecasoimeme / ZiGate

Zigate is an Universal Zigbee Gateway
http://zigate.fr
171 stars 59 forks source link

Doc: need enhancement for cmd 8000 status #330

Open tcharp38 opened 4 years ago

tcharp38 commented 4 years ago

Ref: https://zigate.fr/documentation/commandes-zigate/#status

The status part of 8000 cmd needs more details. The status 15 is not documented and appears in several cases.

Moreover, how to decode value >=80 ? I assume this is linked to the following stack events:

ZPS_EVENT_NONE ZPS_EVENT_APS_DATA_INDICATION ZPS_EVENT_APS_DATA_CONFIRM ZPS_EVENT_APS_DATA_ACK ZPS_EVENT_NWK_STARTED ZPS_EVENT_NWK_JOINED_AS_ROUTER ZPS_EVENT_NWK_JOINED_AS_ENDDEVICE ZPS_EVENT_NWK_FAILED_TO_START ZPS_EVENT_NWK_FAILED_TO_JOIN ZPS_EVENT_NWK_NEW_NODE_HAS_JOINED ZPS_EVENT_NWK_DISCOVERY_COMPLETE ZPS_EVENT_NWK_LEAVE_INDICATION ZPS_EVENT_NWK_LEAVE_CONFIRM ZPS_EVENT_NWK_STATUS_INDICATION ZPS_EVENT_NWK_ROUTE_DISCOVERY_CONFIRM ZPS_EVENT_NWK_POLL_CONFIRM ZPS_EVENT_NWK_ED_SCAN ZPS_EVENT_ZDO_BIND ZPS_EVENT_ZDO_UNBIND ZPS_EVENT_ZDO_LINK_KEY ZPS_EVENT_BIND_REQUEST_SERVER ZPS_EVENT_ERROR ZPS_EVENT_APS_INTERPAN_DATA_INDICATION ZPS_EVENT_APS_INTERPAN_DATA_CONFIRM ZPS_EVENT_TC_STATUS

But how to decode for example status 80 ?

Thanks

pipiche38 commented 4 years ago

Error 0x15 --> #334

pipiche38 commented 4 years ago

Error 0x80, can you elaborate on which condition did you get ?

So far we have been able to identify 0x80 on the Bind ( 0x0030 ) command

0x80 --> ZPS_APL_ZDP_E_INV_REQUESTTYPE

tcharp38 commented 4 years ago

I will check this and try to find more infos for 0x80.

In the meantime, could you elaborate on status ? I still don't understand the mapping between status code and ZPS_EVENTxxxxx codes. Or may be there is no link at all. Zigate doc is just talking about 0 to 5, and then 128.

pipiche38 commented 4 years ago

In the meantime, could you elaborate on status ? I still don't understand the mapping between status code and ZPS_EVENTxxxxx codes. Or may be there is no link at all. Zigate doc is just talking about 0 to 5, and then 128.

I leave it to the firmware gurus'

tcharp38 commented 4 years ago

Hmmm if you, who I consider a guru too, don't know this we clearly need that @fairecasoimeme update the doc to be sure about our understandings :) Thanks for all your feedbacks by the way.

tcharp38 commented 4 years ago

Just to complete, if my understanding is correct, the Status is

Correct ?

G1K commented 3 years ago

@fairecasoimeme In the documentation https://zigate.fr/documentation/commandes-zigate/#status

Status: |  
-- | --
  |   |   | 0 = Success |  
  |   |   | 1 = Incorrect parameters |  
  |   |   | 2 = Unhandled command |  
  |   |   | 3 = Command failed |  
  |   |   | 4 = Busy (Node is carrying out a lengthy operation and is currently unable to handle the incoming command)
  |   |   | 5 = Stack already started (no new configuration accepted) |  
  |   |   | 128 – 244 = Failed (ZigBee event codes)

In the code https://github.com/fairecasoimeme/ZiGate/blob/2557e46c116eefbd2210575fd24627dedd72f7d1/Module%20Radio/Firmware/src/ZiGate/Source/ZigbeeNodeControlBridge/SerialLink.h#L367-L380

It turns out that the status 3 != failed , == Busy ? status 5 does not exist, and 4 is Stack already started?

tcharp38 commented 3 years ago

Autre discussion en // https://zigate.fr/forum/topic/commande-0x8000-status-detail-des-zigbee-event-codes/#postid-2141

fairecasoimeme commented 3 years ago

Here is the source doc with infos about 0x8000 command. I have recopied the array but there is errors that I will try to fix JN-AN-1223-ZigBee-IoT-Gateway-Control-Bridge-UserGuide-1014.pdf

tcharp38 commented 3 years ago

Error 0x80, can you elaborate on which condition did you get ?

So far we have been able to identify 0x80 on the Bind ( 0x0030 ) command

0x80 --> ZPS_APL_ZDP_E_INV_REQUESTTYPE

Hi @pipiche38 I have a status 80 back. Context:

[2021-04-09 11:34:59] Abeille1, Type=8014/Permit join status response, PermitJoinStatus=01 [2021-04-09 11:34:59] Zigate1 en mode INCLUSION [2021-04-09 11:35:05] Abeille1, Type=8000/Status, Status=00/Success, SQN=00, PacketType=0014 [2021-04-09 11:35:05] Abeille1, Type=8014/Permit join status response, PermitJoinStatus=01 [2021-04-09 11:35:05] Zigate1 en mode INCLUSION [2021-04-09 11:35:05] Abeille1, Type=004d/Device announce, Addr=E1AE, ExtAddr=00124B002242C5C5, MACCapa=80, Rejoin=00, [Modelisation] [2021-04-09 11:35:06] Abeille1, Type=8000/Status, Status=80/Status 80 inconnu, SQN=00, PacketType=0045 [2021-04-09 11:35:07] Abeille1, Type=8000/Status, Status=80/Status 80 inconnu, SQN=00, PacketType=0045 [2021-04-09 11:35:08] Abeille1, Type=8000/Status, Status=80/Status 80 inconnu, SQN=00, PacketType=0045 [2021-04-09 11:35:09] Abeille1, Type=8000/Status, Status=80/Status 80 inconnu, SQN=00, PacketType=0045

Any clue ?

tcharp38 commented 3 years ago

Bon j'ai débloqué la situation par un erase PDM donc j'ai perdu tous mes EQ mais le status 80 apparait sur d'autres paquets.

[2021-04-09 12:49:17] Abeille1, Type=8000/Status, Status=00/Success, SQN=7C, PacketType=0041 [2021-04-09 12:49:17] Abeille1, Type=8000/Status, Status=00/Success, SQN=7D, PacketType=0041 [2021-04-09 12:49:17] Abeille1, Type=8000/Status, Status=80/Status 80 inconnu, SQN=00, PacketType=0041 [2021-04-09 12:49:18] Abeille1, Type=8000/Status, Status=80/Status 80 inconnu, SQN=00, PacketType=0041 [2021-04-09 12:49:19] Abeille1, Type=8000/Status, Status=80/Status 80 inconnu, SQN=00, PacketType=0041