nuttx
nuttx copied to clipboard
[FEATURE] Improve sx127x application to get data and verify data integrity
Is your feature request related to a problem? Please describe.
While testing two modules transmitting and receiving FSK data less than 1 meter (~ 3 ft) apart I noticed that sometimes the receiver module don't show any data and sometimes it was displaying wrong data:
Received:
SNR = 0
RSSI = -90
len = 21
0x00 0x01 0x02 0x03 0x04 0xb9 0x86 0x33 0x9f 0xf5
0x0f 0x40 0xf3 0x3c 0xf8 0x0b 0x9e 0xee 0xfe 0x3f
0xf2
wait 5 sec ...
Waiting for data
Received:
SNR = 0
RSSI = -101
len = 5
0x00 0x01 0x02 0x03 0x06
wait 5 sec ...
Waiting for data
Received:
SNR = 0
RSSI = -104
len = 5
0x00 0x01 0x02 0x03 0x04
wait 5 sec ...
Waiting for data
Received:
SNR = 0
RSSI = -105
len = 5
0x00 0x01 0x02 0x03 0x04
wait 5 sec ...
Waiting for data
Received:
SNR = 0
RSSI = -106
len = 5
0x00 0x01 0x02 0x03 0x04
wait 5 sec ...
Waiting for data
Received:
SNR = 0
RSSI = -106
len = 5
0x00 0x01 0x02 0x03 0x04
wait 5 sec ...
Waiting for data
Received:
SNR = 0
RSSI = -104
len = 5
0x00 0x01 0x02 0x03 0x04
wait 5 sec ...
Waiting for data
Received:
SNR = 0
RSSI = -105
len = 5
0x00 0x01 0x02 0x03 0x04
wait 5 sec ...
Waiting for data
Received:
SNR = 0
RSSI = -94
len = 21
0x00 0x01 0x02 0x8b 0x04 0x39 0x76 0x3b 0x8d 0x0b
0xce 0x55 0x5b 0xbf 0xb7 0xe9 0xa6 0x40 0x5e 0x7a
0x3a
wait 5 sec ...
Waiting for data
Received:
SNR = 0
RSSI = -107
len = 5
0x00 0x01 0x02 0x03 0x04
wait 5 sec ...
Waiting for data
Received:
SNR = 0
RSSI = -105
len = 5
0x00 0x01 0x02 0x03 0x04
``
### Describe the solution you'd like
After some testing I discovered that the default TX Power (set to 14 value) is too low, normally the receiver was showing -90 to -111 dBm. I suggest using a little bit higher value: currently I'm using the value 20 that turns on the PA, the the RSSI changed to -14 to -11. After it the modules always will communicate.
Also I suggest enabling the CRC (CONFIG_LPWAN_SX127X_CRCON = 1), although after increasing the power TX I didn't noticed any data corruption.
### Describe alternatives you've considered
_No response_
### Verification
- [x] I have verified before submitting the report.