Skip to content

Commit 6f1edad

Browse files
arjav1528acassis
authored andcommitted
docs/examples/sx127x_demo: Expand SX127X demo documentation
Add default configuration, short-range FSK testing tips, and troubleshooting guidance for the SX127X demo example. Signed-off-by: Arjav Patel <arjav1528@gmail.com>
1 parent 70d9183 commit 6f1edad

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

  • Documentation/applications/examples/sx127x_demo

Documentation/applications/examples/sx127x_demo/index.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,68 @@
33
============================
44

55
This example demonstrates the use of the ``SX127X`` radio.
6+
7+
Overview
8+
========
9+
10+
The ``sx127x_demo`` application exercises the `SX127X` low-power wide-area
11+
network (LPWAN) radio driver in both transmit and receive modes. It is
12+
typically enabled via a board defconfig together with
13+
``CONFIG_LPWAN_SX127X`` and the appropriate SPI and GPIO wiring for the
14+
target module.
15+
16+
Default configuration
17+
=====================
18+
19+
Unless explicitly overridden in the board or application configuration,
20+
the SX127X driver uses the following relevant defaults:
21+
22+
* RF frequency: ``CONFIG_LPWAN_SX127X_RFFREQ_DEFAULT`` (board-specific,
23+
for example 433 MHz, 868 MHz or 915 MHz).
24+
* TX power: ``CONFIG_LPWAN_SX127X_TXPOWER_DEFAULT``.
25+
The global default is **17 dBm**, which provides a stronger and more
26+
reliable link than the previous 14 dBm default.
27+
* CRC: ``CONFIG_LPWAN_SX127X_CRCON``.
28+
The global default is **1** (CRC enabled), so payloads are protected
29+
by a checksum and corrupted frames are rejected.
30+
31+
Individual boards may override these values in their ``defconfig`` files.
32+
For example, some boards tested with integrated SX1276 modules may set
33+
``CONFIG_LPWAN_SX127X_TXPOWER_DEFAULT=20`` and adjust
34+
``CONFIG_LPWAN_SX127X_RFFREQ_DEFAULT`` to match the module’s band.
35+
36+
Short-range FSK testing
37+
=======================
38+
39+
When running short-range FSK tests (for example, two modules placed
40+
around one meter apart on a lab bench), the following settings are
41+
recommended:
42+
43+
* Keep ``CONFIG_LPWAN_SX127X_TXPOWER_DEFAULT`` at **17 dBm** or higher
44+
(some modules work well at 20 dBm) to avoid marginal RSSI values that
45+
can lead to intermittent reception.
46+
* Ensure ``CONFIG_LPWAN_SX127X_CRCON=1`` on both transmitter and
47+
receiver so corrupted frames are discarded instead of being printed
48+
with incorrect data.
49+
50+
These defaults are based on empirical testing reported by users and are
51+
intended to provide robust communication without requiring additional
52+
per-board tuning.
53+
54+
Troubleshooting
55+
===============
56+
57+
If the receiver occasionally shows no data, truncated data, or payloads
58+
that do not match what was transmitted, check the following:
59+
60+
* Verify that the RF frequency and modulation settings are identical on
61+
both sides.
62+
* Inspect the reported RSSI and SNR values; very low RSSI at short
63+
distance can indicate insufficient TX power or antenna issues.
64+
* Confirm that CRC is enabled and that both peers are configured
65+
consistently (either both with CRC enabled or both with it disabled,
66+
though enabling CRC is recommended).
67+
68+
Adjusting TX power or antenna placement and ensuring consistent CRC
69+
settings on the link typically resolves data integrity problems seen in
70+
simple FSK tests.

0 commit comments

Comments
 (0)