# uConsole AIO V2 Documentation

The **AIO V2 (All-In-One)** is an expansion board that adds seven key functions to the ClockworkPi uConsole in a single module: an RTL-SDR receiver, a LoRa/Meshtastic radio, GPS, a real-time clock (RTC), a USB 3.0 hub, a 1 Gbps Ethernet port, and an internal USB-C port. Everything fits inside the uConsole enclosure - no external dongles, no cables hanging off the side.

<div style="margin-top: 15px; margin-bottom: 8px;">
  <a class="klawisz_custom" href="https://sapsan-sklep.pl/en/products/aio-v2" style="display: inline-block; background-color: #c13121; color: white; padding: 8px 15px; border-radius: 4px; text-decoration: none; font-size: 14px;">
    <span style="display: inline-flex; align-items: center;">
      <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="margin-right: 6px;">
        <circle cx="9" cy="21" r="1"></circle>
        <circle cx="20" cy="21" r="1"></circle>
        <path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path>
      </svg>
      Buy AIO V2 at SAPSAN Store
    </span>
  </a>
</div>

> **Note:** [sapsan-sklep.pl](https://sapsan-sklep.pl/en) is an official distributor of HackerGadgets uConsole accessories. The version we sell ships as a ready-to-use kit with the antenna mounting hardware and a full antenna set included.

## Table of Contents
1. [Introduction](#introduction)
2. [What's in the Box](#whats-in-the-box)
3. [Technical Specifications](#technical-specifications)
4. [Compatibility](#compatibility)
5. [Quick Installation](#quick-installation)
6. [GPIO Power Control](#gpio-power-control)
7. [Module Setup](#module-setup)
   - [RTC](#rtc)
   - [RTL-SDR](#rtl-sdr)
   - [GPS](#gps)
   - [LoRa / Meshtastic](#lora--meshtastic)
8. [Installation Safety](#installation-safety)
9. [For Developers](#for-developers)
10. [Support](#support)

## Introduction

The AIO V2 turns the uConsole into a self-contained mobile command center. Instead of buying a separate RTL-SDR dongle, a GPS module, and an Ethernet adapter, all of these live on one board inside the case.

Compared to the original AIO board, V2 replaces the side USB-A port with a **1 Gbps RJ45 Ethernet** port and adds **GPIO power control** for the GPS, LoRa, RTL-SDR, and internal USB - each of these is powered off by default and only comes online when its GPIO pin is pulled high. This is a deliberate design choice: the radios do not drain the battery until you actually enable them.

## What's in the Box

The SAPSAN version of the AIO V2 is the antenna-kit edition:

- AIO V2 All-In-One extension board
- Antenna mounting kit
- Antenna set (7-antenna configuration)

The uConsole itself, the compute module (CM4/CM5), and the Upgrade Kit adapter board are **not** included.

## Technical Specifications

| Function | Details |
|----------|---------|
| **RTL-SDR** | RTL2832U + R860 tuner, 100 kHz - 1.74 GHz, HF direct sampling 100 kHz - 28.8 MHz |
| **SDR oscillator** | TCXO (low temperature drift) |
| **SDR bias tee** | 5V, software-controllable, with LED status indicator |
| **LoRa** | Semtech SX1262, 860 - 960 MHz, max 22 dBm output, TCXO |
| **GPS** | Multi-constellation GPS / BDS / GNSS, supports active and passive antennas |
| **RTC** | PCF85063A with CR1220 backup battery |
| **USB** | External USB-C (side) + internal USB-C + 2.0 mm pin header, up to USB 3.0 |
| **Ethernet** | RJ45, 1 Gbps (requires Upgrade Kit adapter board) |
| **Antenna connectors** | IPEX, individually labeled SDR / GPS / LoRa |
| **Power management** | SDR / GPS / LoRa / internal USB individually GPIO-controlled, default OFF |

## Compatibility

- Designed for uConsole with a **CM4** or **CM5** compute module.
- The RTL-SDR, LoRa, GPS, and RTC functions work on the AIO V2 **without** the adapter board.
- **USB 3.0** speed and the **1 Gbps Ethernet** port require the [uConsole Upgrade Kit adapter board](https://sapsan-sklep.pl/en/products/plytka-adapter-do-uconsole-upgrade-kit), which routes PCIe and USB 3.0 from the compute module. Without it (and without CM5), USB is limited to USB 2.0 and the RJ45 port will not function.

## Quick Installation

The fastest way to bring everything online is the HackerGadgets package. After logging into the uConsole:

```bash
sudo apt install hackergadgets-uconsole-aio-board
```

Then reboot. After the reboot, the SDR, GPS, LoRa, and internal USB modules are enabled and configured. If you prefer to set up each module by hand, use the manual steps below.

> A ported Bookworm or Trixie image with SDR++ pre-installed (by Rex, from the ClockworkPi forum) is recommended as the base OS.

## GPIO Power Control

On the AIO V2 each radio is powered through a GPIO pin and is **off by default**. The package above handles this automatically, but you can also toggle them manually:

| Module | GPIO |
|--------|------|
| GPS | 27 |
| LoRa | 16 |
| RTL-SDR | 7 |
| Internal USB | 23 |

Example - enable and disable the GPS rail:

```bash
pinctrl 27 op && pinctrl 27 dh   # Enable GPS power
pinctrl 27 op && pinctrl 27 dl   # Disable GPS power
```

A module will not be detected by the system until its GPIO pin is pulled high. A helper control script is available at [github.com/hackergadgets/aiov2_ctl](https://github.com/hackergadgets/aiov2_ctl).

## Module Setup

The steps below are the manual configuration path. If you used the `hackergadgets-uconsole-aio-board` package, most of this is already done for you.

### RTC

Add the following to `/boot/firmware/config.txt`.

**CM4:**
```
# RTC
dtparam=i2c_arm=on
dtoverlay=i2c-rtc,pcf85063a
```

**CM5:**
```
# RTC
dtparam=rtc=off
dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi0
```

Reboot, then verify:
```bash
sudo hwclock -r
```
The command should print the current date and time. The RTC keeps time across power-off thanks to the CR1220 battery.

### RTL-SDR

1. Connect an antenna to the IPEX connector labeled **SDR**.
2. Install SDR++:
   ```bash
   sudo apt install sdrpp
   ```
3. Launch `sdrpp`, select the RTL-SDR device in the source dropdown.
4. Tune to a frequency and pick a modulation (WFM for broadcast FM).
5. Click play - a local FM station is a quick way to confirm the receiver works.

The 5V bias tee (software-controllable) can power active antennas and LNAs.

### GPS

Add to `/boot/firmware/config.txt`:

**CM4:**
```
enable_uart=1
```
On CM4 also remove `console=serial0,115200` from `/boot/firmware/cmdline.txt`.

**CM5:**
```
dtparam=uart0
```

Then:
1. Connect an antenna to the IPEX connector labeled **GPS** (active or passive).
2. Read the NMEA stream:
   ```bash
   sudo minicom -D /dev/ttyS0 -b 9600      # CM4
   sudo minicom -D /dev/ttyAMA0 -b 9600    # CM5
   ```
3. A valid fix shows `$GNGGA` and `$GNRMC` sentences with coordinates.
4. Go outside - GPS needs a clear view of the sky to acquire a fix.

> For microsecond-accurate NTP, the GPS PPS output can be routed to GPIO6 (see the manufacturer guide for the PPS configuration).

### LoRa / Meshtastic

Add to `/boot/firmware/config.txt`:

**CM4:**
```
dtparam=spi=on
dtoverlay=spi1-1cs
```

**CM5:**
```
dtoverlay=spi1-1cs
```

1. Connect an 860 - 960 MHz antenna to the IPEX connector labeled **LoRa**.
2. On the Bookworm image, free the SPI bus used by the DevTerm printer:
   ```bash
   sudo systemctl stop devterm-printer.service
   sudo systemctl disable devterm-printer.service
   ```
3. Install the Meshtastic build dependencies:
   ```bash
   sudo apt install libgpiod-dev libyaml-cpp-dev libbluetooth-dev libusb-1.0-0-dev libi2c-dev openssl libssl-dev libulfius-dev liborcania-dev
   ```
4. Install `meshtasticd` (download the latest `arm64` `.deb` from the [Meshtastic firmware releases](https://github.com/meshtastic/firmware/releases)):
   ```bash
   sudo apt install ./meshtasticd_<version>_arm64.deb
   ```
5. Configure the LoRa radio in `/etc/meshtasticd/config.yaml`:
   ```yaml
   Lora:
     Module: sx1262
     DIO2_AS_RF_SWITCH: true
     DIO3_TCXO_VOLTAGE: true
     IRQ: 26
     Busy: 24
     Reset: 25
     spidev: spidev1.0
   ```
6. To feed GPS into Meshtastic, add:
   ```yaml
   GPS:
     SerialPath: /dev/ttyS0     # /dev/ttyAMA0 on CM5
   ```
7. Enable and start the service:
   ```bash
   sudo systemctl daemon-reload
   sudo systemctl enable meshtasticd
   sudo systemctl start meshtasticd
   sudo systemctl status meshtasticd
   ```
8. View logs with `sudo journalctl -u meshtasticd -b`.
9. Optionally enable the web UI in `/etc/meshtasticd/config.yaml`:
   ```yaml
   Webserver:
     Port: 443
     RootPath: /usr/share/meshtasticd/web
   ```
   Then open `https://localhost` (accept the self-signed certificate warning) and set your region under **Config > LoRa**.

## Installation Safety

> **Warning:** After installing the AIO V2, make sure the ribbon cable is connected exactly as shown in the instructions. An incorrectly connected ribbon cable combined with charging can damage the uConsole mainboard.

## For Developers

Key pin assignments for the SX1262 LoRa module (SPI1):

| Signal | GPIO |
|--------|------|
| SPI | SPI1, CE0 on GPIO18 |
| DIO2 | RF antenna switch control |
| DIO3 | TCXO voltage supply |
| IRQ | 26 |
| Busy | 24 |
| Reset | 25 |

Module power-control GPIO map (see [GPIO Power Control](#gpio-power-control)): GPS = 27, LoRa = 16, RTL-SDR = 7, Internal USB = 23.

## Support

For technical support and setup help:
- email: contact@sapsan-sklep.pl
- Manufacturer setup guide: [HackerGadgets uConsole AIO setup guide](https://hackergadgets.com/pages/hackergadgets-uconsole-rtl-sdr-lora-gps-rtc-usb-hub-all-in-one-extension-board-setup-guide)

*[CSS]: Cascading Style Sheet
*[HTML]: Hyper Text Markup Language
