Skip to content

Conversation

@Lukas-Luger
Copy link
Contributor

Contribution description

This PR adds pkg support for ZBOSS ZigBee stack.

The provided example allows IEEE 802.15.4 capable devices to connect to ZigBee devices using Touchlink Commissioning.

As scanning is not yet fully implemented, the channel of the opponent device must be guessed and set using the set_ch command. Once a device has been successfully joined (using the tl_scan command), it can be toggled using the zcl_toggle command.

There are also other commands left over from the previous PR #14213 for sending packets out of the device and inputting packets into the local ZBOSS stack.

Testing procedure

Flash the new zigbee-zll example and try to pair a ZigBee bulb to the Riot node.

I've tested it on boards containing the nrf52840 cpu using Phillips Hue and Tradfri light bulbs. It may not work on other platforms.

Issues/PRs references

Flashpage usage may be incorrect, since FLASHPAGE_SIZE is missing on some boards (listed in tests/pkg/zboss/Makefile), although periph_flashpage is a required feature of the package.

This PR is a reboot of #14213.

@github-actions github-actions bot added Area: network Area: Networking Area: doc Area: Documentation Area: tests Area: tests and testing framework Area: pkg Area: External package ports Area: sys Area: System Area: examples Area: Example Applications labels Apr 14, 2025
@mguetschow mguetschow added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 24, 2025
@riot-ci
Copy link

riot-ci commented Apr 24, 2025

Murdock results

FAILED

7a41c51 fixup! pkg: add ZBOSS ZigBee stack

Build failures (13)
Application Target Toolchain Runtime (s) Worker
tests/pkg/zboss native64 gnu 0.57 alien
tests/pkg/zboss msb-430 gnu 0.96 alien
tests/pkg/zboss native32 gnu 3.19 mobi6
tests/pkg/zboss adafruit-itsybitsy-m4 gnu 2.19 mobi6
tests/pkg/zboss samr21-xpro gnu 1.09 alien
tests/pkg/zboss nrf52840dk gnu 2.50 mobi6
tests/pkg/zboss frdm-k64f gnu 2.98 skyleaf
tests/pkg/zboss native64 llvm 2.81 skyleaf
tests/pkg/zboss native32 llvm 3.95 mobi7
tests/pkg/zboss samr21-xpro llvm 2.31 mobi7
tests/pkg/zboss stk3200 gnu 2.48 mobi6
tests/pkg/zboss esp32-wroom-32 gnu 9.40 mobi6
tests/pkg/zboss esp32s3-devkit gnu 8.78 mobi7
Test failures (16)
Application Target Toolchain Runtime (s) Worker
tests/net/gnrc_netif native32 gnu 0.00 alien
tests/net/gnrc_netif native64 gnu 0.00 alien
tests/net/gnrc_netif native32 llvm 0.00 mobi7
tests/net/gnrc_netif native64 llvm 0.00 mobi7
tests/net/gnrc_sixlowpan_frag_minfwd native32 gnu 0.00 alien
tests/net/gnrc_sixlowpan_frag_minfwd native32 llvm 0.00 skyleaf
tests/net/gnrc_sixlowpan_frag_minfwd native64 gnu 0.00 mobi6
tests/net/gnrc_sixlowpan_frag_minfwd native64 llvm 0.00 mobi7
tests/net/gnrc_sixlowpan_frag_sfr native64 gnu 0.00 mobi6
tests/net/gnrc_sixlowpan_frag_sfr native32 gnu 0.00 mobi6
tests/net/gnrc_sixlowpan_frag_sfr native32 llvm 0.00 mobi6
tests/net/gnrc_sixlowpan_frag_sfr native64 llvm 0.00 mobi6
tests/net/gnrc_sixlowpan_frag_sfr_congure native32 gnu 0.00 mobi6
tests/net/gnrc_sixlowpan_frag_sfr_congure native64 gnu 0.00 mobi6
tests/net/gnrc_sixlowpan_frag_sfr_congure native32 llvm 0.00 mobi6
tests/net/gnrc_sixlowpan_frag_sfr_congure native64 llvm 0.00 mobi6

Artifacts

@Lukas-Luger
Copy link
Contributor Author

Update

tl_scan now automatically scans for devices and joins them.
Multiple devices are now supported.
Persistency is mostly implemented, therefore a reset command is introduced. (Lights will now be controllable after reboot.)
zcl_toggle now needs a short address and an endpoint.
A new command dev_info is introduced to show addresses and endpoints. Note that some devices have multiple endpoints and not all of them support the toggle command.
set_ch has been removed to avoid unnecessary channel switching by the user.

@crasbe crasbe added the Type: new feature The issue requests / The PR implemements a new feature for RIOT label May 14, 2025
@crasbe
Copy link
Contributor

crasbe commented May 14, 2025

Let us know once you want a (preliminary) review. For the time being, there are some static test errors you can look at.
Also you can change the doc.txt file to doc.md, see #21220.

@github-actions github-actions bot added the Area: drivers Area: Device drivers label Aug 13, 2025
@crasbe
Copy link
Contributor

crasbe commented Aug 13, 2025

The #21617 Pull Request created a Merge Conflict. Perhaps you can take a look at that? Then the compile test will run again as well.

@crasbe crasbe added the State: needs rebase State: The codebase was changed since the creation of the PR, making a rebase necessary label Aug 14, 2025
Copy link
Contributor

@crasbe crasbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly style related comments.

Lukas-Luger and others added 9 commits November 17, 2025 14:31
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
Co-authored-by: crasbe <crasbe@gmail.com>
@crasbe crasbe removed the State: needs rebase State: The codebase was changed since the creation of the PR, making a rebase necessary label Nov 17, 2025
@crasbe crasbe added the CI: no fast fail don't abort PR build after first error label Nov 17, 2025
@Lukas-Luger
Copy link
Contributor Author

Update

Added some documentation to the package and rebased to the most recent RIOT version.
Most of the recent work went into ZBOSS itself, fixing bugs and extending functionality behind the scenes.
The examples now include some mandatory clusters as defined by the ZigBee Lighting & Occupancy Device Specification Version 1.0. (missing clusters: Identify, Scenes, Level Control)
Also the remote example now features on and off in addition to the toggle command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: doc Area: Documentation Area: drivers Area: Device drivers Area: examples Area: Example Applications Area: network Area: Networking Area: pkg Area: External package ports Area: sys Area: System Area: tests Area: tests and testing framework CI: no fast fail don't abort PR build after first error CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

4 participants