The new system supports:
- time-tagging of log messages
- message priority levels with a threshold below which they are not printed
- colored output of the message priority for easy identification
- compile-time disabling of all logging per C module
So far, it is integrated in the main and rx modules which generate most
messages. Other modules will be migrated in the future.
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.
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.