-
Notifications
You must be signed in to change notification settings - Fork 2k
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
pkg: add ZBOSS Zigbee stack #14213
Conversation
This PR needs a rebase. |
9edaf96
to
0f4ca22
Compare
Rebased. |
The efr32 radio driver should remain a separate PR - do you want to take that over from @kaibeckmann? |
Ping @benemorius? |
ping @benemorius :) |
There was a problem hiding this 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
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); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
/* 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); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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.
case 0x0019: /* zdo start */ | ||
/* don't free buf */ | ||
break; |
There was a problem hiding this comment.
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?
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? |
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. |
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.