Zwiększenie zasięgu sieci ZigBee [bramka ZigBee]

Moderator: vajera

User avatar
vajera
Posts: 7290
Joined: Wed Oct 31, 2018 7:58 am
Location: Biedrusko
Has thanked: 290 times
Been thanked: 161 times

Post

lukasz06 wrote: Fri Mar 20, 2026 2:48 pm
vajera wrote: Fri Mar 20, 2026 11:07 am
lukasz06 wrote: Fri Mar 20, 2026 9:20 am Dokładnie tak jak szef napisał. Możesz wl/ wył ten tryb z poziomu Gui. Sprawdź RSSI i porównaj.
Na tym modelu masz jeden kanał. Jeśli byś chciał 2 kanały, musisz zaopatrzyć się w wersję Dual, jest w bazie, bo mam i też ma ten tryb , tylko w Gui @Vajera jeszcze nie opisał.
W GUI ustawiasz to identycznie dla wersji Dual - nic tutaj dodatkowo nie trzeba opisywać, jest dostępne od chwili dodania tego modelu.
Ja wiem, że to jest dostępne, ale kto inny może tego nie wiedzieć i stąd te pytania.
W opisie jest tylko ZbMini i ZbMicro.
W sumie Dual, to też Mini tyle, że dwukanałowy. Tą funkcję Turbo ma również ZbRbs.
Pytanie, czy to wszystko opisywać?
mogę dać "..." ;)
Bramka Zigbee <=> SUPLA
Więcej informacji tutaj:
https://forum.supla.org/viewforum.php?f=127
FAQ https://forum.supla.org/viewtopic.php?t=17277
Robinson74
Posts: 404
Joined: Sun Nov 20, 2022 9:37 am
Has thanked: 13 times
Been thanked: 6 times

Post

Kilka dalszych pytań.

1) Parując jakiekolwiek urządzenie ZigBee (urządzenie końcowe albo router), czy to urządzenie powinno być blisko bramki czy wystarczy, że będzie blisko routera ZigBee, a poza zasięgiem koordynatora?

2) Jeśli polecenie nwk-scan wysłane do koordynatora znajduje urządzenia z LQI=0, to czy te urządzenia są mimo wszystko połączone z koordynatorem?

3) Czy wartość DEVICE TIMEOUT = 15360 odczytana przez nwk-scan, to wartość, którą należy ustawić jako timeout w "Channel timings panel"?

4) Co oznaczają poniższe parametry odczytywane w ramach polecenia nwk-scan?
DEPTH,
RX_ON_WHEN_IDLE,
RELATIONSHIP,
OUTGOING COST,
AGE
User avatar
vajera
Posts: 7290
Joined: Wed Oct 31, 2018 7:58 am
Location: Biedrusko
Has thanked: 290 times
Been thanked: 161 times

Post

Robinson74 wrote: Sun Mar 29, 2026 12:16 pm Kilka dalszych pytań.

1) Parując jakiekolwiek urządzenie ZigBee (urządzenie końcowe albo router), czy to urządzenie powinno być blisko bramki czy wystarczy, że będzie blisko routera ZigBee, a poza zasięgiem koordynatora?
Koordynator tworzy unikalną sieć ZigBee, identyfikowalną przez tzw. PAN ID. Routery są jej częścią i pomagają budować połączenia z innymi urządzeniami w obrębie tej samej sieci. Tylko koordynator (bramka) ma możliwość przyłączenia nowego urządzenia do sieci, więc w trakcie parowania urządzenie musi być w zasięgu bramki, później można je przenieść i jeżeli znajdzie się w zasięgu routera, to może skorzystać z jego pomocy w połączeniu.
2) Jeśli polecenie nwk-scan wysłane do koordynatora znajduje urządzenia z LQI=0, to czy te urządzenia są mimo wszystko połączone z koordynatorem?
To są zawsze orientacyjne wartości, sprawdzenie połączenia można przeprowadzić z wykorzystaniem np. GUI.
3) Czy wartość DEVICE TIMEOUT = 15360 odczytana przez nwk-scan, to wartość, którą należy ustawić jako timeout w "Channel timings panel"?
Nope, te parametry mają się do siebie tak, jak Londyn do Lądka Zdroju 😉
4) Co oznaczają poniższe parametry odczytywane w ramach polecenia nwk-scan?
DEPTH,
RX_ON_WHEN_IDLE,
RELATIONSHIP,
OUTGOING COST,
AGE
Wrzucę później jakiś opis.
Bramka Zigbee <=> SUPLA
Więcej informacji tutaj:
https://forum.supla.org/viewforum.php?f=127
FAQ https://forum.supla.org/viewtopic.php?t=17277
Robinson74
Posts: 404
Joined: Sun Nov 20, 2022 9:37 am
Has thanked: 13 times
Been thanked: 6 times

Post

vajera wrote: Sun Mar 29, 2026 12:54 pm Wrzucę później jakiś opis.
Dzięki.

To jeszcze jedno pytanie.

W panelu "Software Build ID / RSSI" naciskam "Read device RSSI" i otrzymuję jedną z dwóch odpowiedzi:
- 0
- Device data query failed - try to wake it up first!

Jaka jest w praktyce różnica między tymi dwoma sytuacjami?
User avatar
vajera
Posts: 7290
Joined: Wed Oct 31, 2018 7:58 am
Location: Biedrusko
Has thanked: 290 times
Been thanked: 161 times

Post

Robinson74 wrote: Sun Mar 29, 2026 12:16 pm Kilka dalszych pytań.

4) Co oznaczają poniższe parametry odczytywane w ramach polecenia nwk-scan?
DEPTH,
0 = koordynator (bramka)
1 = urządzenie połączone bezpośrednio z bramką
2 = urządzenie połączone przez 1 router...
RX_ON_WHEN_IDLE,
Jeżeli ten parametr = 1, to znaczy, że urządzenie nasłuchuje cały czas. 0 oznacza sleep end device, które odbiera komunikaty tylko w momencie przebudzenia.
RELATIONSHIP,
relacja = rodzic, dziecko, rodzeństwo itp.

Code: Select all

typedef enum {
    ESP_ZB_NWK_RELATIONSHIP_PARENT                = 0U, /*!< The peer device is the parent of current device. */
    ESP_ZB_NWK_RELATIONSHIP_CHILD                 = 1U, /*!< The peer device is the child of current device. */
    ESP_ZB_NWK_RELATIONSHIP_SIBLING               = 2U, /*!< The peer device is the sibling of current device. */
    ESP_ZB_NWK_RELATIONSHIP_NONE_OF_THE_ABOVE     = 3U, /*!< The relationship is none of above, means that the peer device is
                                                             currently unknown, and its relationship with the network is in
                                                             the process of being established. */
    ESP_ZB_NWK_RELATIONSHIP_PREVIOUS_CHILD        = 4U, /*!< The peer device is the previous child of current device, meaning it
                                                             has been confirmed to have left the network */
    ESP_ZB_NWK_RELATIONSHIP_UNAUTHENTICATED_CHILD = 5U, /*!< The peer device is the unauthenticated child of current device,
                                                             meaning it is in the process of joining the network but has not yet
                                                             been authenticated. */
                                                             

OUTGOING COST,
AGE

Code: Select all

uint8_t outgoing_cost
The cost of an outgoing link. Got from link status.

uint8_t age
Counter value for router aging. The number of nwkLinkStatusPeriod intervals since a link status command was received.

uint32_t device_timeout
Configured end device timeout, in seconds.

uint32_t timeout_counter
Timeout value ED aging, in milliseconds.
2. Outgoing Cost & Link Status

Zigbee routers exchange Link Status messages (one-hop broadcasts) every 15–16 seconds.

How it works: When your device receives a Link Status from a neighbor, it looks for its own short address in that neighbor's "reported" list.
The Value: The Outgoing Cost is the value the neighbor has calculated for you.
Significance: If the Outgoing Cost is 0, the link is considered "one-way" (unidirectional). A valid bidirectional link must have a non-zero outgoing cost to be used for routing.

3. Age & Stale Entries

The Age field is the primary mechanism for cleaning the table of dead or moved routers.

Increment: In ZBOSS, the age is typically incremented every 15 or 16 seconds.
Reset: Every time a Link Status message or a network frame is received from that neighbor, the Age is reset to 0 (or a "fresh" value like 3, depending on the specific ZBOSS version/profile).

Stale Limit: Once the Age exceeds a threshold (typically 3 to 6), the entry is marked as "stale."
Note: If a neighbor is a parent or a critical child, the stack may attempt to keep it longer, but for general routers, it will be evicted to make room for active neighbors.

4. Device Timeout & Timeout Counter (End Device Aging)

This specifically applies to End Device children. Unlike routers, End Devices don't send Link Status messages; they use "Keep Alives" (MAC Data Polls).
End Device Timeout: This is a value (often $2^n$ minutes) agreed upon when the child joins.
Timeout Counter: The parent maintains a counter for each child. Every time the child polls the parent, this counter is reset.
Aging Out: If the counter expires (no polls received within the timeout period), the parent "ages out" the child and may remove it from the neighbor table. This triggers a ZB_NWK_SIGNAL_CHILD_LOST or similar signal in ZBOSS.
Bramka Zigbee <=> SUPLA
Więcej informacji tutaj:
https://forum.supla.org/viewforum.php?f=127
FAQ https://forum.supla.org/viewtopic.php?t=17277
Robinson74
Posts: 404
Joined: Sun Nov 20, 2022 9:37 am
Has thanked: 13 times
Been thanked: 6 times

Post

Wielkie dzięki za takie szczegółowe informacje!
Obawiam się tylko, czy nie zrodzi to wielu moich kolejnych pytań, ale możliwe, że ktoś inny będzie w stanie odpowiedzieć, bo Ty już chyba nie nadążasz, mając tyle pracy.

To taka realna sytuacja z mojej sieci:

Bramka pokazuje LQI=86 do routera X, a router X pokazuje LQI=192 do bramki.
Bramka pokazuje LQI=96 do routera Y, a router Y pokazuje LQI=157 do bramki.
Bramka pokazuje LQI=0 do routera Z, a router Z pokazuje LQI=78 do bramki.
Router X pokazuje LQI=154 do routera Q, a router Q w ogóle nie pokazuje routera X.
Router Y pokazuje LQI=0 do routera Q, a router Q pokazuje LQI=0 routera Y.
Router Z pokazuje LQI=18 do routera Y, a router Y w ogóle nie pokazuje routera Z.


Czy jest to zupełnie normalne w sieci ZigBee?
User avatar
vajera
Posts: 7290
Joined: Wed Oct 31, 2018 7:58 am
Location: Biedrusko
Has thanked: 290 times
Been thanked: 161 times

Post

Robinson74 wrote: Mon Mar 30, 2026 11:00 am Wielkie dzięki za takie szczegółowe informacje!
Obawiam się tylko, czy nie zrodzi to wielu moich kolejnych pytań, ale możliwe, że ktoś inny będzie w stanie odpowiedzieć, bo Ty już chyba nie nadążasz, mając tyle pracy.

To taka realna sytuacja z mojej sieci:

Bramka pokazuje LQI=86 do routera X, a router X pokazuje LQI=192 do bramki.
Bramka pokazuje LQI=96 do routera Y, a router Y pokazuje LQI=157 do bramki.
Bramka pokazuje LQI=0 do routera Z, a router Z pokazuje LQI=78 do bramki.
Router X pokazuje LQI=154 do routera Q, a router Q w ogóle nie pokazuje routera X.
Router Y pokazuje LQI=0 do routera Q, a router Q pokazuje LQI=0 routera Y.
Router Z pokazuje LQI=18 do routera Y, a router Y w ogóle nie pokazuje routera Z.


Czy jest to zupełnie normalne w sieci ZigBee?
Wiesz, to są pytania w rodzaju :
Przyczyny przedwczesnego zapłonu przy niskich obrotach w nowoczesnych silnikach typu downsizing (Turbo GDI) i wpływ składu chemicznego oleju na to zjawisko?

Kąt wyprzedzenia zapłonu a $ P_{max} $: Optymalizacja momentu wystąpienia maksymalnego ciśnienia w cylindrze (zazwyczaj ok. 12–15° po ZZ – zwrocie zewnętrznym) w relacji do strat ciepła i pracy mechanicznej?

W jaki sposób zjawisko interferencji fal ciśnienia w układzie dolotowym (zjawisko falowe) wpływa na współczynnik napełniania cylindra ($\eta_v$) w silniku wolnossącym i jak dobór długości kolektora dolotowego pozwala zoptymalizować moment obrotowy w konkretnym zakresie prędkości obrotowych?
Zajrzyj tutaj:
https://docs.espressif.com/projects/esp ... ction.html
i tutaj:
https://dsr-iot.com/solutions/zboss/#platforms
Poszukaj w sieci, zapytaj AI - wróć z tym, co znalazłeś a wszyscy skorzystamy ;)
Bramka Zigbee <=> SUPLA
Więcej informacji tutaj:
https://forum.supla.org/viewforum.php?f=127
FAQ https://forum.supla.org/viewtopic.php?t=17277
User avatar
vajera
Posts: 7290
Joined: Wed Oct 31, 2018 7:58 am
Location: Biedrusko
Has thanked: 290 times
Been thanked: 161 times

Post

Robinson74 wrote: Mon Mar 30, 2026 11:00 am Wielkie dzięki za takie szczegółowe informacje!
Obawiam się tylko, czy nie zrodzi to wielu moich kolejnych pytań, ale możliwe, że ktoś inny będzie w stanie odpowiedzieć, bo Ty już chyba nie nadążasz, mając tyle pracy.

To taka realna sytuacja z mojej sieci:

Bramka pokazuje LQI=86 do routera X, a router X pokazuje LQI=192 do bramki.
Bramka pokazuje LQI=96 do routera Y, a router Y pokazuje LQI=157 do bramki.
Bramka pokazuje LQI=0 do routera Z, a router Z pokazuje LQI=78 do bramki.
Router X pokazuje LQI=154 do routera Q, a router Q w ogóle nie pokazuje routera X.
Router Y pokazuje LQI=0 do routera Q, a router Q pokazuje LQI=0 routera Y.
Router Z pokazuje LQI=18 do routera Y, a router Y w ogóle nie pokazuje routera Z.


Czy jest to zupełnie normalne w sieci ZigBee?
Spójrz na to wypracowanie od Gemini - wydaje się logiczne
It’s a classic Zigbee head-scratcher, but there is a very logical reason for the discrepancy.

In short: LQI is a measure of how well a device "hears" another device, and radio links are rarely symmetrical.

The Link Quality Indicator (LQI) values you see are specific to the **receiver's perspective.** Here is why those numbers are so different:

### 1. Asymmetric Link Quality
Radio signals don't always travel perfectly both ways. Even if two devices are the same distance apart, the "path" from the Coordinator to Router A might be "noisier" than the path from Router A back to the Coordinator.

* **Coordinator LQI (86):** This represents how clearly the Coordinator is receiving signals *from* Router A. A value of 86 is relatively low, suggesting there might be interference or physical obstacles near the Coordinator.
* **Router A LQI (192):** This represents how clearly Router A is receiving signals *from* the Coordinator. A value of 192 is quite strong.

### 2. Hardware and Environment Differences


Several physical factors can cause this imbalance:

Output Power: The Coordinator might be transmitting at a higher power level than Router A. If the Coordinator "shouts" and Router A "whispers," Router A will hear the Coordinator clearly (High LQI), but the Coordinator will struggle to hear Router A (Low LQI).

Receiver Sensitivity: The radio chip in Router A might simply be higher quality or better at filtering noise than the one in the Coordinator.
Local Interference: If the Coordinator is sitting next to a Wi-Fi router or a microwave, its "ears" are essentially ringing. This raises the noise floor, making the incoming signal from Router A seem much weaker (lower LQI) by comparison.



### 3. How LQI is Calculated
It is important to remember that LQI isn't a standardized unit like Celsius or Meters. The Zigbee specification allows manufacturers to calculate LQI based on:
* **RSSI** (Received Signal Strength Indicator)
* **SNR** (Signal-to-Noise Ratio)
* **Bit Error Rate** (How many packets had to be corrected)

Because the Coordinator and Router A might use different hardware or firmware logic to calculate these values, the numbers won't always "match up" even in a perfect vacuum.

---

### Why does this matter?
Zigbee uses these tables to determine **routing cost**. In your case, the network knows that sending a message from the Coordinator to Router A is "easy" (LQI 192), but getting a confirmation back might be "hard" (LQI 86). If the LQI drops much lower, the network might decide to route traffic through a different neighbor instead.
Bramka Zigbee <=> SUPLA
Więcej informacji tutaj:
https://forum.supla.org/viewforum.php?f=127
FAQ https://forum.supla.org/viewtopic.php?t=17277
Robinson74
Posts: 404
Joined: Sun Nov 20, 2022 9:37 am
Has thanked: 13 times
Been thanked: 6 times

Post

Że też masz jeszcze do mnie cierpliwość!

To jeszcze jedno pytanie.

Patrząc na poziom sygnału, np. RSSI w GUI bramki, widzimy tylko poziom sygnału między bramką a danym urządzeniem?
Więc jakieś urządzenie może mieć RSSI -90 w połączeniu z bramką, a tak naprawdę może mieć dobry sygnał z jakimś routerem (np. -40) i będzie działać prawidłowo w ZigBee, mimo że w GUI widzimy bardzo słaby sygnał?
User avatar
vajera
Posts: 7290
Joined: Wed Oct 31, 2018 7:58 am
Location: Biedrusko
Has thanked: 290 times
Been thanked: 161 times

Post

Robinson74 wrote: Mon Mar 30, 2026 5:44 pm Że też masz jeszcze do mnie cierpliwość!

To jeszcze jedno pytanie.

Patrząc na poziom sygnału, np. RSSI w GUI bramki, widzimy tylko poziom sygnału między bramką a danym urządzeniem?
Więc jakieś urządzenie może mieć RSSI -90 w połączeniu z bramką, a tak naprawdę może mieć dobry sygnał z jakimś routerem (np. -40) i będzie działać prawidłowo w ZigBee, mimo że w GUI widzimy bardzo słaby sygnał?
In the ZBOSS Zigbee stack, the RSSI (Received Signal Strength Indicator) is not a value that is continuously "measured" in the background by the application; rather, it is a per-packet metric captured by the radio hardware at the moment a frame is received.

When an End Device sends a message to the Coordinator (or vice versa), the receiving radio's Physical (PHY) layer measures the power level of that specific incoming signal. ZBOSS then passes this value up through the stack.

How the Measurement Works

The measurement follows the IEEE 802.15.4 standard, which ZBOSS implements. It is an 8-bit value usually representing the power level in dBm.

Sampling: The radio hardware samples the energy level over the duration of 8 symbol periods (approx. 128 μs) of the received packet.

Dynamic Range: Most Zigbee transceivers (like those from Nordic, TI, or Silicon Labs) report RSSI in a range from approximately -100 dBm (very weak) to 0 dBm (very strong).

Accuracy: Zigbee radios are required to be accurate within ± 6 dB.

Important Limitations

One-Way Measurement: RSSI is only measured by the receiver. If the Coordinator measures -70 dBm from an End Device, it doesn't mean the End Device sees -70 dBm from the Coordinator.

Last Hop Only: RSSI only reflects the "last hop." If a message goes from End Device → Router → Coordinator, the Coordinator only knows the RSSI between itself and the Router, not the original End Device.

Not the same as LQI: While RSSI measures raw power, LQI (Link Quality Indicator) is a calculated value (0–255) that accounts for signal "cleanliness" and bit errors. ZBOSS often uses LQI for routing decisions rather than raw RSSI.
Bramka Zigbee <=> SUPLA
Więcej informacji tutaj:
https://forum.supla.org/viewforum.php?f=127
FAQ https://forum.supla.org/viewtopic.php?t=17277

Return to “Bramka ZigBee”