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

Abierto
#776 6 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
15/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
221
Forks
104
Merge medio
5 d 15 h
PR fusionados (30 d)
4

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de zigpy/bellows

Todos los issues de zigpy/bellows

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.