- Ramp-up length increased to 128 symbols (here is room for
improvement!)
- Try to detect the frequency once during ramp-up. To do so, every
second symbol is inverted (to remove the +/-1 symbol toggling) and the
phase difference between neigboring resulting symbols is checked. When
it is low enough for all symbols, the frequency is estimated and
corrected. When frequency estimation was done, it is not retried for a
number of incoming symbols in order to allow the timing estimator to
converge again.
- This approach was verified in a simulated loopback test with frequency
offset and AWGN.
The RX chain uses this to acquire an initial estimate of the carrier frequency. The estimate is adjusted on every incoming symbol until a preamble is found.
In the following events, the modem cannot switch to transmit mode for the
given time:
- after a preamble has been received, for 500 ms
- after a packet has been successfully decoded, for 1 ms
- after receive mode was initially enabled, for 500 ms
Note that the times are that long to work around the RX/TX switching of
the hackrf and can be hopefully reduced to <10 milliseconds in a later
version.
- limit frequency adjustment range
- pre-filter the baseband signal to remove out-of-band interference
- reset the frequency acquisition periodically (every 30s) if no preamble is found
Packets are now read from the TUN device and transmitted. The signal
goes through a channel emulator and is then received + decoded. If
decoding is successful, the result is written back to the TUN device
(which does not make much sense, but works for testing).
Unfortunately, there still seems to be a problem in the receiver: packet
loss is very high even at extremely high SNRs.
This allows a higher layer to adjust data rate based on the current
channel conditions. For example, the SNR could be measured and if it
becomes too low for the current modulation/code, a lower-order
modulation or stronger code could be used.
Decoding of the test message works down to ~10 dB SNR.
Still missing:
- Phase tracking during header and payload.
- CRC calculation and check.
- Data whitening.
The NCO frequency is now only adjusted every 8 symbols. That means that
the frequency error over the last 8 symbols before the adjustment is
(almost) constant, giving a good estimation result. Therefore, the
adjustment factor can be much larger than previously, leading to faster
acquisition time.