Skip to content

ezbee v2.0: No public API to disable APS encryption on TRANSPORT_KEY — HA 1.2 devices (Ledvance/OSRAM) cannot join #821

@patrick-loibl

Description

@patrick-loibl

Answers checklist.

  • I have read the documentation ESP Zigbee SDK Programming Guide and tried the debugging tips, the issue is not addressed there.
  • I have updated ESP Zigbee libs (esp-zboss-lib and esp-zigbee-lib) to the latest version, with corresponding IDF version, and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.4.1

esp-zigbee-lib version.

2.0.1

esp-zboss-lib version.

1.6.4

Espressif SoC revision.

ESP32-C6 (revision v0.2)

What is the expected behavior?

Legacy Zigbee HA 1.2 devices (Ledvance/OSRAM bulbs) should be able to join an ESP32-C6 coordinator running ezbee v2.0, the same way they work with esp-zigbee-lib v1.x coordinators and with CC2652-based coordinators.

The coordinator should send the TRANSPORT_KEY without APS encryption (or encrypted with the well-known ZigbeeAlliance09 key), which is what HA 1.2 devices expect.

What is the actual behavior?

HA 1.2 device (Ledvance bulb F0:D1:B8:BE:24:09:D7:35) joins at MAC level (DEVICE_UPDATE arrives with status=JOIN tc=ACCEPT) but never responds to Active_EP_req. The device leaves and rejoins in a loop every ~5 seconds:

DEVICE_UPDATE 0x84e2 [F0:D1:B8:BE:24:09:D7:35] status=JOIN tc=ACCEPT
Active_EP_req → timeout after 5 s (no response)
DEVICE_UPDATE 0x84e2 [F0:D1:B8:BE:24:09:D7:35] status=JOIN tc=ACCEPT
...

Zigbee 3.0 devices (Philips Hue LCA001) join successfully on the same coordinator in the same session.

Root cause: ezbee sends the TRANSPORT_KEY APS-encrypted with a per-device provisional key. The HA 1.2 joiner has no such key and cannot decrypt the NWK key → it leaves the network.

Steps to reproduce.

  1. Create an ESP32-C6 Zigbee coordinator with esp-zigbee-lib 2.0.1 (ezbee v2.0 API)
  2. Call ezb_secur_set_tclk_exchange_required(false) and ezb_secur_set_global_link_key(ZigbeeAlliance09) before stack start
  3. Open the network for joining
  4. Attempt to join a Ledvance/OSRAM HA 1.2 bulb (factory reset)
  5. Observe: device joins repeatedly but Active_EP_req always times out

Workaround attempted: calling the ZBOSS internal function zb_zdo_set_aps_unsecure_join(1) directly via extern declaration (requires --allow-multiple-definition linker flag). The function executes but has no effect — ezbee's own security path (zdo_app_secur.c.obj in libesp-zigbee-core.zczr.release.a) does not read the ZBOSS AIB apsInsecureJoin flag.

Reference: tostmann/esp-coordinator (esp-zigbee-lib v1.x) supports HA 1.2 devices by calling zb_zdo_set_aps_unsecure_join(1) directly — this works in v1.x because there is no ezbee security layer ignoring the flag.

More Information.

Requested API addition in ezbee/secur.h:

ezb_err_t ezb_secur_set_aps_insecure_join(bool insecure);

This would allow coordinators to support legacy HA 1.2 devices without accessing ZBOSS internal symbols.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions