NWK_DECRYPTION_FAILURE counts about one per received frame on ZBT-2 (EmberZNet 7.5.1.0), while every frame on the air decrypts

Aperta
#776 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
15/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start with the open question: whether the NWK_DECRYPTION_FAILURE counter increments for frames the stack discards for other reasons, such as duplicates or frames not addressed to the coordinator. The payload's sniffer check (packet_capture, MIC verification with the network key) shows every frame authenticates, so the next step is to find where the counter is incremented in the EZSP counter path and whether it fires before or after duplicate and address filtering. Done means a clear explanation of the counter's trigger, backed by a reproduction or a firmware-side confirmation. Expect maintainer input on the firmware behaviour.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

The coordinator's NWK_DECRYPTION_FAILURE counter rises in step with traffic: about 55 a minute
when the network is quiet, and about 1,100 a minute during OTA updates, which is roughly one for
every unicast the coordinator receives. A sniffer placed next to the coordinator, capturing over
the same 10 minutes, saw 18,097 NWK-secured frames and every one of them authenticated with the
network key. So the failures do not seem to come from bad frames on the air. Is this counter
counting something other than real decryption failures on this firmware, or is the stack failing
to decrypt valid frames?

Environment
  • Coordinator: Home Assistant Connect ZBT-2, EmberZNet 7.5.1.0 (Nabu Casa build)
  • bellows 1.2.1, zigpy 2.4.1, zha 2.4.3, Home Assistant 2026.11.1
  • About 144 devices, mostly Signify Hue routers; channel 16
  • source_routing is off (the default), so setConcentrator(on=False); coordinator TX power 0 dBm
  • A second ZBT-2 runs Thread on channel 18; no other Zigbee coordinator is on channel 16
Measurements

Counters were read through ZHA's counters at the start and end of each window.

Window NWK_DECRYPTION_FAILURE NWK_FRAME_COUNTER_FAILURE APS_DATA_RX_UNICAST
Quiet, 10 min ~55/min
Nine OTA transfers running, 10 min 1,117/min 83/min 1,017/min

After a ZHA restart the rate bursts to about 3,900 a minute and settles within about 5 minutes.
Joins and address conflicts stay at zero, so it does not look like a rejoin loop.

Sniffer check

A Connect ZBT-1 flashed with Zigbee NCP 7.5.1.0 captured channel 16 through bellows'
packet_capture (mfglib receive, no transmit). For each NWK-secured frame I rebuilt the CCM*
nonce from the auxiliary security header and checked the 4-byte MIC with the network key from
zigpy's backup.

Capture Secured frames Verified Failed Other key sequence
Different room, 13 min, quiet 7,896 7,896 0 0
Next to the coordinator, 10 min, during OTA 18,097 18,097 0 0

The capture next to the coordinator overlapped the counter window above, in which the coordinator
counted 11,170 decryption failures. There were no Green Power frames, no frames from another PAN,
and two unsecured NWK commands.

What I can't tell
  • Whether the counter includes frames the stack discards for another reason (duplicates,
    frames already handled, frames not addressed to it) and labels them decryption failures.
  • Whether real frames are being dropped. OTA transfers keep progressing, so if frames are lost,
    it's a small share.

I'm happy to run a longer capture, read other counters, or test a different firmware build if that
helps. I can share the capture-and-verify scripts; they run inside the Home Assistant container
and never print the key or payloads.

Lingua principale
Python
Stelle
221
Fork
104
Merge medio
3h 50m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di zigpy/bellows

Tutte le issue di zigpy/bellows

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.