Hi Oleg!
On 19 Sep 2017, at 13:24 PDT(-0700), Oleg Hahm wrote:
On Sun, Sep 17, 2017 at 02:37:39PM -0700, Thomas Eichinger wrote:
A while ago I worked on adding support for MAC commands and
procedures the
standard describes like channel scanning and automatic association of
a
device with a coordinator.
Personally I think those are nifty features to provide, the reality
check
the last two days showed though that it'd need some non-trivial
refactoring
of the existing 15.4 code to not end up in #ifdef hell.
Can you elaborate a little bit on this part? I would assume that being
compatible with other 802.15.4 implementations requires run-time
flexibility,
i.e., react properly to optional features implemented by other
802.15.4
devices. Or were you proposing to have a minimal
non-standard-compliant
version _and_ standard-compliant version intermingled, sharing commmon
code
through preprocessor directives?
Admittedly the "#ifdef hell" was a bit polemic and I didn't intend to
propose
offering a non-standard-compliant version. ;)
Right now RIOT is very much streamlined to send and receive 802.15.4
data and
ACK frames. The nontrivial refactoring I referred to would have to break
this.
On the receiving side I see the possibility to introduce an other
nettype like
GNRC_NETTYPE_802154 set by the corresponding frame type and the actual
runtime
logic would basically be in parallel of sixlowpan threads,
hierarchically.
(changing channels and hardware addresses, actively/passively scanning
for
coordinators...)
That'd be at least my approach.
On the sending side, however, the 15.4 header currently gets crafted in
the
netdev code and set to data frames. We'd have to take that out and let
the
upper layers define the frame type, or at least overwrite it. There
will be
more flags or header fields that will have to get configurable.
Do others see a better approach?
So, instead of having a minimal non-standard-compliant version I'd
rather
progress to a minimal standard-compliant version with the inevitable
increase
in code size. From there we can take it how far we want and make it
configurable
i.e. supporting IEs and use 802.15.9 to support key management etc. The
sky is
the limit.
(Or as a German'd say "With sauce and spicy!")
Does this somehow answer your question? Let me know if I missed it.
Best, Thomas
p.s.: Writing this it seems easier to do actually. Good we talked about
it. :)
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel