Closed dsvensson closed 6 years ago
There seem to be some Carrier Sense
interaction wrt sync word that I don't fully understand. Using SyncMode::MatchFull
(no explicit Carrier Sense
sync mode) and leaving MAX_LNA_GAIN
at its default, "Maximum possible LNA + LNA 2 gain" results in lost packets, ie not passing threshold.
Right now SyncMode members are defined as follows:
These names are close to the CC1101 spec, but they're not particularly meaningful.
The
CheckXXofYY
denote thatXX
number of bits should be checked in theYY
bits of the sync word. The sync word is 16 bits long, and in the case ofYY=32
, the sync word is repeated. Then the*CarrierSense
versions are the same as the first ones, except that they addCarrierSense
into the mix. There must be better names, and perhaps it's possible to split it, or perhaps it should be two functions.set_sync_mode(SyncMode)
, andset_sync_mode_carrier_sense(SyncMode)
.Maybe:
..and it would map to the corresponding with/without
CarrierSense
register values.Maybe just remove the CarrierSense for now. It could be that there should be some other API for controlling CarrierSense, which also controls gain etc (17.4 in spec), and this other function works in tandem with the current sync mode setting.