aZholtikov / zh_network

ESP32 ESP-IDF and ESP8266 RTOS SDK component (arduino library for ESP32 family) for ESP-NOW based mesh network.
Apache License 2.0
47 stars 6 forks source link

Communication FAQ related question #2

Closed andy-danieal closed 10 months ago

andy-danieal commented 10 months ago
aZholtikov commented 10 months ago

Hi!

  1. The zh_network was tested with 5 forwarding levels. Theoretically there can be as many levels as you want (just need to increase max_waiting_time accordingly).
  2. For read RSSI, the access point must be visible. This feature is contrary the principle that all nodes are not visible to the network scanner.
andy-danieal commented 10 months ago

Thanks for sharing valuable information.

As per 5 forwarding levels, But we have check code than i have see only 2 level communication is working because we used that struct

typedef struct zh_network_routing_table_t
{
    uint8_t original_target_mac[ESP_NOW_ETH_ALEN];
    uint8_t intermediate_target_mac[ESP_NOW_ETH_ALEN];
} __attribute__((packed)) zh_network_routing_table_t;

Can you explain How it's worked with level 5. and How many zh_network_routing_table entry store in each device?

Also, Explain routing_table entry for from D1 to send data D5.

D1 -> D2 -> D3 -> D4 -> D5
D1 -> D6
D1 -> D7 -> D8 -> D5
aZholtikov commented 10 months ago

I'll try to explain in more detail. Each device has only the information necessary to forward the message (final target mac, intermediate router mac). There is no complete information in the node about the full route.

As an example: node mac (final target mac, intermediate router mac). The full route from D1 to D5 will look like this: D1 (D5, D2) -> D2 (D5, D3) -> D3 (D5, D4) -> D4 (D5, D5) -> D5

How many zh_network_routing_table entry store in each device? - Up to uint16_t value, but the maximum value is set in the initial settings (route_vector_size - The maximum size of the routing table. If the size is exceeded, the first route will be deleted. Minimum recommended value: number of planned nodes in the network + 10%.).