espressif / esp-zigbee-sdk

Espressif Zigbee SDK
Apache License 2.0
131 stars 20 forks source link

Route request traffic (TZ-869) #342

Open grebenyuk51 opened 1 month ago

grebenyuk51 commented 1 month ago

Question

In my Zigbee network there is 32 devices. 28 routers. 16 routers are ESP32-C6. Once every 20-30 seconds in sniffer I can see broadcast messages "Route Request, Dst: 0x0000, Src: 0x....[ESP32-c6 router address]". And this traffic generates only ESP32 devices. Another devices (such as Tuya) don't send such messages. What is the purpose of this messages? is it possible to control frequency of this messages?

Additional context.

No response

xieqinan commented 1 month ago

@grebenyuk51 ,

Which version of the ESP-Zigbee-SDK is being used in your project? Could you please try again with version 1.3.1 of the ESP-Zigbee-SDK?

grebenyuk51 commented 1 month ago

Updated to 1.3.1 and have new statistics. You can view file. Network Key for decryption: 35:3c:10:53:c4:55:3f:ce:f3:5b:ec:4c:8c:eb:19:0e new statistics.zip For 50 minutes of monitoring ESP32 routers did 82 route requests and another devices did 0 (zero)

In that moments, when network busy with "Route Request" all commands freezes

Some useful information about devices <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

ieeeAddr | shortAddr | Chip -- | -- | -- 0x404ccafffe4aac90 | 0x24C0 | ESP32 0xf082c0fffedd1c68 | 0x94B4 | Tuya 0x3425b4fffecb5c39 | 0x7786 | Tuya 0x385cfbfffe743887 | 0x9867 | Tuya 0xe0798dfffe51e778 | 0x7D5B | Tuya 0xa4c138b09089f0e5 | 0xA8D5 | Tuya 0xdc8e95fffe45cacf | 0x219D | Tuya 0x385cfbfffe96dde7 | 0xF225 | Tuya 0x385cfbfffef31d3b | 0xEB99 | Tuya 0xa49e69fffe052a69 | 0x606A | Tuya 0xa49e69fffe01344e | 0x2769 | Tuya 0x385cfbfffe901404 | 0x4B44 | Tuya 0xa49e69fffe012a0f | 0xAB31 | Tuya 0xe0798dfffe51e885 | 0xA2C | Tuya 0xa4c13813ff646f3f | 0x9AED | Tuya 0x404ccafffe446ff4 | 0x58F4 | ESP32 0x404ccafffe429980 | 0xD81C | ESP32 0x404ccafffe42b610 | 0x1B96 | ESP32 0x404ccafffe42b350 | 0xFE5 | ESP32 0x404ccafffe42b5b8 | 0x8799 | ESP32 0x404ccafffe42b328 | 0xE3F3 | ESP32 0x404ccafffe42b2f0 | 0x70BF | ESP32 0x404ccafffe42b5bc | 0x725D | ESP32 0x404ccafffe42b088 | 0xDF8D | ESP32 0x404ccafffe42b594 | 0x8B20 | ESP32 0x404ccafffe42b34c | 0xC13E | ESP32 0x404ccafffe42b028 | 0xD1E3 | ESP32 0x404ccafffe42b318 | 0xE789 | ESP32 0x404ccafffe42b5c0 | 0x7EFA | ESP32 0x404ccafffe42b2fc | 0x335B | ESP32

If you need some more info just ask

grebenyuk51 commented 1 month ago

One more thing! In logs I see in moments of rote requests

ZBOSS: nwk/nwk_main.c:1399   Unable to route!, get_discovery_route 0
ZBOSS: nwk/nwk_main.c:1399   Unable to route!, get_discovery_route 0

Also something about RREC, but I not sure if this applicable to this issue Need to send RREC prior to send a packet

grebenyuk51 commented 1 month ago

@xieqinan, is there any news?

xieqinan commented 1 month ago

@grebenyuk51,

Based on the statistics, it seems that the route request phenomenon is reasonable. If a device wants to send a packet to another device but does not know the address of the target device, the sender must broadcast a route request to discover the address. All devices that can hear the broadcast frame will forward it, which is why you see many route requests in the sniffer. Therefore, you can call esp_zb_nwk_get_next_neighbor() and esp_zb_nwk_get_next_route() to get network neighbor information before the sender reports a message to the coordinator (0x0000). If 0x0000 is not present, the route request is necessary, and forwarding by other devices is also necessary. However, there are two points of concern that I need to verify in the next stage:

I will verify these issues and get back to you as soon as possible.