Tech Notes · Edge AI / RKNN

Driving the RK1808 AI Compute Stick from a PC

The TB-RK1808M0 is a Mini-PCIe AI compute card — plug it into a host and the NPU does the inference while your PC stays in control. This note walks the host-side bring-up and a MobileNet_v1 demo. Translated and annotated from jax.fang, Rockchip / Toybrick community.

Attribution & authorization
Original author: jax.fang · Published on the Rockchip / Toybrick community forum (t.rock-chips.com) on 2020-09-08.
Original URL: https://t.rock-chips.com/forum.php?mod=viewthread&tid=2156
Republished here with attribution, translated into English and annotated by Bestom. The RK1808 AI compute card has since been superseded by the RK35xx NPU family; we annotate the differences at the end.

The idea: NPU offload, host stays in charge

The TB-RK1808M0 is a Mini-PCIe form-factor card carrying the Rockchip RK1808 (a dedicated 3.0 TOPS NPU). You mount it on a host PC through an adapter and run inference on the card while your PC feeds it data and collects results through a proxy. That makes it a neat "add an NPU to any box" building block — and the same split (host + NPU endpoint) is the mental model behind the modern RK3588 / RK3576 NPU too.

Bestom note: We translate this classic host-side flow because it teaches the cleanest version of the "PC drives the NPU" pattern our customers still hit on RK3588 / RK3576. For current parts, the endpoint is the on-chip NPU and the proxy is rknnlite inside RKNN Toolkit2 — but the bring-up discipline (confirm the device, update firmware, then run a known-good model) is identical. See Solutions → Edge AI.

Key points

  1. The card has two physical modes — PCIe x1 (via a Mini-PCIe-to-PCIe adapter) or USB 3.0 (via a Mini-PCIe-to-USB3.0 adapter). Pick one with the DIP switch.
  2. After a PCIe x1 install you must reboot the host, then confirm with lspci (look for ASM1042A) and lsusb (look for 2207:1108).
  3. If the firmware is old, update it over a USB-Ethernet tether to the card — no separate flasher needed.
  4. The demo runs a MobileNet_v1 classification entirely on the card, driven from the PC through npu_transfer_proxy.

1. Environment preparation

ItemRequirement
Host PCUbuntu 18.04
ToolkitRKNN-Toolkit v1.4.0 (install steps: community thread tid=964)
Host-side helpernpu_transfer_proxy for the PC side
Card firmwareLatest firmware image (flashing steps: community wiki "Quick Start")

The npu_transfer_proxy is the user-space bridge that lets a Python script on the PC talk to the NPU endpoint on the card. Install it on the host (separate from the firmware that lives on the card).


2. Hardware bring-up (PCIe x1 mode)

Set the card's DIP switch to the PCIe x1 position (switch up), then assemble:

TB-RK1808M0 (Mini-PCIe) │ seats into ▼ Mini-PCIe → PCIe x1 adapter board (screw it down) │ plugs into ▼ Host PC motherboard PCIe slot │ Host must REBOOT before the card is seen
  1. Move the DIP switch up to select PCIe x1 mode.
  2. Seat the card into a Mini-PCIe-to-PCIe x1 adapter board and screw it in.
  3. Plug the adapter into a PCIe slot on the host motherboard.
  4. Reboot the host. After it comes back up, confirm the card is recognized.

3. Confirm the card is recognized

After reboot, run lspci and look for a device reporting ASM1042A (the ASMedia PCIe bridge the adapter exposes):

lspci
#  look for a line mentioning ASM1042A

Then run lsusb and look for the Rockchip NPU vendor/product ID 2207:1108:

lsusb
#  look for a line:  2207:1108

If ASM1042A / 2207:1108 do not appear, check two things first: the card firmware is the latest version, and the DIP switch is actually in PCIe x1 mode. If you are already on the latest firmware, you can skip the firmware-update steps below.


4. Firmware update over USB-Ethernet (only if firmware is old)

If the card needs a firmware bump, tether it to the host over USB-Ethernet and let the card grab updates from the network.

  1. Connect to the card's serial console (login toybrick / toybrick).
  2. Plug a USB-to-Ethernet dongle into the card's USB 2.0 host port; connect the other end to a network with internet.
  3. Check the USB Ethernet interface name appeared:
ip a
#  note the USB Ethernet interface name (e.g. eth1) — it varies by environment
  1. Bring the interface up and lease an address, ignoring the gateway (the card must keep using the host as its route). Replace $1 with the interface name from the previous step:
sudo su
echo '' > /var/lib/dhcp/dhclient.leases
echo 'timeout 2147483647;' > /etc/dhcp/dhclient-toybrick.conf
sudo ip link set $1 up
sudo dhclient -cf /etc/dhcp/dhclient-toybrick.conf -nw -e DHCLIENT_IGNORE_GATEWAY=yes $1
  1. Confirm an external IP was assigned:
ip a
  1. Upgrade the firmware packages:
sudo apt update -y
sudo apt upgrade -y
  1. Reboot the card when the upgrade finishes, then re-run the recognition check from step 3 to confirm.
sudo reboot

5. Run the MobileNet_v1 demo

This is the payoff: a classification model running entirely on the RK1808 NPU, driven from the PC.

# Fetch the demo package
wget http://repo.rock-chips.com/rk1808/mobilenet_v1.tar.gz
tar xvf mobilenet_v1.tar.gz
cd mobilenet_v1/

# Fetch the host-side proxy, make it executable, run it in the background
wget http://repo.rock-chips.com/rk1808/npu_transfer_proxy_20200605/linux-x86_64/npu_transfer_proxy
chmod 755 npu_transfer_proxy
./npu_transfer_proxy &

# Run the demo
python test.py

test.py loads MobileNet_v1 onto the card through the proxy, hands it an input, and prints the classification result. If the proxy and the card are both up, the script runs to completion and the inference result prints to the console.

Bestom note (what changed on modern parts): On RK3588 / RK3576 the same job is rknn.load_rknn(...) + rknnlite on the board itself — no separate PCIe/USB compute card, no npu_transfer_proxy, no USB-Ethernet firmware tether. The model flow (quantize → load → inference) is the same one we covered in "Quantizing a model for the Rockchip NPU (MNIST RKNN walkthrough)". If you are starting fresh today, target RKNN Toolkit2; treat this RK1808 note as the historical reference for the host-driven pattern.

6. USB 3.0 mode (alternative)

The card also supports a USB 3.0 variant: instead of the Mini-PCIe-to-PCIe adapter, use a Mini-PCIe-to-USB3.0 adapter and set the DIP switch to USB 3.0 mode. The bring-up then follows the TB-RK1808S0 guide (the USB-attached sibling card) — same npu_transfer_proxy + test.py demo, different physical transport.

Mode DIP switch Transport Notes ────────────────────────────────────────────────────────── PCIe x1 switch UP Mini-PCIe→PCIe lspci ASM1042A USB 3.0 switch to USB3 Mini-PCIe→USB3 follow TB-RK1808S0

Summary

The TB-RK1808M0 turns any Ubuntu PC into an NPU-equipped box: set the mode, confirm the device with lspci/lsusb, update firmware over USB-Ethernet if needed, then run a model through npu_transfer_proxy. The host-driven NPU pattern here is the ancestor of the on-chip RK35xx NPU workflow — and the bring-up discipline carries straight over.