2022-02-27 18:41:16 +01:00
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
2021-10-17 19:26:38 +02:00
|
|
|
|
|
|
|
#include <liquid/liquid.h>
|
|
|
|
|
2022-05-07 21:17:53 +02:00
|
|
|
/*** TIMING CONFIG ***/
|
|
|
|
|
2023-05-20 21:59:40 +02:00
|
|
|
#define TX_SWITCH_BACKOFF_PREAMBLE_MS 10 // only relevant if packet cannot be decoded
|
2022-05-07 21:17:53 +02:00
|
|
|
#define TX_SWITCH_BACKOFF_END_OF_PACKET_MS 1
|
|
|
|
#define TX_SWITCH_BACKOFF_AFTER_RX_ON 500 // time the transceiver must stay in RX mode
|
|
|
|
|
2022-02-27 18:41:16 +01:00
|
|
|
/*** LAYER 1 CONFIG ***/
|
|
|
|
|
2022-02-27 20:21:14 +01:00
|
|
|
#define SYMBOL_RATE 100e3f
|
|
|
|
|
2022-02-12 21:58:53 +01:00
|
|
|
#define PAYLOAD_CHANNEL_CODE LIQUID_FEC_CONV_V27P34
|
|
|
|
#define PAYLOAD_MODULATION LIQUID_MODEM_QAM16
|
2021-10-17 19:26:38 +02:00
|
|
|
|
2024-01-05 21:29:41 +01:00
|
|
|
#define HEADER_CHANNEL_CODE LIQUID_FEC_HAMMING84
|
2021-10-17 19:26:38 +02:00
|
|
|
#define HEADER_MODULATION LIQUID_MODEM_QPSK
|
|
|
|
|
2022-02-12 21:58:53 +01:00
|
|
|
#define PAYLOAD_CRC_SCHEME LIQUID_CRC_16
|
|
|
|
|
2021-10-17 19:26:38 +02:00
|
|
|
#define PREAMBLE_MSEQ_M 6
|
|
|
|
#define PREAMBLE_MSEQ_POLY LIQUID_MSEQUENCE_GENPOLY_M6
|
|
|
|
#define PREAMBLE_MSEQ_INIT 0x00000001
|
|
|
|
|
2022-01-29 22:05:17 +01:00
|
|
|
#define RRC_SPS 4 // samples per symbol
|
|
|
|
#define RRC_DELAY 7 // delay in symbols
|
|
|
|
#define RRC_BETA 0.2f
|
|
|
|
|
2023-05-17 22:28:18 +02:00
|
|
|
#define TRANSMISSION_RAMP_UP_LEN 128 // symbols
|
2022-01-29 22:05:17 +01:00
|
|
|
#define TRANSMISSION_RAMP_DOWN_LEN 32 // symbols
|
|
|
|
|
2022-03-03 22:18:19 +01:00
|
|
|
/*** SDR CONFIG ***/
|
|
|
|
|
|
|
|
#define SDR_IS_FULL_DUPLEX 0
|
|
|
|
|
2023-05-20 21:59:40 +02:00
|
|
|
#define SDR_OVERSAMPLING 5 // integer factor!
|
2022-03-03 22:18:19 +01:00
|
|
|
|
|
|
|
#define SDR_RX_SAMPLING_RATE (SYMBOL_RATE * RRC_SPS * SDR_OVERSAMPLING)
|
2023-05-20 21:59:40 +02:00
|
|
|
#define SDR_TX_SAMPLING_RATE (SDR_RX_SAMPLING_RATE)
|
2022-03-03 22:18:19 +01:00
|
|
|
|
|
|
|
// actually transmitted or received signal frequencies, NOT the SDR center frequency.
|
|
|
|
#define SDR_TX_FREQ 434.100e6f
|
2023-05-17 22:28:18 +02:00
|
|
|
#define SDR_RX_FREQ 434.115e6f
|
2022-03-03 22:18:19 +01:00
|
|
|
|
|
|
|
// shift applied in the baseband, to get rid of SDR DC peak. If the value here
|
|
|
|
// is not 0, software mixing will be done on the received signal.
|
|
|
|
#define SDR_TX_IF_SHIFT 0.000e6f
|
|
|
|
#define SDR_RX_IF_SHIFT 0.150e6f
|
|
|
|
|
|
|
|
// NOTE: the SDR center frequency will be SDR_RX_FREQ - SDR_RX_IF_SHIFT.
|
|
|
|
|
2022-04-08 16:17:00 +02:00
|
|
|
// gain configuration
|
|
|
|
#define SDR_GAIN_TX_AMP 0.0f // extra power amplifier. Set to 14.0f to activate.
|
2024-01-03 17:04:47 +01:00
|
|
|
#define SDR_GAIN_TX_VGA 0.0f // normal variable gain amplifier.
|
2022-04-08 16:17:00 +02:00
|
|
|
|
|
|
|
#define SDR_GAIN_RX_AMP 0.0f // extra input amplifier. Set to 14.0f to activate.
|
|
|
|
#define SDR_GAIN_RX_LNA 30.0f // RF variable gain amplifier.
|
|
|
|
#define SDR_GAIN_RX_VGA 24.0f // Baseband variable gain amplifier.
|
|
|
|
|
2022-02-27 18:41:16 +01:00
|
|
|
#endif // CONFIG_H
|