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.