Supporting UART Boards - Hardware way - for the courageous only :-) #48

Closed
opened 2026-10-27 09:30:08 +01:00 by adam · 6 comments
Owner

This one was foobared... NExt is ok

This one was foobared... NExt is ok <!-- github-sync-id:4036505337 -->
adam closed this issue 2026-10-27 09:30:08 +01:00
Author
Owner
<html>

Yes 👍 — you can often convert the UART version of the Waveshare LoRa HAT into a direct SPI SX1262 board by bypassing the onboard microcontroller. This effectively turns the board into a normal SX1262 radio that works with software like pyMC_Repeater.

I’ll walk you through the concept and the typical modification.

The board we’re talking about is the
Waveshare SX1262 868M LoRa HAT.


1️⃣ Why the modification works

The UART HAT internally looks like this:

Raspberry Pi
│
│ UART
▼
Microcontroller (protocol firmware)
│
│ SPI
▼
SX1262 LoRa chip

The microcontroller translates serial commands into SX1262 SPI commands.

But the SX1262 itself already exposes SPI pins, and the microcontroller is simply sitting between the Pi and the radio.

So the goal is to change it to:

Raspberry Pi
│
│ SPI
▼
SX1262

This bypasses the firmware entirely.


2️⃣ Signals the SX1262 needs

The SX1262 requires these lines:

Signal | Purpose -- | -- MOSI | SPI data from Pi MISO | SPI data to Pi SCK | SPI clock NSS (CS) | chip select BUSY | radio busy indicator DIO1 | interrupt line RESET | reset line GND | ground 3V3 | power

This makes a big difference for mesh systems.


<html>

3️⃣ What the UART board adds

On the UART HAT, the connections usually look like:

SX1262 <→ SPI <→ MCU <→ UART <→ Raspberry Pi

The MCU controls:

  • NSS

  • BUSY

  • DIO1

  • RESET

So to convert it, you must connect the SX1262 pins directly to the Pi GPIO header instead of the MCU.


4️⃣ Typical modification method

Most Waveshare LoRa HATs have exposed test pads or vias.

You typically do this:

Step 1 — locate SX1262 SPI pins

On the PCB you’ll find pads labeled something like:

MOSI
MISO
SCK
NSS
BUSY
DIO1
RESET

Sometimes they are labelled:

SPI_MOSI
SPI_MISO
SPI_CLK
NSS

Step 2 — disconnect MCU SPI lines

You must isolate the MCU so it doesn’t fight the Pi on the SPI bus.

Two common methods:

Option A (cleanest)
Remove the series resistors between MCU and SX1262.

Option B (easier)
Cut the SPI traces.

Typical resistors look like:

R1
R2
R3
R4

between MCU and radio.


Step 3 — wire SX1262 to Raspberry Pi

Example wiring:

SX1262 | Raspberry Pi -- | -- MOSI | GPIO10 MISO | GPIO9 SCK | GPIO11 NSS | GPIO8 BUSY | GPIO20 DIO1 | GPIO16 RESET | GPIO18 GND | GND 3V3 | 3V3

These are the same pins used by the SPI version of the board.

<html>

5️⃣ Raspberry Pi configuration

Enable SPI:

sudo raspi-config
Interface Options
→ SPI
→ Enable

Verify:

ls /dev/spidev*

You should see:

/dev/spidev0.0
/dev/spidev0.1

6️⃣ Then pyMC works normally

Once wired like a real SX1262 radio you can run:

{
"radio_type": "sx1262",
"spi_bus": 0,
"cs_pin": 8,
"reset_pin": 18,
"busy_pin": 20,
"irq_pin": 16
}

Now pyMC talks directly to the SX1262, exactly like the supported SPI HAT.


7️⃣ Performance improvement

Compared to UART mode:

Feature | UART board | SPI converted -- | -- | -- Latency | 10–80 ms | ~2 ms RSSI | unreliable | accurate PHY control | limited | full Mesh stability | moderate | high

This makes a big difference for mesh systems.


8️⃣ One important risk

Some Waveshare UART boards use very tiny 0402 resistors to isolate the SPI lines.

Removing them requires:

  • fine soldering tip

  • tweezers

  • magnification

But electrically the modification is simple.


✅ Good news: most Waveshare boards actually share the same PCB for UART and SPI versions, which means the SX1262 pins are usually easy to access.

</html>
<html> <body> <!--StartFragment--><p data-start="0" data-end="277">Yes 👍 — you <em data-start="13" data-end="106">can often convert the UART version of the Waveshare LoRa HAT into a direct SPI SX1262 board</em> by bypassing the onboard microcontroller. This effectively turns the board into a normal SX1262 radio that works with software like <span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"><span class="whitespace-normal">pyMC_Repeater</span></span>.</p> <p data-start="279" data-end="342">I’ll walk you through the concept and the typical modification.</p> <p data-start="344" data-end="414">The board we’re talking about is the<br data-start="380" data-end="383"> Waveshare SX1262 868M LoRa HAT.</p> <hr data-start="416" data-end="419"> <h1 data-section-id="1b2m76w" data-start="421" data-end="453">1️⃣ Why the modification works</h1> <p data-start="455" data-end="495">The UART HAT internally looks like this:</p> <pre class="overflow-visible! px-0!" data-start="497" data-end="621"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>Raspberry Pi</span><br><span> │</span><br><span> │ UART</span><br><span> ▼</span><br><span>Microcontroller (protocol firmware)</span><br><span> │</span><br><span> │ SPI</span><br><span> ▼</span><br><span>SX1262 LoRa chip</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="623" data-end="695">The microcontroller translates serial commands into SX1262 SPI commands.</p> <p data-start="697" data-end="820">But the <strong data-start="705" data-end="747">SX1262 itself already exposes SPI pins</strong>, and the microcontroller is simply sitting between the Pi and the radio.</p> <p data-start="822" data-end="853">So the goal is to change it to:</p> <pre class="overflow-visible! px-0!" data-start="855" data-end="907"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>Raspberry Pi</span><br><span> │</span><br><span> │ SPI</span><br><span> ▼</span><br><span>SX1262</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="909" data-end="945">This bypasses the firmware entirely.</p> <hr data-start="947" data-end="950"> <h1 data-section-id="1lpnn6h" data-start="952" data-end="982">2️⃣ Signals the SX1262 needs</h1> <p data-start="984" data-end="1016">The SX1262 requires these lines:</p> <div class="TyagGW_tableContainer"><div tabindex="-1" class="group TyagGW_tableWrapper flex flex-col-reverse w-fit"> Signal | Purpose -- | -- MOSI | SPI data from Pi MISO | SPI data to Pi SCK | SPI clock NSS (CS) | chip select BUSY | radio busy indicator DIO1 | interrupt line RESET | reset line GND | ground 3V3 | power </div></div> <p data-start="3306" data-end="3351">This makes a big difference for mesh systems.</p> <hr data-start="3353" data-end="3356"> <html> <body> <!--StartFragment--><h1 data-section-id="1sttg7k" data-start="1309" data-end="1339">3️⃣ What the UART board adds</h1> <p data-start="1341" data-end="1392">On the UART HAT, the connections usually look like:</p> <pre class="overflow-visible! px-0!" data-start="1394" data-end="1446"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>SX1262 &lt;→ SPI &lt;→ MCU &lt;→ UART &lt;→ Raspberry Pi</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="1448" data-end="1465">The MCU controls:</p> <ul data-start="1467" data-end="1494"> <li data-section-id="1o4d6u" data-start="1467" data-end="1472"> <p data-start="1469" data-end="1472">NSS</p> </li> <li data-section-id="1j437x1" data-start="1473" data-end="1479"> <p data-start="1475" data-end="1479">BUSY</p> </li> <li data-section-id="1j414vv" data-start="1480" data-end="1486"> <p data-start="1482" data-end="1486">DIO1</p> </li> <li data-section-id="17a38vx" data-start="1487" data-end="1494"> <p data-start="1489" data-end="1494">RESET</p> </li> </ul> <p data-start="1496" data-end="1601">So to convert it, you must connect the <strong data-start="1535" data-end="1581">SX1262 pins directly to the Pi GPIO header</strong> instead of the MCU.</p> <hr data-start="1603" data-end="1606"> <h1 data-section-id="78yh45" data-start="1608" data-end="1641">4️⃣ Typical modification method</h1> <p data-start="1643" data-end="1699">Most Waveshare LoRa HATs have exposed test pads or vias.</p> <p data-start="1701" data-end="1723">You typically do this:</p> <h3 data-section-id="8e5ceb" data-start="1725" data-end="1760">Step 1 — locate SX1262 SPI pins</h3> <p data-start="1762" data-end="1813">On the PCB you’ll find pads labeled something like:</p> <pre class="overflow-visible! px-0!" data-start="1815" data-end="1856"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>MOSI</span><br><span>MISO</span><br><span>SCK</span><br><span>NSS</span><br><span>BUSY</span><br><span>DIO1</span><br><span>RESET</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="1858" data-end="1886">Sometimes they are labelled:</p> <pre class="overflow-visible! px-0!" data-start="1888" data-end="1925"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>SPI_MOSI</span><br><span>SPI_MISO</span><br><span>SPI_CLK</span><br><span>NSS</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <hr data-start="1927" data-end="1930"> <h3 data-section-id="jjtgzi" data-start="1932" data-end="1969">Step 2 — disconnect MCU SPI lines</h3> <p data-start="1971" data-end="2038">You must isolate the MCU so it doesn’t fight the Pi on the SPI bus.</p> <p data-start="2040" data-end="2059">Two common methods:</p> <p data-start="2061" data-end="2138"><strong data-start="2061" data-end="2084">Option A (cleanest)</strong><br data-start="2084" data-end="2087"> Remove the series resistors between MCU and SX1262.</p> <p data-start="2140" data-end="2183"><strong data-start="2140" data-end="2161">Option B (easier)</strong><br data-start="2161" data-end="2164"> Cut the SPI traces.</p> <p data-start="2185" data-end="2213">Typical resistors look like:</p> <pre class="overflow-visible! px-0!" data-start="2215" data-end="2234"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>R1</span><br><span>R2</span><br><span>R3</span><br><span>R4</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="2236" data-end="2258">between MCU and radio.</p> <hr data-start="2260" data-end="2263"> <h3 data-section-id="1obvptm" data-start="2265" data-end="2305">Step 3 — wire SX1262 to Raspberry Pi</h3> <p data-start="2307" data-end="2322">Example wiring:</p> <div class="TyagGW_tableContainer"><div tabindex="-1" class="group TyagGW_tableWrapper flex flex-col-reverse w-fit"> SX1262 | Raspberry Pi -- | -- MOSI | GPIO10 MISO | GPIO9 SCK | GPIO11 NSS | GPIO8 BUSY | GPIO20 DIO1 | GPIO16 RESET | GPIO18 GND | GND 3V3 | 3V3 </div></div> <p data-start="2494" data-end="2555">These are the same pins used by the SPI version of the board.</p> <!--EndFragment--> <html> <body> <!--StartFragment--><h1 data-section-id="mlh6bc" data-start="2562" data-end="2594">5️⃣ Raspberry Pi configuration</h1> <p data-start="2596" data-end="2607">Enable SPI:</p> <pre class="overflow-visible! px-0!" data-start="2609" data-end="2634"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>sudo raspi-config</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <pre class="overflow-visible! px-0!" data-start="2636" data-end="2678"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>Interface Options</span><br><span> → SPI</span><br><span> → Enable</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="2680" data-end="2687">Verify:</p> <pre class="overflow-visible! px-0!" data-start="2689" data-end="2712"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>ls /dev/spidev*</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="2714" data-end="2729">You should see:</p> <pre class="overflow-visible! px-0!" data-start="2731" data-end="2768"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>/dev/spidev0.0</span><br><span>/dev/spidev0.1</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <hr data-start="2770" data-end="2773"> <h1 data-section-id="i0jjx4" data-start="2775" data-end="2805">6️⃣ Then pyMC works normally</h1> <p data-start="2807" data-end="2855">Once wired like a real SX1262 radio you can run:</p> <pre class="overflow-visible! px-0!" data-start="2857" data-end="2982"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute inset-x-4 top-12 bottom-4"><div class="pointer-events-none sticky z-40 shrink-0 z-1!"><div class="sticky bg-token-border-light"></div></div></div><div class=""><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>{</span><br><span> "radio_type": </span><span class="ͼc">"sx1262"</span><span>,</span><br><span> "spi_bus": </span><span class="ͼb">0</span><span>,</span><br><span> "cs_pin": </span><span class="ͼb">8</span><span>,</span><br><span> "reset_pin": </span><span class="ͼb">18</span><span>,</span><br><span> "busy_pin": </span><span class="ͼb">20</span><span>,</span><br><span> "irq_pin": </span><span class="ͼb">16</span><br><span>}</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="2984" data-end="3062">Now pyMC talks <strong data-start="2999" data-end="3025">directly to the SX1262</strong>, exactly like the supported SPI HAT.</p> <hr data-start="3064" data-end="3067"> <h1 data-section-id="1eminyl" data-start="3069" data-end="3098">7️⃣ Performance improvement</h1> <p data-start="3100" data-end="3122">Compared to UART mode:</p> <div class="TyagGW_tableContainer"><div tabindex="-1" class="group TyagGW_tableWrapper flex flex-col-reverse w-fit"> Feature | UART board | SPI converted -- | -- | -- Latency | 10–80 ms | ~2 ms RSSI | unreliable | accurate PHY control | limited | full Mesh stability | moderate | high </div></div> <p data-start="3306" data-end="3351">This makes a big difference for mesh systems.</p> <hr data-start="3353" data-end="3356"> <h1 data-section-id="1w5qz5f" data-start="3358" data-end="3382">8️⃣ One important risk</h1> <p data-start="3384" data-end="3469">Some Waveshare UART boards use <strong data-start="3415" data-end="3443">very tiny 0402 resistors</strong> to isolate the SPI lines.</p> <p data-start="3471" data-end="3494">Removing them requires:</p> <ul data-start="3496" data-end="3543"> <li data-section-id="dr731e" data-start="3496" data-end="3516"> <p data-start="3498" data-end="3516">fine soldering tip</p> </li> <li data-section-id="y0bj6d" data-start="3517" data-end="3527"> <p data-start="3519" data-end="3527">tweezers</p> </li> <li data-section-id="rhomid" data-start="3528" data-end="3543"> <p data-start="3530" data-end="3543">magnification</p> </li> </ul> <p data-start="3545" data-end="3589">But electrically the modification is simple.</p> <hr data-start="3591" data-end="3594"> <p data-start="3596" data-end="3749">✅ <strong data-start="3598" data-end="3612">Good news:</strong> most Waveshare boards actually share the <strong data-start="3654" data-end="3692">same PCB for UART and SPI versions</strong>, which means the SX1262 pins are usually easy to access.</p><!--EndFragment--> </body> </html> <!-- github-comment-id:4014590510 -->
Author
Owner
<html>

I’ll show you where to modify the board and what signals to wire, based on the typical layout of the Waveshare UART HAT. The board we’re talking about is the
Waveshare SX1262 868M LoRa HAT.

First it helps to understand what is actually on that board.

According to the hardware description, the HAT includes:

  • the SX1262 LoRa radio

  • a UART interface

  • a USB-UART chip (CP2102)

  • a logic buffer (74HC125)

  • the Raspberry Pi 40-pin connector

So the UART design looks roughly like this:

Raspberry Pi
│
│ UART
▼
CP2102 / MCU / logic
│
│ SPI
▼
SX1262 radio

The SX1262 itself normally communicates via SPI (MOSI, MISO, SCK, CS) and uses BUSY, RESET, and DIO1 interrupt pins for control.

That means the chip is already wired for SPI internally — we just need to access those signals.


1️⃣ What the board usually looks like

Typical layout of the UART HAT:

┌───────────────────────────┐
│ ANTENNA │
│ │ │
│ SX1262 │
│ │ SPI │
│ 74HC125 buffer │
│ │ │
│ CP2102 UART │
│ │ │
│ Raspberry Pi GPIO │
└───────────────────────────┘

The key parts to identify:

  1. SX1262 module (metal RF shield)

  2. 74HC125 buffer chip

  3. CP2102 USB-UART chip

  4. small 0402 resistors between SX1262 and buffer

Those resistors are the SPI lines.


2️⃣ Signals you need to access

The SX1262 pins you want:

SX1262 signal | Connect to Pi -- | -- MOSI | GPIO10 MISO | GPIO9 SCK | GPIO11 NSS (CS) | GPIO8 BUSY | GPIO20 DIO1 | GPIO16 RESET | GPIO18

This is why most LoRa mesh systems use SPI radios.

3️⃣ The actual hardware modification

There are three steps.


Step A — isolate the UART circuitry

Locate the series resistors between:

74HC125 ↔ SX1262

They usually look like:

R3 R4 R5 R6

These correspond to:

MOSI
MISO
SCK
NSS

Remove them or cut the traces.

This disconnects the UART logic from the radio.


Step B — expose the SX1262 pins

Near the SX1262 module you will usually find test pads for:

MOSI
MISO
SCK
NSS
BUSY
DIO1
RESET

If they are not labeled, they often appear as small gold pads near the module edges.

You solder thin wires to those pads.


Step C — wire to the Raspberry Pi

Connect like this:

SX1262 pad → Raspberry Pi
Radio | Pi pin -- | -- MOSI | GPIO10 MISO | GPIO9 SCK | GPIO11 NSS | GPIO8 BUSY | GPIO20 DIO1 | GPIO16 RESET | GPIO18 GND | GND 3V3 | 3V3

This is why most LoRa mesh systems use SPI radios.

4️⃣ Software configuration after the mod

Enable SPI:

sudo raspi-config
Interface Options → SPI → Enable

Check:

ls /dev/spidev*

Expected:

/dev/spidev0.0

Then configure your radio in your project (for example in pyMC):

{
"radio_type": "sx1262",
"spi_bus": 0,
"cs_pin": 8,
"reset_pin": 18,
"busy_pin": 20,
"irq_pin": 16
}

Now the software communicates directly with the SX1262 chip.


5️⃣ What performance improvement to expect

Typical difference:

feature | UART board | SPI mod -- | -- | -- latency | 10-80 ms | ~2 ms RSSI accuracy | limited | accurate PHY control | none | full mesh reliability | medium | high

This is why most LoRa mesh systems use SPI radios.

6️⃣ Important warning

On many Waveshare boards the resistors are 0402 size, extremely small.

Recommended tools:

  • fine soldering tip

  • flux

  • microscope or magnifier

  • tweezers

But electrically the modification is simple.

</html>
<html> <body> <!--StartFragment--><p data-start="0" data-end="202">I’ll show you <strong data-start="14" data-end="68">where to modify the board and what signals to wire</strong>, based on the typical layout of the Waveshare UART HAT. The board we’re talking about is the<br data-start="161" data-end="164"> <span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"><span class="whitespace-normal">Waveshare SX1262 868M LoRa HAT</span></span>.</p> <p data-start="204" data-end="264">First it helps to understand what is actually on that board.</p> <p data-start="266" data-end="322">According to the hardware description, the HAT includes:</p> <ul data-start="324" data-end="512"> <li data-section-id="15a24yk" data-start="324" data-end="351"> <p data-start="326" data-end="351">the <strong data-start="330" data-end="351">SX1262 LoRa radio</strong></p> </li> <li data-section-id="fkvj5q" data-start="352" data-end="374"> <p data-start="354" data-end="374">a <strong data-start="356" data-end="374">UART interface</strong></p> </li> <li data-section-id="17l1csz" data-start="375" data-end="405"> <p data-start="377" data-end="405">a <strong data-start="379" data-end="405">USB-UART chip (CP2102)</strong></p> </li> <li data-section-id="83eg7s" data-start="406" data-end="438"> <p data-start="408" data-end="438">a <strong data-start="410" data-end="436">logic buffer (74HC125)</strong></p> </li> <li data-section-id="jc7fty" data-start="439" data-end="512"> <p data-start="441" data-end="512">the Raspberry Pi 40-pin connector <span class="" data-state="closed"></span></p> </li> </ul> <p data-start="514" data-end="557">So the UART design looks roughly like this:</p> <pre class="overflow-visible! px-0!" data-start="559" data-end="670"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>Raspberry Pi</span><br><span> │</span><br><span> │ UART</span><br><span> ▼</span><br><span>CP2102 / MCU / logic</span><br><span> │</span><br><span> │ SPI</span><br><span> ▼</span><br><span>SX1262 radio</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="672" data-end="846">The SX1262 itself normally communicates via <strong data-start="716" data-end="745">SPI (MOSI, MISO, SCK, CS)</strong> and uses <strong data-start="755" data-end="795">BUSY, RESET, and DIO1 interrupt pins</strong> for control. <span class="" data-state="closed"></span></p> <p data-start="848" data-end="943">That means the chip is already wired for SPI internally — we just need to access those signals.</p> <hr data-start="945" data-end="948"> <h1 data-section-id="1oxqv52" data-start="950" data-end="989">1️⃣ What the board usually looks like</h1> <p data-start="991" data-end="1022">Typical layout of the UART HAT:</p> <pre class="overflow-visible! px-0!" data-start="1024" data-end="1372"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span> ┌───────────────────────────┐</span><br><span> │ ANTENNA │</span><br><span> │ │ │</span><br><span> │ SX1262 │</span><br><span> │ │ SPI │</span><br><span> │ 74HC125 buffer │</span><br><span> │ │ │</span><br><span> │ CP2102 UART │</span><br><span> │ │ │</span><br><span> │ Raspberry Pi GPIO │</span><br><span> └───────────────────────────┘</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="1374" data-end="1400">The key parts to identify:</p> <ol data-start="1402" data-end="1549"> <li data-section-id="1xh9g7" data-start="1402" data-end="1440"> <p data-start="1405" data-end="1440"><strong data-start="1405" data-end="1422">SX1262 module</strong> (metal RF shield)</p> </li> <li data-section-id="amj91x" data-start="1441" data-end="1467"> <p data-start="1444" data-end="1467"><strong data-start="1444" data-end="1455">74HC125</strong> buffer chip</p> </li> <li data-section-id="1wmhnz7" data-start="1468" data-end="1495"> <p data-start="1471" data-end="1495"><strong data-start="1471" data-end="1481">CP2102</strong> USB-UART chip</p> </li> <li data-section-id="q12lnz" data-start="1496" data-end="1549"> <p data-start="1499" data-end="1549">small <strong data-start="1505" data-end="1549">0402 resistors between SX1262 and buffer</strong></p> </li> </ol> <p data-start="1551" data-end="1585">Those resistors are the SPI lines.</p> <hr data-start="1587" data-end="1590"> <h1 data-section-id="7kaaeb" data-start="1592" data-end="1624">2️⃣ Signals you need to access</h1> <p data-start="1626" data-end="1651">The SX1262 pins you want:</p> <div class="TyagGW_tableContainer"><div tabindex="-1" class="group TyagGW_tableWrapper flex flex-col-reverse w-fit"> SX1262 signal | Connect to Pi -- | -- MOSI | GPIO10 MISO | GPIO9 SCK | GPIO11 NSS (CS) | GPIO8 BUSY | GPIO20 DIO1 | GPIO16 RESET | GPIO18 </div></div> <p data-start="3503" data-end="3557">This is why most LoRa mesh systems use <strong data-start="3542" data-end="3556">SPI radios</strong>.</p> <!--StartFragment--><h1 data-section-id="1dqntce" data-start="1872" data-end="1910">3️⃣ The actual hardware modification</h1> <p data-start="1912" data-end="1938">There are <strong data-start="1922" data-end="1937">three steps</strong>.</p> <hr data-start="1940" data-end="1943"> <h2 data-section-id="1q6i7o8" data-start="1945" data-end="1983">Step A — isolate the UART circuitry</h2> <p data-start="1985" data-end="2025">Locate the <strong data-start="1996" data-end="2016">series resistors</strong> between:</p> <pre class="overflow-visible! px-0!" data-start="2027" data-end="2051"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>74HC125 ↔ SX1262</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="2053" data-end="2076">They usually look like:</p> <pre class="overflow-visible! px-0!" data-start="2078" data-end="2100"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>R3 R4 R5 R6</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="2102" data-end="2122">These correspond to:</p> <pre class="overflow-visible! px-0!" data-start="2124" data-end="2149"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>MOSI</span><br><span>MISO</span><br><span>SCK</span><br><span>NSS</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="2151" data-end="2181">Remove them or cut the traces.</p> <p data-start="2183" data-end="2230">This disconnects the UART logic from the radio.</p> <hr data-start="2232" data-end="2235"> <h2 data-section-id="2m7uh0" data-start="2237" data-end="2271">Step B — expose the SX1262 pins</h2> <p data-start="2273" data-end="2336">Near the SX1262 module you will usually find <strong data-start="2318" data-end="2331">test pads</strong> for:</p> <pre class="overflow-visible! px-0!" data-start="2338" data-end="2379"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>MOSI</span><br><span>MISO</span><br><span>SCK</span><br><span>NSS</span><br><span>BUSY</span><br><span>DIO1</span><br><span>RESET</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <p data-start="2381" data-end="2469">If they are not labeled, they often appear as <strong data-start="2427" data-end="2446">small gold pads</strong> near the module edges.</p> <p data-start="2471" data-end="2507">You solder thin wires to those pads.</p> <hr data-start="2509" data-end="2512"> <h2 data-section-id="pvh8po" data-start="2514" data-end="2550">Step C — wire to the Raspberry Pi</h2> <p data-start="2552" data-end="2570">Connect like this:</p> <pre class="overflow-visible! px-0!" data-start="2572" data-end="2605"><div class="relative w-full mt-4 mb-1"><div class=""><div class="relative"><div class="h-full min-h-0 min-w-0"><div class="h-full min-h-0 min-w-0"><div class="border border-token-border-light border-radius-3xl corner-superellipse/1.1 rounded-3xl"><div class="h-full w-full border-radius-3xl bg-token-bg-elevated-secondary corner-superellipse/1.1 overflow-clip rounded-3xl lxnfua_clipPathFallback"><div class="pointer-events-none absolute end-1.5 top-1 z-2 md:end-2 md:top-1"></div><div class="pt-3"><div class="relative z-0 flex max-w-full"><div id="code-block-viewer" dir="ltr" class="q9tKkq_viewer cm-editor z-10 light:cm-light dark:cm-light flex h-full w-full flex-col items-stretch ͼ5 ͼj"><div class="cm-scroller"><div class="cm-content q9tKkq_readonly"><span>SX1262 pad → Raspberry Pi</span></div></div></div></div></div></div></div></div></div><div class=""><div class=""></div></div></div></div></div></pre> <div class="TyagGW_tableContainer"><div tabindex="-1" class="group TyagGW_tableWrapper flex flex-col-reverse w-fit"> Radio | Pi pin -- | -- MOSI | GPIO10 MISO | GPIO9 SCK | GPIO11 NSS | GPIO8 BUSY | GPIO20 DIO1 | GPIO16 RESET | GPIO18 GND | GND 3V3 | 3V3 </div></div> <p data-start="3503" data-end="3557">This is why most LoRa mesh systems use <strong data-start="3542" data-end="3556">SPI radios</strong>.</p><!--EndFragment--> 4️⃣ Software configuration after the mod Enable SPI: sudo raspi-config Interface Options → SPI → Enable Check: ls /dev/spidev* Expected: /dev/spidev0.0 Then configure your radio in your project (for example in pyMC): { "radio_type": "sx1262", "spi_bus": 0, "cs_pin": 8, "reset_pin": 18, "busy_pin": 20, "irq_pin": 16 } Now the software communicates directly with the SX1262 chip. <hr data-start="3559" data-end="3562"> <!--StartFragment--><h1 data-section-id="1c23u1t" data-start="3257" data-end="3301">5️⃣ What performance improvement to expect</h1> <p data-start="3303" data-end="3322">Typical difference:</p> <div class="TyagGW_tableContainer"><div tabindex="-1" class="group TyagGW_tableWrapper flex flex-col-reverse w-fit"> feature | UART board | SPI mod -- | -- | -- latency | 10-80 ms | ~2 ms RSSI accuracy | limited | accurate PHY control | none | full mesh reliability | medium | high </div></div> <p data-start="3503" data-end="3557">This is why most LoRa mesh systems use <strong data-start="3542" data-end="3556">SPI radios</strong>.</p> <!--EndFragment--> <h1 data-section-id="1pokhu8" data-start="3564" data-end="3587">6️⃣ Important warning</h1> <p data-start="3589" data-end="3663">On many Waveshare boards the resistors are <strong data-start="3632" data-end="3645">0402 size</strong>, extremely small.</p> <p data-start="3665" data-end="3683">Recommended tools:</p> <ul data-start="3685" data-end="3749"> <li data-section-id="dr731e" data-start="3685" data-end="3705"> <p data-start="3687" data-end="3705">fine soldering tip</p> </li> <li data-section-id="1j3hq33" data-start="3706" data-end="3712"> <p data-start="3708" data-end="3712">flux</p> </li> <li data-section-id="4izm9d" data-start="3713" data-end="3738"> <p data-start="3715" data-end="3738">microscope or magnifier</p> </li> <li data-section-id="y0bj6d" data-start="3739" data-end="3749"> <p data-start="3741" data-end="3749">tweezers</p> </li> </ul> <p data-start="3751" data-end="3795">But electrically the modification is simple.</p> <!--EndFragment--> </body> </html> <!-- github-comment-id:4014651265 -->
Author
Owner

Great — here is a real board photo and explanation of the parts you need to modify on the
Waveshare SX1262 868M LoRa HAT.

Board overview
https://cdn.mauser.pt/large/product_image/2026/42/3ef7f2dd1577fe2a6fc1332c31c4a661_sx1262-868m-lora-hat-4_3.jpg
https://www.waveshare.com/img/devkit/accBoard/SX1262-868M-LoRa-HAT/SX1262-LoRa-HAT-intro.jpg
https://thinkrobotics.com/cdn/shop/files/sx1262-868m-lora-hat-2_5_535x.jpg?v=1717127669

Main components on the board

From the annotated board image:

SX1262 LoRa module – the RF radio under the metal shield

74HC125 level shifter / buffer – connects logic signals between chips

CP2102 USB-UART chip – converts USB/UART for configuration

Raspberry Pi GPIO header – connection to the Pi

USB port – serial debugging

UART header – external serial control

SMA antenna connector

The board is designed as a UART LoRa modem, not a raw SPI radio.
The UART firmware inside handles LoRa communication and routing.

Where to modify the board

The key path we want to bypass is:

SX1262
│
│ SPI
▼
74HC125 buffer
│
▼
UART/USB logic
│
▼
Raspberry Pi

We want:

Raspberry Pi
│ SPI
▼
SX1262

Step 1 — locate the SPI resistor network

Near the 74HC125 chip you will see 4 small resistors in a row.

These correspond to:

MOSI
MISO
SCK
NSS

They are usually labelled something like:

R1
R2
R3
R4

Those resistors connect:

74HC125 → SX1262
What to do

Remove those resistors or cut their traces.

This disconnects the UART circuitry from the radio so the Pi can control it directly.

Step 2 — find the SX1262 SPI pads

Near the SX1262 module you will usually see test pads or vias for the SPI signals.

Typical pads:

MOSI
MISO
SCK
NSS
BUSY
DIO1
RESET

These may appear as small gold circles near the module edge.

Solder thin wires to those pads.

Step 3 — wire them to the Raspberry Pi

Connect like this:
SX1262 signal Raspberry PI
MOSI GPIO10
MISO GPIO9
SCK GPIO11
NSS GPIO8
BUSY GPIO20
DIO1 GPIO16
RESET GPIO18
3V3 3V3
GND GND
These are the standard pins used by most SX1262 drivers.

Step 4 — enable SPI on the Pi

Run:

sudo raspi-config

Enable:

Interface Options → SPI

Check:

ls /dev/spidev*

You should see:

/dev/spidev0.0

Step 5 — configure your software

Example config for pyMC:

{
"radio_type": "sx1262",
"spi_bus": 0,
"cs_pin": 8,
"reset_pin": 18,
"busy_pin": 20,
"irq_pin": 16
}

Now the Pi talks directly to the SX1262 radio chip.

What improvement you get

Compared to UART mode:

Feature UART SPI
Latency 10-80 ms ~2 ms
RSSI unreliable accurate
Packet control limited full
Mesh routing unstable stable

Important warning

The resistors on this board are 0402 size (very small).

Recommended tools:

fine soldering tip

flux

tweezers

magnification

But electrically the modification is straightforward.

Great — here is a real board photo and explanation of the parts you need to modify on the Waveshare SX1262 868M LoRa HAT. Board overview https://cdn.mauser.pt/large/product_image/2026/42/3ef7f2dd1577fe2a6fc1332c31c4a661_sx1262-868m-lora-hat-4_3.jpg https://www.waveshare.com/img/devkit/accBoard/SX1262-868M-LoRa-HAT/SX1262-LoRa-HAT-intro.jpg https://thinkrobotics.com/cdn/shop/files/sx1262-868m-lora-hat-2_5_535x.jpg?v=1717127669 Main components on the board From the annotated board image: SX1262 LoRa module – the RF radio under the metal shield 74HC125 level shifter / buffer – connects logic signals between chips CP2102 USB-UART chip – converts USB/UART for configuration Raspberry Pi GPIO header – connection to the Pi USB port – serial debugging UART header – external serial control SMA antenna connector The board is designed as a UART LoRa modem, not a raw SPI radio. The UART firmware inside handles LoRa communication and routing. Where to modify the board The key path we want to bypass is: SX1262 │ │ SPI ▼ 74HC125 buffer │ ▼ UART/USB logic │ ▼ Raspberry Pi We want: Raspberry Pi │ SPI ▼ SX1262 Step 1 — locate the SPI resistor network Near the 74HC125 chip you will see 4 small resistors in a row. These correspond to: MOSI MISO SCK NSS They are usually labelled something like: R1 R2 R3 R4 Those resistors connect: 74HC125 → SX1262 What to do Remove those resistors or cut their traces. This disconnects the UART circuitry from the radio so the Pi can control it directly. Step 2 — find the SX1262 SPI pads Near the SX1262 module you will usually see test pads or vias for the SPI signals. Typical pads: MOSI MISO SCK NSS BUSY DIO1 RESET These may appear as small gold circles near the module edge. Solder thin wires to those pads. Step 3 — wire them to the Raspberry Pi Connect like this: SX1262 signal Raspberry PI MOSI GPIO10 MISO GPIO9 SCK GPIO11 NSS GPIO8 BUSY GPIO20 DIO1 GPIO16 RESET GPIO18 3V3 3V3 GND GND These are the standard pins used by most SX1262 drivers. Step 4 — enable SPI on the Pi Run: sudo raspi-config Enable: Interface Options → SPI Check: ls /dev/spidev* You should see: /dev/spidev0.0 Step 5 — configure your software Example config for pyMC: { "radio_type": "sx1262", "spi_bus": 0, "cs_pin": 8, "reset_pin": 18, "busy_pin": 20, "irq_pin": 16 } Now the Pi talks directly to the SX1262 radio chip. What improvement you get Compared to UART mode: | Feature | UART | SPI | | -------------- | ---------- | -------- | | Latency | 10-80 ms | ~2 ms | | RSSI | unreliable | accurate | | Packet control | limited | full | | Mesh routing | unstable | stable | Important warning The resistors on this board are 0402 size (very small). Recommended tools: fine soldering tip flux tweezers magnification But electrically the modification is straightforward. <!-- github-comment-id:4014729146 -->
Author
Owner

I feel these series of issues would be better suited as a blog post than GitHub issues.

I feel these series of issues would be better suited as a blog post than GitHub issues. <!-- github-comment-id:4026031714 -->
Author
Owner

HI, do you mean discussions? Should I create them there?

HI, do you mean discussions? Should I create them there? <!-- github-comment-id:4027189183 -->
Author
Owner

Yes or there, it's not something I would add currently as it would be very problematic with the guess work of SNR etc but definitely worth a read.

Yes or there, it's not something I would add currently as it would be very problematic with the guess work of SNR etc but definitely worth a read. <!-- github-comment-id:4034860096 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/pyMC_Repeater#48