Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg: add ZBOSS Zigbee stack #14213

Closed
wants to merge 2 commits into from
Closed

Conversation

benemorius
Copy link
Member

Contribution description

This PR adds pkg support for ZBOSS Zigbee stack.

There are two extra commits that aren't meant to be merged. One adds radio support to the Tradfri platform to facilitate testing.

The other extra commit is the hack I've used to send raw packets. I don't know whether this is appropriate or if there's a better way. Feedback is appreciated.

Testing procedure

Flash the new zigbee-zll example and try to pair a ZLL remote (Tradfri) to the Riot node.

I've tested with kw41zrf, at86rf230, efr32. It may work with other radios. The radio needs to support NETOPT_ACK_PENDING.

Issues/PRs references

This PR includes #9212 just for testing purposes.

@benpicco benpicco added Area: network Area: Networking Area: pkg Area: External package ports Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Jun 6, 2020
@miri64 miri64 added this to the Release 2020.07 milestone Jun 25, 2020
@miri64
Copy link
Member

miri64 commented Jul 7, 2020

This PR needs a rebase.

@benemorius benemorius force-pushed the pr/zboss branch 3 times, most recently from 9edaf96 to 0f4ca22 Compare July 10, 2020 03:58
@benemorius
Copy link
Member Author

Rebased.

@benpicco
Copy link
Contributor

The efr32 radio driver should remain a separate PR - do you want to take that over from @kaibeckmann?

@miri64
Copy link
Member

miri64 commented Jul 28, 2020

Ping @benemorius?

@fjmolinas
Copy link
Contributor

ping @benemorius :)

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

I flashed this on my samr21-xpro and it just worked, although I'm not sure how to test this with other ZigBee devices.
(I have a Hue Bulb & Gateway, but I assume they are encrypted?)

I'm not sure if GNRC is the right place to integrate this, but this of course allows it to 'just work' with any 802.15.4 radio.

I feel this should be more similar to #14979

Comment on lines +65 to +74
case 0x0019: /* zdo start */
/* don't free buf */
break;
case 0x0003: /* identify */
puts("got identify request");
zb_free_buf(buf);
break;

case 0x0004: /* groups */
zb_zcl_handle_group_request(param);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get defines for those magic numbers?

RIOTBASE ?= $(CURDIR)/../..

# Include packages that pull up and auto-init the link layer.
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
Copy link
Contributor

Choose a reason for hiding this comment

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

Not with ZigBee, right?


USEPKG += zboss
# for zboss nv storage
FEATURES_OPTIONAL += periph_flashpage
Copy link
Contributor

Choose a reason for hiding this comment

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

Unused?

default:
printf("unhandled on/off command: 0x%x\n", zcl_command);
}
zb_free_buf(buf);
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of handling this in every case, why not move this to then end of the switch block.

Comment on lines +249 to +252
/* send raw 802.15.4 packets out without adding a header */
if (netif->flags & GNRC_NETIF_FLAGS_RAWMODE) {
return _send_raw(netif, (iolist_t *)pkt);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense to use gnrc_netif like this? (@miri64)
It seems like you don't want to use GNRC at all, but ZBOSS instead.

Will the new radio HAL help here @jia200x?

Copy link
Member

Choose a reason for hiding this comment

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

Probably. Does this ZBOSS stack require direct access to the radio? If yes, that should be the way to go.

Comment on lines +65 to +67
case 0x0019: /* zdo start */
/* don't free buf */
break;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just return here? What does ZDO start mean?

@jia200x
Copy link
Member

jia200x commented Oct 2, 2020

Hi @benemorius

There's something that's not so clear to me. Could you describe which OSI layer does the ZBOSS stack expose? Is it a network protocol? Transport? Application?
Also, what are the south bound requirements? E.g does the stack require direct access to a IEEE 802.15.4 radio?

@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Mar 2, 2022
@stale stale bot closed this Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: pkg Area: External package ports State: stale State: The issue / PR has no activity for >185 days Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants