antst / CC2538-ZNP-Coordinator-firmware

69 stars 15 forks source link

No network route (205) after znp restart #6

Open hobbyquaker opened 5 years ago

hobbyquaker commented 5 years ago

Doing a restart of the znp (by rebooting the computer or by disconnecting USB) leads to No network route (205) errors and no reception of messages. Devices need to be re-paired then. I have the feeling that could be related to the backup-restore (https://github.com/Koenkk/zigbee-herdsman/blob/0ee149fb31dfbd3003abbb6287b8027c57b56e25/src/adapter/z-stack/adapter/backup.ts#L207) and the soft-reset at the end of the restore process. I can also reproduce this by issuing a soft-reset command. If I restart the herdsman only (without reboot) this does not happen - as far as I understand that right then there is no backup-restore and no soft-reset - that's why I think it could have something to do with this. I'm using the latest zigbee-herdsman and the hardware mentioned here: https://github.com/Koenkk/zigbee2mqtt/issues/1568#issuecomment-544282659. Test Setup includes a Philips LWB010 Bulb and the Philips RWL021 "Hue Dimmer Switch".

Is there something I can do to track this down? Can you give me advice on how to debug that or which information I could deliver that would be useful to find out whats going wrong? I also got a sniffer in case that helps.

drbios commented 5 years ago

same problem here ... cc2538-cc2592 and i got the no route error ... any chance of disable the backup option?

drbios commented 5 years ago

@hobbyquaker hello i have the solution:

1 install dev branch (do not forget erase the configuration backup file)

  1. re flash the dongle (erase the chip then program and verify)
  2. start z2m (if you get the configuration.json.bak messege, erase it and start z2m again) 4 re pair your devices

best regards

aromanro commented 4 years ago

We have a similar issue with a custom znp. The problem is that after the stick is unpowered, when it's initialized, it's seen as in 'hold'. The code then tries to start it in coordinator mode, it starts but it enters in network commissioning by itself, instead of restoring the previous network state. This happens despite the nv setting ZCD_NV_STARTUP_OPTION set to restore the network state.

As such, it loses the settings.