Replies: 1 comment 4 replies
-
What are you comparing this to? It's pretty consistent and 0.00021% different from the set value which is pretty amazing for the price of a LoRa module, when I was a lad we'd use hot gravel to keep the radio sets at stable temperature.
LoRa stands for Long Range, you have them 10cm apart and transmitting at full power so I'd expect issues on the receiver input circuitry as you are shouting directly in to the ear of the receiver. That may have some bearing on the frequency error. This isn't an issue with RadioLib - it's setting up the radio with the parameters you want and then reporting what it sees. Let us know what you think. |
Beta Was this translation helpful? Give feedback.
-
At present, I am using esp32 +sx1262 for lora test, one is responsible for sending and the other is responsible for receiving. Although the data can be received normally in the work, the frequency deviation of printing return is too large, I don't know how to reduce this deviation. The distance between the two is less than ten centimeters
// LoRa config
#define LORA_SEND_TEST 0
#define LORA_SEND_INTERVAL 5000
#if LORA_LONGRANGE_CONFIG == 1
#define LORA_BW 62.5
#define LORA_SF 12
#define LORA_CR 5
#else
#define LORA_BW 500.0
#define LORA_SF 7
#define LORA_CR 5
#endif
#define LORA_FREQ 915.0
#define LORA_SYNC_WORD 0x20
#define LORA_TX_POWER 22
#define LORA_PREAMBLE_LEN 20
int state = radio.begin(LORA_FREQ, LORA_BW, LORA_SF, LORA_CR, LORA_SYNC_WORD, LORA_TX_POWER, LORA_PREAMBLE_LEN, 0.0, true);
if (state == RADIOLIB_ERR_NONE)
{
Serial.printf("success! %.1f %3.2f %d %d %d %d %d\r\n",
LORA_FREQ,
LORA_BW,
LORA_SF,
LORA_CR,
LORA_SYNC_WORD,
LORA_TX_POWER,
LORA_PREAMBLE_LEN);
}
else
{
Serial.printf("LoRa Init failed, code: %d\r\n", state);
while (1)
{
delay(100);
}
}
static void lora_recv_test()
{
if (lora_rx_flag)
{
lora_rx_flag = false;
lora_count++;
}
static void lora_send_test()
{
String lora_tx_str = "Hello World! Count: " + String(lora_count++);
int state = radio.transmit(lora_tx_str);
}
The following is receiving the printed data:
[SX1262] Received packet!
[SX1262] Data: Hello World!Count: 670
[SX1262] RSSI: -17.00 dBm
[SX1262] SNR: 5.75 dB
[SX1262] Frequency error: -1918.25 Hz
[SX1262] Received packet!
[SX1262] Data: Hello World! Count: 673
[SX1262] RSSI: -17.00 dBm
[SX1262] SNR: 5.25 dB
[SX1262] Frequency error: -1917.76 Hz
[SX1262] Received packet!
[SX1262] Data: Hello World! Count: 675
[SX1262] RSSI: -17.00 dBm
[SX1262] SNR: 5.50 dB
[SX1262] Frequency error: -1918.73 Hz
Beta Was this translation helpful? Give feedback.
All reactions