# K2Aley GAR-BOT USB LoRa Setup

Copyright (c) 2026 K2Aley. GAR-BOT. All rights reserved.

The current RP5 LoRa USB board enumerates as:

```text
QinHeng CH340 USB serial converter
/dev/ttyUSB0
/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
```

This confirms the USB serial bridge, but it does not identify the radio module
or expose a firmware target by itself.

The vendor sheet/photo points to DX-SMART / SZDX Smart:

- Website: `https://en.szedx-smart.com`
- Support: `manager@szdx-smart.com`
- WhatsApp: `+86 15798463070`

DX-SMART lists the DX-LR30 family as SX1262 LoRa hardware. The plain DX-LR30 is
an SPI LoRa module, while the DX-LR30 programming module is a 5V board that still
uses SPI to the LoRa chip. That means the LoRa radio itself is not flashed over
USB like an ESP board; only the controller/development board firmware would be
flashed, and only after the exact MCU/bootloader is identified.

## Current Findings

- RP5 sees one USB serial LoRa-side device.
- The device did not answer common AT commands at 9600, 19200, 38400, 57600, or
  115200 baud.
- `esptool chip-id` did not detect an Espressif bootloader on the RP5 device.
- The RP Zero 2 W transmitter was not reachable during the USB LoRa check, so
  its module could not be verified yet.
- The project config now uses the stable RP5 serial path:
  `/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0`.

## What This Means

Many USB LoRa boards are one of these:

- Transparent serial LoRa modem: no firmware flash from Linux; configure with
  AT commands or vendor utility, often only in a special config mode.
- ESP32/Arduino LoRa board behind CH340: flashable, but it must enter bootloader
  mode and the exact board/pin map/firmware must be known.
- USB bridge connected to a bare LoRa radio: the radio chip itself is not flashed
  over USB; the controller firmware is flashed instead.

Do not transmit without a proper antenna attached.

## RP5 Commands

Detect:

```bash
python3 lora_usb_detect.py
```

Probe common serial speeds:

```bash
python3 lora_usb_probe.py /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
```

Check for ESP bootloader:

```bash
cd ~/rp5_ai_agent
. .venv/bin/activate
python -m esptool --port /dev/ttyUSB0 chip-id
```

If this fails with `No serial data received`, the board is not in ESP bootloader
mode or is not an Espressif-based LoRa board.

## Needed To Flash

Before firmware flashing, identify the exact board:

- Board name/model.
- MCU type, such as ESP32, RP2040, STM32, ATmega328P, or vendor modem.
- LoRa radio type, such as SX1276/SX1278/SX1262.
- Pin map for NSS/CS, RESET, DIO pins.
- Desired firmware file or firmware behavior.

Without that, the safe action is detection/configuration only.

## GAR-BOT Decision

Do not flash unknown firmware to these boards yet. The safe next step is:

1. Bring the RP Zero 2 W transmitter back online.
2. Verify its USB LoRa module also appears as CH340 or another serial device.
3. Confirm the exact DX-SMART kit/board model, for example DX-LR30 programming
   module, DX-PJ26, or another controller board.
4. Use the vendor information pack/tooling for that exact model.
5. Only flash firmware after the bootloader procedure is known.
