Hello alltogether,
I'm using actually the AT86RF2XX driver as a template for the development of the MRF24J40 radio module driver.
At the moment I'm comparing the netdev2 flags of the AT86RF2XX driver and the MRF24J40 when using the gnrc_networking example and I see a difference.
If I take a look onto the AT86RF2XX setup the flags show me a value of 0x5164 whereas myone shows 0x5160.
I can't find the any place where the missing flag 0x0004 is set in the AT86RF2XX driver. In the ../drivers/include/net/netdev2/ieee80154.h file the define for this flag is NETDEV2_IEEE802154_SRC_MODE_LONG meaning the usage of long source addresses.
Can anyone tell me where the driver is set up to use long source addresses?
In case netopt is "NETOPT_SRC_LEN" and the value is "IEEE802154_LONG_ADDRESS_LEN" (which is defined as 8U), this module sets the "NETDEV2_IEEE802154_SRC_MODE_LONG" flag.
In case netopt is "NETOPT_SRC_LEN" and the value is "IEEE802154_LONG_ADDRESS_LEN" (which is defined as 8U), this module sets the "NETDEV2_IEEE802154_SRC_MODE_LONG" flag.
I don't know why this goes down through the driver layer. The address
filter doesn't need such information if you use as source address long
or short.
For me it's unclear for what this sourc_len really is made for. I would
suggest to use the best address setting which do the most smallest
payload. Sure, there exists situation to overwrite such setting - but
this should be done not as an interface setting.
This is the way what I have in my mind to do in Linux.
side note:
interessting is that, in 6LoWPAN it depends on L3 address and
fragmentation if you use short or long address to produce the smallest
payload.
In case netopt is "NETOPT_SRC_LEN" and the value is "IEEE802154_LONG_ADDRESS_LEN" (which is defined as 8U), this module sets the "NETDEV2_IEEE802154_SRC_MODE_LONG" flag.
I don't know why this goes down through the driver layer. The address
filter doesn't need such information if you use as source address long
or short.
For me it's unclear for what this sourc_len really is made for. I would
suggest to use the best address setting which do the most smallest
payload. Sure, there exists situation to overwrite such setting - but
this should be done not as an interface setting.
Maybe I miss something, but how should the driver know which L2 address format
is expected at the receiver's side?
Why the driver needs to know about that? The driver doesn't build mac
frames. Well, there exists hardmac transceivers which do building mac
frames on transceiver side. I never had some hardmac transceiver so I am
unsure how they really work and which API they offer.
I know that neighbour discovery knows if neighbour has short and
extended address. For purely L2 solution you might need to have
coordinator support etc. It's job of some upper-layer to provide such
mapping, or you do some force setting like NETOPT_SRC_LEN which I
suggest what it is.
I can understand that this goes to the driver layer for some hardmac
transceivers which accepts mac payload data only and builds the mac frame
on transceivers side.