-
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
drivers/at86rf215: implement MR-FSK #14959
Conversation
5aed89f
to
6e68d5b
Compare
@jeandudey if you can give the common |
bb88e8d
to
cd3ba92
Compare
Rebased to re-add RPC |
Hi! Sorry for the late response. Yesterday I took a look on the code and it seems very well written and everything here applies on the other driver as much on the netdev driver configuration. Another options I saw on the AT86RF215 datasheet that are configurable too on the Overall the only options that may affect interop are Data Whitening and the FCS, the SFD is another factor that could affect but I may assume that AT86RF215 uses the default values the IEEE 802.15.4g standard provides (see 85423bd) when using FEC or not, although it could be nice if could be selected between phyMRFSKSFD=0 and phyMRFSKSFD=1. |
That can be enabled / disabled by toggling the
I got the minimum preamble length for a symbol rate from Table 6-64 of the at86rf215 data sheet.
Yea I only ever used 16-bit FCS like the old modes did. Again, I can add a config option for that. That would apply to all 802.15.4g modes.
Do you also want to set the content of the start of frame delimiter? :D |
If enabled by default it could then be leaved as is, it could only make sense to disable DW for testing purposes.
Right now it isn't needed until some rare 802.15.4g transceiver appears with rare configurations :P so I wouldn't bother with it.
The SFD changes between 2-FSK and 4-FSK (2 octets vs 4 octets), and when using FEC or not. Selecting between one group or another it's just a matter of taste, and only mandatory for Common Signaling Mode to use a phyMRFSKSFD=0, but so far I haven't seen CSM out there.
My bad, revisited the configurations for |
Ok, I'll keep the amount of ifconfig tunables at a minimum then :)
Hm both config registers for SFD0 and SFD1 are 2 octets - do you suggest both are used for 4-FSK and FEC?
Ah I reckon |
It was me 😅 that didn't verified how it handled the FCS bit on the PHR, it will work with both and has to be specified on TX manually by setting/clearing the FCS bit on the PHR which now defaults to 16-bit CRC. It indeed handles CRC verification on hardware. |
cd3ba92
to
4d312ab
Compare
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.
Some nitpicks, otherwise looks good.
@@ -96,6 +96,42 @@ static void str_toupper(char *str) | |||
} | |||
} | |||
|
|||
__attribute__ ((unused)) | |||
static uint8_t gcd(uint8_t a, uint8_t b) |
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 is one in frac.c
can't you use that?
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.
yea that just looked so complex and I didn't need speed here 😅
I could make it public and use it, or move the frac_short()
/frac_extend()
code there.
But realistically those parameters are not supposed to be set by the user to begin with.
Ok, it's still nice having them displayed in ifconfig
, but ideally we will have a database with settings combinations for different FSK modes for different regions and frequency bands.
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.
You lost me a bit a here, where would this database/table be used?
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.
As with WiFi different world regions have varying regulations as to what portions of the spectrum you may use and how you may use it. And while the 2.4 GHz ISM band can be used everywhere, for sub-GHz different countries use different frequencies for ISM and the standard prescribes different modulation parameters for those frequencies.
So in the end you would really want to be able to "set region EU, set fsk_mode 3" and not worry about the details.
But that should be handled outside the driver so other MRSUN-FSK like cc26x2_cc13x2_rf
can also benefit from it.
I played around changing configurations and pinging everything seems OK. |
@jeandudey are you fine with the general FSK stuff? |
Yes, everything seems very well to me in regards with the |
Please squash @benpicco ! |
The standard CCA backoff period is 8 symbols and only differs for MR-O-QPSK where it is dependent on the chip rate.
8f46226
to
37928ac
Compare
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.
ACK!
Contribution description
This adds the MR-FSK modulation to the
at86rf215
driver.You can configure all possible combinations of settings, grouping those settings to "FSK Modes" as per 802.15.4 is out of scope of the driver and should become part of the new 802.15.4 sub-MAC so it can be shared with other drivers implementing MR-FSK.
The same goes for channel spacing. @tinstructor added the option to toggle between 200 kHz and 400 kHz channel spacing (600 kHz is omitted for now), but again this is hardly useful isolation and should not be specific to MR-FSK.
Again, sorting this out properly would have to be done in common code (and deriving the number of channels from frequency band with / channel spacing if possible).
@jeandudey do those settings also make sense for
cc26x2_cc13x2_rf
?Testing procedure
You should now be able to configure the
mr-fsk
phy mode on boards with theat86rf215
driver.You should be able to set modulation order, symbol rate, forward error correction and modulation index.
Communication should still work.
However, not all combinations will produce valid results.
Issues/PRs references
split off #12128
#13295 implements a driver for a different MR-FSK radio