~~NOCACHE~~ ~~NOTOC~~

sBOX-R13 Series

Product Series: sBOX-R13 · AIoT Edge Gateway (BOX PC) · Rockchip RK3568 · SUS201 brushed stainless steel · Fanless

Contents [Hide]
===== 1 Product Specifications ===== ==== 1.1 Overview ==== The sBOX-R13 series is a **compact edge computing gateway (BOX PC)** for AIoT deployments, built on the Rockchip **RK3568** platform in a **SUS201 brushed stainless steel, fanless, fully enclosed** housing rated for -20 ~ 70℃ and mounted by a bottom bracket. The unit uses an ultra-thin "front-panel I/O + one-piece sheet-metal top + bottom mounting bracket" layout, only 26mm thick. The front panel groups the DC input, indicator LEDs, Recover / Return pinholes, MIC, RS485&RS232 terminals, HDMI, Gigabit Ethernet and four USB ports; the rear carries the Wi-Fi / 4G antenna jacks, two Micro SIM slots, RS485 / RS232 terminals, SPK and GPIO. I/O uses a **cable-free design**: board-level connectors align directly with the housing cut-outs, minimising internal wiring. Typical applications include production-line networking, edge computing, power and energy, and transportation / in-vehicle systems. **Highlights** * Rockchip RK3568 quad-core processor (4 × Cortex-A55 @2.0GHz, 1 TOPS NPU) * Rich I/O with cable-free design: 2 × RS485 + 2 × RS232, 2 × USB3.0 (one shared with OTG) + 2 × USB2.0, 1 × HDMI, 1 × Gigabit Ethernet * Onboard 2.4G/5G dual-band Wi-Fi (802.11 a/b/g/n/ac) + Bluetooth 5.0; Mini-PCIe supports LTE 4G modules * SUS201 brushed stainless steel housing, fanless, bracket mounting * Ultra-thin chassis 198.6 × 105.2 × 26mm, 1kg net weight, -20 ~ 70℃ operating range ==== 1.2 General Specifications ==== ^ Item ^ Specification ^ | **Product Name** | sBOX-R13 | | **CPU** | Rockchip RK3568 quad-core, 4 × Cortex-A55, up to 2.0GHz | | **GPU** | G52 GPU | | **NPU** | 1 TOPS (INT8) | | **Memory** | 2GB / 4GB | | **Storage** | Onboard 32GB eMMC | | **Ethernet** | 1 × 10/100/1000Mbps auto-negotiation | | **Wireless** | Onboard 2.4G/5G dual-band Wi-Fi, 802.11 a/b/g/n/ac + Bluetooth 5.0; 1 × Mini-PCIe for LTE 4G modules (optional) | | **USB** | 2 × USB2.0, 1 × USB3.0, 1 × USB3.0 (shared with OTG) | | **Audio** | 1 × SPK (8Ω 6W, PH2.0-4P), 1 × Ø3.5 Mic in | | **Serial** | 2 × RS485 (3.5mm pitch 3P terminal), 2 × RS232 (3.5mm pitch 3PIN), ttyS1 ~ ttyS4 | | **SIM** | 2 × Micro SIM slots (one at a time) | | **Indicator LEDs** | 1 × power LED (solid green), 1 × system LED (blinking blue) | | **Display Output** | 1 × HDMI, up to 4K (3840 × 2160) | | **Buttons** | 1 × Recover pinhole, 1 × Return | | **Operating System** | Android 11; Ubuntu 22.04 | | **Power Input** | DC 12V (±0.3V) with over-current and over-voltage protection; 5.5-2.1mm barrel jack | | **Power Consumption** | ≤ 20W | **Note:** Specifications are subject to change without notice. The data in this section corresponds to the sBOX-R13 datasheet v1.0 (2026-06-18). ==== 1.3 Structure and Cooling ==== ^ Item ^ Specification ^ | **Housing** | SUS201 brushed stainless steel | | **Cooling** | Fanless, fully enclosed; the one-piece sheet-metal top acts as the primary heat-spreading surface, with heat conducted from the mainboard through a thermal interface; louvred vent slots on both side walls | | **Mounting** | Bottom mounting bracket integrated with the base, bracket outline 198.6 × 114.5mm, hole pitch 80mm, corner radius R2.15 | | **Dimensions** | 198.6 × 105.2 × 26mm (excluding bracket) | | **Net Weight** | 1kg | | **Serviceability** | The one-piece sheet-metal top cover can be removed to service the mainboard, wireless module, SIM slots and terminals; front-panel fittings are fixed directly to the base | **Note:** The unit is cooled passively; leave at least 30mm of clearance above the top plate so airflow is not blocked, and do not cover the side vent slots. ==== 1.4 Environmental and Reliability ==== ^ Item ^ Value ^ | **Operating Temperature** | -20 ~ 70℃ | | **Storage Temperature** | -20 ~ 70℃ | | **Relative Humidity** | 5 ~ 95% @40℃ (non-condensing) | | **Vibration** | 1.5Grms, IEC 60068-2-64, random 5 ~ 500Hz, 1hr/axis (with SSD) | | **Shock** | 10G, IEC 60068-2-27, half-sine, 11ms duration (with SSD) | | **EMC** | CE / FCC Class A | ==== 1.5 Models and Configurations ==== ^ Part Number ^ Product Name ^ Description ^ | B13.SLR13.38.0001 | sBOX-R13-3568-2G-32G | Standard, RK3568, DC IN 12V, 2GB memory, 32GB eMMC, 1 × GLAN, onboard dual-band Wi-Fi, 1 × Mini-PCIe for LTE 4G, 2 × RS232 + 2 × RS485, 2 × USB3.0 + 2 × USB2.0, -20 ~ 70℃ | | B13.SLR13.38.0002 | sBOX-R13-3568-4G-32G | Standard, RK3568, DC IN 12V, 4GB memory, 32GB eMMC, otherwise identical | **Note:** The two models differ only in memory capacity; interfaces and structure are identical. 4G modules, Wi-Fi antennas and power adapters are optional, see 1.6. ==== 1.6 Optional Accessories ==== ^ Option ^ Description ^ | Power Adapter | 12V 3A adapter | | Wi-Fi Antenna | Rod antenna, 3M magnetic-mount antenna | | 3G/4G Module Kit | mini PCIe: EC20 / EG25 / EC25 | ===== 2 Interfaces and Dimensions ===== ==== 2.1 Exterior Views ==== The unit follows a "front-panel I/O + rear antennas and terminals + one-piece sheet-metal top" layout: the front panel groups power, LEDs, pinhole buttons, MIC, serial terminals, HDMI, Ethernet and USB; the rear carries the antenna jacks, dual SIM slots, RS485 / RS232 terminals, SPK and GPIO; both side walls have louvred vent slots and the base has mounting ears. ^ Front View ^ Perspective ^ | {{wiki:sbox_r13_front.jpg?400}} \\ Front: all external I/O on the front panel | {{wiki:sbox_r13_iso.jpg?400}} \\ Perspective: brushed stainless housing + mounting ears | ^ Rear View ^ Rear Perspective ^ | {{wiki:sbox_r13_rear.jpg?400}} \\ Rear: antenna jacks + dual SIM + terminals | {{wiki:sbox_r13_iso_rear.jpg?400}} \\ Perspective: louvred side vents | ==== 2.2 Interface Overview ==== The callouts below match the silkscreen on the unit; click the image for the full-size version. The number of antenna jacks depends on the 4G module configuration; unused positions ship with dust caps. {{wiki:sbox_r13_if_en.png?920}} **Front Panel (external I/O area)** ^ No. ^ Silkscreen ^ Interface ^ Qty ^ Remarks ^ | 1 | DC IN | Power input | 1 | 5.5-2.1mm barrel jack, DC 12V (±0.3V), over-current and over-voltage protected | | 2 | PWR | Power LED | 1 | Solid green once DC is applied | | 3 | SYS | System LED | 1 | Blinking blue while the system runs | | 4 | Recover | Recovery button | 1 | Pinhole; hold while powering on to enter Loader mode | | 5 | Return | Back button | 1 | Pinhole; mapped to the system back action | | 6 | Mic | Microphone input | 1 | Ø3.5 three-pole jack | | 7 | RS485&RS232 | Serial terminals | 1 set | 2 × 3.5mm pitch 3P pluggable terminal, RS485-1 (ttyS1) + RS232-1 (ttyS2), see 2.3.1 | | 8 | HDMI | Display output | 1 | Up to 4K (3840 × 2160) | | 9 | RJ45 | Ethernet | 1 | 10/100/1000Mbps auto-negotiation | | 10 | USB3.0 | USB3.0 | 1 | Blue, 5Gbps | | 11 | USB3.0/OTG | USB3.0 (OTG shared) | 1 | Blue; also serves as the flashing / ADB port | | 12 | USB2.0 | USB2.0 | 2 | Black, 480Mbps | **Rear (antenna and expansion area)** ^ No. ^ Silkscreen ^ Interface ^ Qty ^ Remarks ^ | 1 | Wi-Fi | Wi-Fi/Bluetooth antenna jack | 1 | SMA female, gold, for the 2.4G/5G antenna | | 2 | SIM1 / SIM2 | Micro SIM slots | 2 | One at a time, see 4.10 | | 3 | RS485 | RS485-2 | 1 | 3.5mm pitch 3P, A3 / B3 / G3, ttyS3 | | 4 | RS232 | RS232-2 | 1 | 3.5mm pitch 3PIN, R4 / T4 / G4, ttyS4 | | 5 | SPK | Speaker output | 1 | PH2.0-4P, 8Ω 6W, L+ / L- / R- / R+ | | 6 | GPIO | GPIO terminal | 1 | 16-pin, silkscreen numbered 1 ~ 16 | | 7 | 4G | 4G antenna jack | 1 | SMA female, gold, main antenna for the Mini-PCIe 4G module | **Note:** RS485 and RS232 each occupy one group on the front panel and one on the rear; the ttyS1 ~ ttyS4 numbers in the silkscreen are the Linux device node numbers, see 4.5 and 5.3. ==== 2.3 Interface Pin Definitions ==== === 2.3.1 RS485 / RS232 Terminals (3.5mm pitch 3P) === ^ Type ^ PIN 1 ^ PIN 2 ^ PIN 3 ^ Device Node ^ Location ^ | RS485-1 | A1 | B1 | G1 (GND) | /dev/ttyS1 | Front panel | | RS485-2 | A3 | B3 | G3 (GND) | /dev/ttyS3 | Rear | | RS232-1 | R2 (RXD) | T2 (TXD) | G2 (GND) | /dev/ttyS2 | Front panel | | RS232-2 | R4 (RXD) | T4 (TXD) | G4 (GND) | /dev/ttyS4 | Rear | **Note:** The terminals are 3.5mm pitch pluggable types. The actual port count follows the silkscreen on the unit; this table uses A1 B1 G1 / A3 B3 G3 / R2 T2 G2 / R4 T4 G4. RS485 is half-duplex, and swapping A / B will cause communication failure. === 2.3.2 SPK (PH2.0-4P, 8Ω 6W) === ^ PIN ^ Silkscreen ^ Definition ^ | 1 | L+ | Left channel + | | 2 | L- | Left channel - | | 3 | R- | Right channel - | | 4 | R+ | Right channel + | **Note:** For a single speaker, connect only R+ / R- (or L+ / L-), leaving the other pair unconnected. Reverse wiring will not damage the amplifier but causes phase cancellation and reduced volume. === 2.3.3 GPIO (16-pin Terminal) === The rear GPIO is a 16-pin terminal, silkscreen numbered 1 ~ 16 (1 / 2 at one end, 15 / 16 at the other). ^ Item ^ Description ^ | Pin Count | 16 (1 ~ 16) | | Level | 3.3V TTL | | Direction | Project-defined; all inputs by default in the factory firmware | | Access Method | Android: see 4.11; Linux: see 5.4 (sysfs) | | Pin Mapping | The mapping between terminal position and SoC GPIO number depends on the firmware configuration; refer to the bundled GPIO table or the SDK configuration provided by us | **Note:** GPIO pins connect directly to the SoC without isolation. Do not drive relays, solenoid valves or other inductive loads directly; use an external driver stage. ==== 2.4 Mechanical Dimensions ==== Chassis 198.6 × 105.2 × 26mm (excluding bracket); base mounting ears give an overall outline of 198.6 × 114.5mm, hole pitch 80mm, corner radius R2.15. Unit: mm. {{wiki:sbox_r13_dim_en.png?920}} ^ Item ^ Dimension ^ | **Chassis W × D × H** | 198.6 × 105.2 × 26.0mm (excluding bracket) | | **Mounting Ear Outline** | 198.6 × 114.5mm | | **Mounting Hole Pitch (vertical)** | 80.0mm | | **Hole Offset** | 12.6mm | | **Ear Corner Radius** | R2.15 | | **Net Weight** | 1kg | **Note:** Tighten all mounting-ear screws into the chassis so the unit is not carried by the bracket alone, and keep the top plate unobstructed since it is the heat-spreading surface. ===== 3 Quick Start ===== ==== 3.1 System Download ==== **Android System** * Android 11 firmware (with root access): contact Sales / Technical Support for the download link **Linux System** * Ubuntu 20.04 firmware (with Qt 5.12.8, GStreamer): contact Sales / Technical Support for the download link * Debian 11 firmware: provided separately per project requirements ==== 3.2 Flashing Tool Download ==== Both tools are official Rockchip releases, uploaded as attachments on this site; download links are at the end of each item: * **USB Driver**: After extraction, double-click DriverInstall.exe to complete the installation: {{wiki:driverassitant_v5.11.zip|DriverAssitant_v5.11 Driver Installation Package (9.4 MB)}} * **Flashing Tool**: After extraction, double-click RKDevTool.exe to launch the tool: {{wiki:rkdevtool_release_v3.32.zip|RKDevTool_Release_v3.32 Flashing Tool (5.5 MB)}} **Note:** If the driver is not installed successfully, an unknown device appears in Device Manager; reinstall the driver before flashing. ==== 3.3 System Flashing ==== Linux and Android use the same Rockchip tools for flashing; the unit requires no disassembly: connect via the **USB3.0 port** (lower row) and enter flashing mode via the **Recover pinhole**. **① Connect the USB3.0 Port** Take a USB3.0 male-to-male cable; connect one end to the blue **USB3.0** port in the lower row of the rear interface area and the other end to a PC USB port: {{wiki:burn_otg_v2.png?560}} **② Install the Rockchip USB Driver** Enter the driver package directory and double-click DriverInstall.exe: {{wiki:flash2.png?560}} When the "Rockchip Driver Assistant" dialog appears, click "Install Driver" and wait for the progress bar to complete: {{wiki:flash3.png?560}} **Note:** If the device is not recognized due to a driver error or after switching PCs, click "Uninstall Driver" in Driver Assistant first, then click "Install Driver" again. **③ Open the Flashing Tool** Extract the tool package and double-click RKDevTool.exe: {{wiki:flash4.png?560}} **④ Put the Unit into Loader Mode** Power off the unit first, hold the rear **Recover** hole with a pin without releasing, then connect DC 12V to power on, and release after about 2 seconds: {{wiki:burn_recover_v2.png?560}} **⑤ Confirm the Device Is Recognized** After entering Loader mode, check the status bar at the bottom of RKDevTool: **No Devices Found** means the unit is not recognized yet, while **Found One LOADER Device** means it is ready to flash: {{wiki:en_flash_select_firmware.png?560}} If "No Devices Found" keeps showing, go back to step ④ and re-enter, or change the USB port and data cable. **⑥ Select Firmware and Upgrade** Switch to the "Upgrade Firmware" tab, first click "Firmware" to select update.img, then click "Upgrade": {{wiki:en_flash_loader_found.png?560}} After flashing reaches 100%, the device reboots automatically; first boot takes about 30 ~ 60 seconds. **Note:** - If the device is not recognized when switching from Android to Linux (or vice versa), run "Enter Maskrom" in "Advanced Features" and re-flash - Do not cut power or unplug the cable during flashing; otherwise the unit may fail to boot and must be re-flashed after re-entering Loader ==== 3.4 Android System Upgrade ==== There are two upgrade paths; pick one according to site conditions: **local upgrade via USB drive** (offline, no network needed) and **OTA online update** (downloaded and installed by the preinstalled app once the unit is online). Both upgrade the full system image and reboot the unit automatically afterwards. ^ Path ^ Applies to ^ Prerequisites ^ Steps ^ | **Local upgrade via USB drive** | Android (Linux: see 5.10) | update.img + FAT32 USB drive | 3.4.3 | | **OTA online update** | Android | Unit online + preinstalled update app | 3.4.4 | === 3.4.1 Before You Start === - Confirm the firmware matches the unit model and SoC (naming rules in 1.3) - Back up on-site data: the upgrade rewrites the system partition, so apps and settings may be reset - Keep the power supply stable; **never cut power or unplug** during the upgrade - The first boot after upgrading takes about 30 ~ 60 s, which is normal === 3.4.2 Prepare update.img === Choose one of the two firmware sources: - Obtain a ready-made update.img from SmartInc (see 3.1 for how to get it) - Build it yourself with the SDK: run a full build in the SDK root directory to generate the rockdev/Image-xxx/ directory, then run ./mkupdate.sh (or make otapackage) # Build the full image ./build.sh updateimg ls -lh rockdev/update.img USB drive requirements: FAT32 format, available capacity ≥ 4GB (≤ 32GB recommended), place update.img in the root directory with the filename unchanged. === 3.4.3 Local Upgrade via USB Drive === - Copy update.img to the root directory of the USB drive - Insert the USB drive into a USB port on the unit (either USB3.0 / USB2.0 port works) - After the system detects the update package, confirm as prompted in the pop-up; keep the power supply on during the update, and the unit reboots automatically when done **Note:** If no upgrade prompt appears after inserting the USB drive, first check the filename and USB drive format, then reboot the unit and retry; for online update see 3.4.4. === 3.4.4 OTA Update (Android) === OTA update on Android is performed by the preinstalled **update** app; the unit must be connected to the Internet first. - Open the app list and find "update" - Tap "UPDATE NOW" and follow the prompts to download and install - Keep the power supply and network connected during the update; the unit reboots automatically when done The update icon in the app list: {{wiki:ota_app_drawer.jpg?560}} SmartInc OTA update interface: {{wiki:ota_updater.png?560}} **Note:** This section covers Android online OTA update; for offline USB drive upgrade see 3.4.3; for Linux OTA update see 5.10. ===== 4 Android System Usage ===== This chapter **applies only to the Android system** (Android 11). Equivalent functions under Linux (Ubuntu / Debian) are grouped in Chapter 5; interfaces, tools and commands are not mixed between the two chapters; Android application-layer API calls are all documented in 4.12. ==== 4.1 Enable ADB Debugging ==== === 4.1.1 USB ADB Usage === - Use a USB data cable to connect the **USB3.0 port** of the unit (blue port on the lower row) to the PC - Under "Settings → About tablet", tap "Build number" 7 times consecutively to enable Developer options - Enter "Settings → System → Advanced → Developer options" and enable "USB debugging" - On the PC, run adb devices; on first connection, tap "Allow" in the pop-up on the unit adb devices # List of devices attached # 0123456789ABCDEF device === 4.1.2 Network ADB Usage === When the unit and PC are on the same network segment, debug wirelessly without a data cable. adb connect 192.168.8.55:5555 adb devices ==== 4.2 WiFi Usage ==== - Go to "Settings → Network & Internet → WLAN" and turn on the switch - Select the target hotspot and enter the password (onboard 2.4G/5G dual-band, 802.11 a/b/g/n/ac) - After connecting, check the IP address in "Network details" - If the signal is weak, adjust the angle of the rear **Wi-Fi/BT** SMA antenna, or use a suction-cup antenna instead adb shell dumpsys wifi | grep -i "curState" adb shell ifconfig wlan0 ==== 4.3 Ethernet Usage ==== The unit has a single network port (LAN, Gigabit auto-negotiation); under Android the device name is **eth0**. All commands below run in adb shell; changing settings requires su privileges. **View Device** ip link show **Usage (Dynamic IP)** su ifconfig eth0 up ifconfig eth0 dhcp # Some firmware requires dhcpcd eth0 instead **Usage (Static IP)** su ifconfig eth0 down ifconfig eth0 192.168.8.55 netmask 255.255.255.0 ifconfig eth0 up **Test** ping -c 4 192.168.8.1 **Note:** To make a static IP take effect automatically at boot, configure a static eth0 address in the system, or set the Ethernet static IP via ConnectivityManager at the application layer. ==== 4.4 4G Module Usage ==== 4G is an **optional feature**: an LTE module is fitted in the Mini-PCIe slot and dials automatically after power-on, with no manual configuration. === 4.4.1 Support List === The standard unit ships without a 4G module; the models below are available as options. The USB ID is used to confirm in the lsusb output that the module has been recognised: ^ Model ^ Standard ^ Form Factor ^ USB ID ^ | Quectel EC20 | LTE 4G | Mini-PCIe | 2c7c:0125 | | Quectel EG25-G | LTE 4G | Mini-PCIe | 2c7c:0125 | | Quectel EC25 | LTE 4G | Mini-PCIe | 2c7c:0125 | === 4.4.2 Steps === **Install and verify** - Power off, remove the top cover, seat the Mini-PCIe 4G module and tighten its screw, then connect the module antenna (main antenna to the rear 4G jack) - Insert the SIM card with the notch facing out and the contacts facing the board; the two slots are used one at a time, see 4.10 - After power-on, confirm the SIM is recognised under "Settings → Network & internet → Mobile network" - Enable mobile data; a 4G icon in the status bar means the link is up adb shell lsusb # Bus 002 Device 002: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 **Check signal and network registration (AT commands)** The module AT port is usually /dev/ttyUSB2 and requires root: echo -e "AT+CPIN?\r\n" > /dev/ttyUSB2 # Is the SIM seated echo -e "AT+CSQ\r\n" > /dev/ttyUSB2 # Signal strength, 0~99 is normal echo -e "AT+COPS?\r\n" > /dev/ttyUSB2 # Registered on the operator network echo -e "AT+CGREG?\r\n" > /dev/ttyUSB2 # Packet data ready **Note:** Insert or remove the SIM card only with the power **off**; hot-plugging may leave the module unrecognised until the next power cycle. If the 4G antenna is not connected or is on the wrong jack, signal strength still reads normally but no data connection is established. ==== 4.5 Serial Port Usage ==== The unit provides 2 × RS485 and 2 × RS232; Android node and terminal definitions are as follows (the rear silkscreen label takes precedence): ^ Interface ^ Device Node ^ Pin Definition ^ | RS485-1 | /dev/ttyS1 | A1 / B1 / G1 | | RS485-2 | /dev/ttyS3 | A3 / B3 / G3 | | RS232-1 | /dev/ttyS2 | R2 / T2 / G2 | | RS232-2 | /dev/ttyS4 | R4 / T4 / G4 | === 4.5.1 Test Tool ComAssistant === Serial port testing under Android uses **ComAssistant** (a serial assistant app) throughout: - Install and open ComAssistant; on first run, grant storage and serial port device permissions - Select the target node in the device list: RS485 uses /dev/ttyS1 or /dev/ttyS3; RS232 uses /dev/ttyS2 or /dev/ttyS4 - Set the parameters to 115200, 8 data bits, 1 stop bit, no parity (8N1) - Tap "Open serial port", enter content in the send area and tap "Send"; during loopback or mutual transmission, observe the receive area at the same time **Note:** ComAssistant requires Root privileges to access /dev/ttyS*; if opening fails, first run su and ls -l /dev/ttyS* in adb shell to check node permissions. === 4.5.2 Test Method === - RS232 loopback: short R and T of the same 232 node with a jumper cap - RS232 — RS232 mutual transmission: cross wiring (R↔T, common GND) - RS232 — RS485 mutual transmission: via a 232-to-485 converter module - RS232 — RS232-to-USB — serial port assistant on the PC - RS485 — RS485-to-USB — serial port assistant on the PC **Precautions** - The unit has a 2.5mm 3P pluggable terminal (no DB9); use a crimp terminal or adapter cable. Adapter cable pinouts may differ between manufacturers; reversing A / B or R / T directly causes communication failure - RS485 is half-duplex; direction is switched automatically by hardware, so observe the frame interval when switching between transmit and receive === 4.5.3 Application-Layer Calls === Do not open nodes directly via shell in the app; use the NodkaAPI uart_ interface (see 4.12.5): NodkaAPI api = NodkaAPI.nodkaAPICreate(context); api.uart_open("/dev/ttyS2", 115200); api.uart_send("/dev/ttyS2", "hello".getBytes()); api.uart_receive("/dev/ttyS2", new UartReceiveDataCallback() { @Override public void onReceiveData(byte[] data) { // Process the received data } }); api.uart_close("/dev/ttyS2"); ==== 4.6 USB Storage and File Transfer ==== The unit provides 2 × USB3.0 (one shared with OTG, supporting Device mode) and 2 × USB2.0. **USB Drive** - Insert the USB drive; "USB storage device" appears on the left side of the file manager - If you can browse the USB drive contents after opening it, the drive is recognized correctly - Before unplugging, unmount it in "Settings → Storage" to avoid data corruption adb shell ls /storage # Mount points such as udisk0 or 91A3-2B1C are visible adb shell lsusb **Note:** The USB3.0/OTG port in Device mode (flashing / ADB) cannot act as Host at the same time; before inserting a USB drive, confirm the system has exited flashing mode. For manual mounting under Linux see 5.5. ==== 4.7 Audio Test ==== Unit audio is output via **SPK (PH2.0-4P, 8Ω 6W)** and input via **MIC (Ø3.5)**; connect an external speaker when no built-in speaker is present. **Speaker Output Test** - Connect an 8Ω speaker to the SPK terminal (L+ / L- / R+ / R-) **Microphone Recording Test** - Insert a Ø3.5 microphone or use the onboard MIC - Open the built-in "Recorder" app, record about 5 seconds and play it back to confirm the audio is clear with no noise **View Audio Path** adb shell dumpsys media.audio_flinger | grep -i "Output thread" adb shell getprop | grep -i audio **Note:** If there is no sound, first confirm the SPK terminals L+ / L- / R+ / R- match the speaker wire sequence, then use adb shell tinymix to check whether the amplifier path is open. Under Linux, use aplay / arecord (see 5.1). ==== 4.8 HDMI and Dual Display ==== The unit supports simultaneous output to the internal screen + HDMI, up to 3840 × 2160 on HDMI. **Set HDMI Output** - Connect an HDMI monitor and go to "Settings → Display → HDMI" - Select the resolution and refresh rate (1920 × 1080 @ 60Hz recommended) and confirm the image is stable with no flicker - Select the display mode: Mirror (Clone) or Extended (Expand) ^ Mode ^ Description ^ | Mirror (Clone) | The internal screen and HDMI show the same image, with the lower resolution of the two | | Extended (Expand) | The two screens show independent images; the app must specify DisplayId | **View via Command Line** adb shell wm size adb shell wm density adb shell dumpsys display | grep -i "mDisplayId" **Note:** In the app, use interfaces such as display_setScreenRotation / display_setScreenBrightness to control the display (see 4.12.3). Under Linux, use xrandr or weston.ini (see 5.6). ==== 4.9 Button and Indicator LED Test ==== ^ Item ^ Location ^ Phenomenon / Action ^ Verdict ^ | PWR Indicator LED | Right of the DC jack on the front panel | Solid green after DC 12V is connected | LED on indicates normal power supply | | SYS Indicator LED | Right of PWR | Blinking blue after system boot completes | Blinking LED indicates the system is running | | Recover | Pinhole right of the DC jack | Hold with power off + release 2 seconds after power-on | RKDevTool detects the LOADER device | | Return | Pinhole right of Recover | Press once while the system is running | Triggers the system back action, equivalent to the Android back key | **Recover Quick Self-Test** Hold the Recover pinhole with power off, then power on; a LOADER device appearing in RKDevTool indicates normal operation (see 3.3 for flashing steps). **Note:** Both Recover and Return are pinhole structures; use a needle with diameter ≤ 1.5mm to avoid damaging the internal tact switch. Return only works once the system is running — holding it during power-on has no effect. ==== 4.10 Dual SIM Usage ==== The rear panel provides **two Micro SIM slots (SIM1 / SIM2)** for two operator SIM cards. The slots are used **one at a time**: the system recognises only one card, and simultaneous dual-SIM operation is not supported. **Inserting a card** - With the power off, insert following the silkscreen: notch facing out, contacts facing the board, until a slight click is felt - Both slots accept standard Micro SIM (3FF); Nano SIM requires an adapter - After power-on, check the recognised slot and operator under "Settings → About device → SIM status" **Checking the active slot** adb shell getprop | grep -i "gsm.sim" # Current SIM state adb shell dumpsys telephony.registry | grep -i "mServiceState" **Note:** SIM cards must be inserted or removed with the power **off**. With both slots populated, the system uses one according to the priority set in the factory firmware; to switch, power off and keep only the target card. The slots are push-in types — do not probe them with tweezers or sharp objects, which can damage the contacts. ==== 4.11 GPIO Usage ==== The unit's GPIO is **an optional breakout** (rear GPIO socket / internal pin header). For the odd/even pin orientation of the 16-pin terminal, system GPIO numbers and terminal mapping, see **2.3**; these details are not repeated in this section. Android apps operate via the NodkaAPI gpio_ interface without shell (see 4.12.4): NodkaAPI api = NodkaAPI.nodkaAPICreate(context); api.gpio_export(95); // Export the pin api.gpio_direction(95, "out"); // Set as output api.gpio_write(95, 1); // Output high level int v = api.gpio_read(95); // Read back the level api.gpio_unExport(95); // Unexport the pin **Note:** GPIO numbers are global kernel gpiochip numbers and may shift as a whole across firmware versions; run gpio_export first on unexported pins before operating. For Linux command-line (/sys/class/gpio) operations see 5.4. ==== 4.12 API Reference and Usage ==== For Android app development, hardware and system capabilities are wrapped as Java interfaces, so apps need not directly read/write /dev and /sys nodes. The Linux side does not provide this set of interfaces; use the command-line approach in Chapter 5. **Interface Source Package Download** {{wiki:androidapi1.5.zip|AndroidAPI 1.5 Interface Source Package (18.7 MB)}} The package contains AndroidAPI.jar, libandroid-jni.so, AndroidAPI-sources.jar, Javadoc documentation, the AndroidAPIDemo sample project and APK, the platform.jks signing file and readme.txt. Serial port, GPIO and system control interfaces require system signature or Root privileges. === 4.12.1 Usage Instructions === **Interface Categories** ^ Prefix ^ Category ^ Description ^ | devinfo_ | Hardware and system information query | System version, CPU, memory, storage, SN, etc. | | display_ | Display control | Brightness, rotation, resolution, navigation bar and status bar | | gpio_ | GPIO control | Export, direction, read/write level | | uart_ | Serial port control | Open, send/receive, close serial port | | sysctrl_ | System control | Scheduled power on/off, immediate reboot, silent install | **1. Create the instance in Application's onCreate** public class APIApplication extends Application { private NodkaAPI mNodkaAPI; @Override public void onCreate() { super.onCreate(); mNodkaAPI = NodkaAPI.nodkaAPICreate(this); } public NodkaAPI getNodkaAPI() { return mNodkaAPI; } } **2. Retrieve it in an Activity or Fragment** private NodkaAPI mNodkaAPI = APIApplication.getApplication().getNodkaAPI(); **Note:** Set android:name to APIApplication in AndroidManifest.xml; serial port, GPIO and system control interfaces require system signature or Root privileges. === 4.12.2 Hardware and System Information Query === ^ Method Name ^ Method Description ^ | devinfo_getAndroidVersion() | Get Android system version information | | devinfo_getAvailMem() | Get available memory capacity | | devinfo_getBuildNumber() | Get system build number information | | devinfo_getCpuCores() | Get CPU core count | | devinfo_getCPUCurFreqKHz() | Get current CPU frequency | | devinfo_getCPUMaxFreqKHz() | Get maximum CPU frequency | | devinfo_getCPUMinFreqKHz() | Get minimum CPU frequency | | devinfo_getCPUTemp() | Get CPU temperature | | devinfo_getDeviceModel() | Get device model information | | devinfo_getKernelVersion() | Get kernel version information | | devinfo_getSerialNum() | Get device SN | | devinfo_getStorageAvailableSize() | Get available local storage capacity | | devinfo_getStorageTotalSize() | Get local storage capacity (excluding system partition) | | devinfo_getTotalMem() | Get total memory capacity | === 4.12.3 Display Control (display_) === ^ Method Name ^ Method Description ^ | display_getNavBar() | Get whether the navigation bar and status bar are shown | | display_getScreenBrightness() | Get screen brightness | | display_getScreenRotation() | Get screen rotation direction | | display_getWindowHeight() | Get screen resolution height | | display_getWindowWidth() | Get screen resolution width | | display_setNavBar(Boolean enable) | Set whether to show the navigation bar and status bar | | display_setNavBarSlideShow(Boolean enable) | Set whether to show the navigation bar and status bar when sliding | | display_setScreenBrightness(int screenBrightness) | Set screen brightness | | display_setScreenRotation(int rotation) | Set screen rotation direction | === 4.12.4 GPIO Control (gpio_) === ^ Method Name ^ Method Description ^ | gpio_direction(int gpioNumber, String direction) | Set the direction of the specified GPIO (input / output) | | gpio_export(int gpioNumber) | Export the specified GPIO pin | | gpio_read(int gpioNumber) | Read the level of the specified GPIO | | gpio_unExport(int gpioNumber) | Unexport the specified GPIO pin | | gpio_write(int gpioNumber, int value) | Set the output level of the specified GPIO | See 4.11 for pin numbers. === 4.12.5 Serial Port Control (uart_) === ^ Method Name ^ Method Description ^ | uart_close(String uartNode) | Close the uart device, e.g. /dev/ttyS2 | | uart_getAvailableDevices() | Get available UART device nodes (returns a List) | | uart_IsOpen(String uartNode) | Check whether the uart device is open | | uart_open(String uartNode, int baudrate) | Open the uart device and set the baud rate | | uart_receive(String uartNode, UartReceiveDataCallback callback) | Receive serial port data, returned via data callback | | uart_send(String uartNode, byte[] buffer) | Send serial port data | | uart_stopReceive(String uartNode) | Stop receiving data; no more callbacks after this call | See 4.5 for nodes and test methods. === 4.12.6 System Control (sysctrl_) === ^ Method Name ^ Method Description ^ | sysctrl_cancelReboot() | Cancel device reboot | | sysctrl_cancelShutdown() | Cancel scheduled shutdown | | sysctrl_powerOn(String time, boolean repeat) | Set the device power-on time | | sysctrl_reboot(String time, boolean repeat) | Set the device reboot time | | sysctrl_rebootNow() | Reboot the device immediately | | sysctrl_shutdown(String time, boolean repeat) | Set the device shutdown time | | sysctrl_shutdownNow() | Shut down immediately | | sysctrl_installApk(String apkPath) | Silently install an application | ===== 5 Linux System Usage ===== This chapter **applies only to Linux systems** (Ubuntu 20.04 / Debian 11, Buildroot for some projects). For the corresponding functions on Android, see Chapter 4. Except for **5.11 Cross-compilation** and **5.12.1 Docker Compilation**, which run on the **development host**, all commands in this chapter are executed in the on-board terminal or via SSH. The criteria for buttons, indicator LEDs and the touch screen are the same as in Chapter 4 (see 4.9, 4.10) and are not repeated here. Sections from 5.8 onward are system customization items commonly used for factory projects. ==== 5.1 Sound Card Usage ==== aplay -l # List sound cards and devices aplay /nodka_test/LR_audio.wav -D hw:0,0 # Play via the specified sound card device arecord -d 5 -f cd -r 44100 -c 2 -t wav test.wav aplay test.wav Volume adjustment: alsamixer amixer -c 0 set 'Playback' 80% **Note:** Unit playback outputs from the SPK terminal (PH2.0-4P); connect an external 8Ω speaker. MIC uses the Ø3.5 interface. ==== 5.2 Network Usage ==== === 5.2.1 Ethernet === **View network ports** ifconfig -a ip link show **Set a static IP via command line** 1. Open the network configuration file with vim: vim /etc/network/interfaces 2. Modify the IP, netmask and gateway according to the on-site network (the unit has a single network port; configure only eth0) auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.2.110 netmask 255.255.255.0 gateway 192.168.2.1 3. Save and exit (press Esc in vim, type :wq), then reboot the system for the configuration to take effect. **Note:** On Ubuntu 20.04, NetworkManager manages the network by default, so the configuration in /etc/network/interfaces may not take effect; in this case use the nmcli method in 5.2.2, or disable NetworkManager first and then use the method in this section. **Set DNS** vi /etc/resolv.conf nameserver 114.114.114.114 **Network priority** # Temporary change; the smaller the value, the higher the priority sudo ifmetric eth0 100 # Permanent modification sudo nmcli connection modify "Wired connection name" connection.autoconnect-priority 1 sudo nmcli connection modify "Wired connection name" ipv4.route-metric 100 sudo nmcli connection modify "Wired connection name" connection.autoconnect yes sudo systemctl restart NetworkManager **Verification** ping -c 4 192.168.2.1 ping -c 4 www.baidu.com **Note:** In the graphical interface (Debian desktop), set the IP, netmask and gateway directly in "About NetworkManager Applet → Edit Connections…"; when no existing connection is available, click + in the bottom right to create one. === 5.2.2 WiFi === **Query and enable the wireless NIC** ifconfig -a # Wireless NIC is usually wlan0 ifconfig wlan0 up # Enable the wireless NIC iw dev wlan0 scan # Scan for hotspots to get SSID, signal strength, and encryption method **Connect to a wireless network** nmcli d wifi connect "SSID" password "PASSWORD" **Static IP** sudo nmcli connection modify NODKA ipv4.addresses 172.10.21.111/24 # IP / subnet mask sudo nmcli connection modify NODKA ipv4.gateway 172.10.21.1 # Gateway sudo nmcli connection modify NODKA ipv4.dns "114.114.114.114,61.177.7.1,8.8.8.8" # DNS sudo nmcli connection modify NODKA ipv4.method manual # Static sudo nmcli device disconnect wlan0 sudo nmcli device connect wlan0 **Dynamic IP (DHCP)** sudo nmcli connection modify NODKA ipv4.method auto sudo nmcli connection modify NODKA ipv4.addresses "" # Clear the static IP sudo nmcli connection modify NODKA ipv4.gateway "" # Clear the gateway sudo nmcli connection modify NODKA ipv4.dns "" # Clear DNS (optional) sudo nmcli connection down NODKA sudo nmcli connection up NODKA **Configure as an AP hotspot** IFNAME="wlan0" # Wireless NIC node CON_NAME="One" # Hotspot name nmcli con add type wifi ifname $IFNAME con-name $CON_NAME autoconnect yes ssid $CON_NAME nmcli con modify $CON_NAME 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared nmcli con up $CON_NAME **Note:** If the signal is weak, adjust the angle of the rear Wi-Fi/BT antenna or use a suction-cup antenna instead; after connecting, use ip addr show wlan0 to view the assigned address. ==== 5.3 Serial Port Usage (Linux) ==== On Linux, the serial port nodes are the same as on Android: RS485 is /dev/ttyS1 or /dev/ttyS3; RS232 is /dev/ttyS2 or /dev/ttyS4 (refer to the rear silkscreen label). **Test tools** - GUI: CuteCom (sudo apt install cutecom); select /dev/ttyS2, 115200, 8N1, then open - Command line: built-in com_send / com_recv # Send com_send /dev/ttyS2 115200 # Receive (open another terminal) com_recv /dev/ttyS2 115200 **Read/write nodes directly** stty -F /dev/ttyS2 115200 cs8 -cstopb -parenb echo "hello" > /dev/ttyS2 # Send cat /dev/ttyS2 # Receive **Test method** For loopback, peer-to-peer and adapter wiring, see **4.5.2**; these are OS-independent and are not repeated in this section. **Precautions** - The unit uses a 2.5mm 3P pluggable terminal (no DB9); use with crimp terminals or an adapter cable; reversing the wire order (A / B, R / T) will directly cause communication failure - RS485 is half-duplex; direction is switched automatically by hardware, so observe the frame interval when switching between transmit and receive - If permission is denied, add the current user to the dialout group: sudo usermod -aG dialout $USER (takes effect after re-login) ==== 5.4 GPIO Usage (sysfs) ==== On Linux, access is unified through /sys/class/gpio. For terminal pin assignment rules and system GPIO numbers, see **2.3**; this section only provides the operation commands. **1. Check whether the relevant IO is exported** cd /sys/class/gpio ls **2. Configure GPO (system configuration)** for i in {95,94,21,22,140,141}; do echo out >gpio$i/direction; done for i in {13,14,96,93,108,107}; do echo out >gpio$i/direction; done **3. Set GPO high / low** Output high level: for i in {95,94,21,22,140,141}; do echo 1 >gpio$i/value; done for i in {13,14,96,93,108,107}; do echo 1 >gpio$i/value; done Read back the current level: for i in {95,94,21,22,140,141}; do cat /sys/class/gpio/gpio$i/value; done Output low level: for i in {95,94,21,22,140,141}; do echo 0 >gpio$i/value; done for i in {13,14,96,93,108,107}; do echo 0 >gpio$i/value; done **4. Configure GPI (system configuration)** for i in {13,14,96,93,108,107}; do echo in >gpio$i/direction; done **5. Get GPI value** for i in {13,14,96,93,108,107}; do cat /sys/class/gpio/gpio$i/value; done for i in {95,94,21,22,140,141,13,14,96,93,108,107}; do cat /sys/class/gpio/gpio$i/direction; done **Note:** GPIO numbers follow the kernel's global gpiochip numbering and may shift as a whole across firmware versions; if the corresponding node does not exist under /sys/class/gpio, first run echo NUMBER > /sys/class/gpio/export to export it, then proceed. ==== 5.5 USB and SD Card Mounting ==== **USB drive detection** dmesg | tail -20 # After insertion, kernel messages show the device name sda / sda1 lsblk # List block devices and mount points **Mount and unmount** mkdir -p /mnt/USB1 mount /dev/sda1 /mnt/USB1 df -h umount /mnt/USB1 **SD Card** fdisk -l # SD card device name is usually /dev/mmcblk1p1 mount /dev/mmcblk1p1 /mnt/sdcard umount /mnt/sdcard **Note:** ext4 / vfat can be mounted directly; NTFS requires ntfs-3g, exFAT requires exfat-fuse. See 4.6 for how to view the drives on Android. ==== 5.6 Resolution and HDMI ==== The internal screen resolution is fixed by the model (see 1.3 Model and Configuration); HDMI external output can be adjusted with xrandr. **X11 desktop** xrandr # List outputs and available modes xrandr --output HDMI-1 --mode 1920x1080 --rate 60 xrandr -o left # Rotate left 90° xrandr -o right # Rotate right 90° xrandr -o inverted # Flip 180° xrandr -o normal # Restore **Temporarily add a custom resolution** cvt 800 750 # 800x750 59.86 Hz (CVT) ... Modeline "800x750_60.00" 48.50 800 840 920 1040 750 753 763 779 -hsync +vsync xrandr --newmode "800x750_60.00" 48.50 800 840 920 1040 750 753 763 779 -hsync +vsync xrandr --addmode HDMI-1 800x750_60.00 xrandr --output HDMI-1 --mode 800x750_60.00 **Wayland / Weston (when using a Wayland session)** Ubuntu 20.04 uses Xorg by default, so the xrandr method applies; if you switch to a Wayland session, xrandr is not supported under Wayland — edit /etc/xdg/weston/weston.ini: [output] name=HDMI-A-1 mode=1920x1080 Reboot the system or restart the weston service for the changes to take effect. **Dual display mode** For the definitions of the clone (mirror) and extended modes, see **4.8**. On Linux, use the desktop display settings or xrandr to control the on/off and position of the two outputs. ==== 5.7 Remote Access and File Transfer ==== sudo apt update && sudo apt install -y openssh-server sudo systemctl enable --now ssh ip addr show Transfer from a PC: scp ./update.img root@192.168.8.55:/home/root/ Graphical tools: WinSCP / FileZilla, protocol SFTP, port 22. ==== 5.8 Auto-run Programs at Boot ==== There are three methods, grouped by startup timing; choose as needed, and the methods can be combined: **before login → at login → after entering the graphical interface**. Place the same program in only one of them. === 5.8.1 Execute Before Login === Suitable for background services that do not depend on the desktop and must run at boot. - Edit the /etc/rc.local file - Add the program call before exit 0 - Save and exit (press Esc, type :wq and press Enter) sudo vim /etc/rc.local # Add before exit 0 /path/to/myprogram & exit 0 **Note:** /path/to/myprogram is the full program path; the trailing & runs the program in the background; otherwise, it blocks the subsequent login process. The last line of the file must be exit 0 for the script to be executed. **Note:** Ubuntu 20.04 does not enable /etc/rc.local by default; make sure rc-local.service is enabled. For systemd-only setups, use a custom service or the startup script in 5.8.3 instead. === 5.8.2 Execute After Login === It applies only to the current user and runs once the user has logged in. - Edit the user profile file ~/.profile - Append the startup command at the end of the file - Save and exit - Run source ~/.profile to apply the changes immediately vim ~/.profile # Append at the end of the file /path/to/myprogram & source ~/.profile **Note:** ~/.profile applies only to the current user; to apply to all users, use /etc/profile instead. === 5.8.3 Execute After Entering the Graphical Interface === Use this for applications that need to display a UI only after the desktop is up (e.g. a full-screen main program). **Debian (LXDE)** - Edit the autostart file - Append the startup command at the end - Save and exit; reboot or re-login for the changes to take effect vim /root/.config/lxsession/LXDE/autostart # Append at the end /path/to/myprogram > /dev/null 2>&1 & **Ubuntu** On Ubuntu, this is handled uniformly by a startup script; write the command into /nodka_test/autorun.sh (this script runs automatically after the desktop starts). sudo vim /nodka_test/autorun.sh # Append at the end /path/to/myprogram > /dev/null 2>&1 & **Note:** > /dev/null 2>&1 discards program output to avoid filling the partition with logs; & ensures background execution. ==== 5.9 UI and Display Customization ==== === 5.9.1 Status Bar Customization === The LXDE panel (taskbar / menu bar) configuration is stored in: $HOME/.config/lxpanel/LXDE/panels/panel Open it with a text editor to add/remove plugins and adjust position and size; after editing, run lxpanelctl restart or log in again for the changes to take effect. === 5.9.2 Disable the Desktop Environment === Default contents of the desktop autostart file /root/.config/lxsession/LXDE/autostart: @lxpanel --profile LXDE @pcmanfm --desktop --profile LXDE @xscreensaver -no-splash pulseaudio -D /nodka_test/autorun.sh ^ Line ^ Function ^ | @lxpanel --profile LXDE | Start the LXDE panel (taskbar and menu) | | @pcmanfm --desktop --profile LXDE | Let PCManFM manage the desktop, handling wallpaper and icons | | @xscreensaver -no-splash | Screen saver | | pulseaudio -D | Start the audio service | | /nodka_test/autorun.sh | Autostart script executed after the desktop is up | To disable the desktop and show only the application UI, simply comment out the first three lines: #@lxpanel --profile LXDE #@pcmanfm --desktop --profile LXDE #@xscreensaver -no-splash pulseaudio -D /nodka_test/autorun.sh **Note:** After commenting out the panel and PCManFM, the desktop has no taskbar and no wallpaper icons, showing only the autostart program window; this is suitable for units shipped with a full-screen application. === 5.9.3 Replace the Boot LOGO === The boot LOGO is stored in the resource partition. Execute steps ① ~ ⑥ in order in the Linux terminal on the unit (root privileges required): for steps requiring commands, the description corresponds to the code block immediately following; see the table below for the file location in step ④. **① Prepare the BMP image** Prepare a BMP image and set its size to the screen resolution (e.g. HDMI 1920×1080). **② Copy the bmpconvert tool and grant execute permission** {{wiki:bmpconvert.zip|Download the bmpconvert conversion tool (2.3 KB, unzip to get the script)}}. Then unzip the tool and copy it to /usr/bin: sudo cp bmpconvert /usr/bin/ sudo chmod +x /usr/bin/bmpconvert **③ Mount the resource partition** sudo mount /dev/block/by-name/resource /mnt **④ Place the boot LOGO file** Place the BMP image into /mnt with the file name corresponding to the screen type: ^ Screen Type ^ File Location ^ | HDMI / eDP / LVDS | /mnt/logo.bmp, /mnt/logo_kernel.bmp | | MIPI | /mnt/logo_mipi.bmp, /mnt/logo_kernel_mipi.bmp | **⑤ Convert Images with bmpconvert** For HDMI / eDP / LVDS screens, run: sudo bmpconvert /mnt/logo.bmp sudo bmpconvert /mnt/logo_kernel.bmp For MIPI screens, use the corresponding file name instead: sudo bmpconvert /mnt/logo_mipi.bmp sudo bmpconvert /mnt/logo_kernel_mipi.bmp **Error handling:** If step ⑤ produces the following output, the system only has python3 and lacks the python command: root@rk3568: bmpconvert /mnt/logo.bmp /usr/bin/env: 'python': No such file or directory root@rk3568: bmpconvert /mnt/logo_kernel.bmp /usr/bin/env: 'python': No such file or directory Create the python symlink first, then rerun the two commands in step ⑤: sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 sudo bmpconvert /mnt/logo.bmp sudo bmpconvert /mnt/logo_kernel.bmp **⑥ Reboot the system** sudo reboot **Note:** logo.bmp is displayed during the U-Boot stage and logo_kernel.bmp during the kernel boot stage; replace both. Back up the original files under /mnt before making changes. === 5.9.4 Switching Between Different LCD Displays === **HDMI**: Supported by default; default output 1920×1080, no configuration needed. **eDP / LVDS**: The display parameters must match the panel. Run dis in the terminal to open the display settings interface, select the matching parameters and click Save; reboot to apply. dis {{wiki:cm_lcd_sml.png?620}} Display Settings interface: Select parameters matching the panel and click Save. === 5.9.5 Screen Rotation === **Debian: Modify the Xorg Configuration** - First use xrandr to check the screen node name (e.g. eDP-1, HDMI-1) - Edit /etc/X11/xorg.conf.d/20-modesetting.conf - Change the Option "Rotate" value and reboot Section "Monitor" Identifier "eDP-1" # Screen node name, query with xrandr Option "Rotate" "inverted" # Rotation direction, see the table below EndSection ^ Value ^ Rotation Angle ^ | normal | 0° (default) | | right | 90° clockwise | | inverted | 180° clockwise | | left | 270° clockwise | **Ubuntu: Use xrandr** xrandr --output HDMI-1 --rotate left # Rotate left 90° xrandr --output HDMI-1 --rotate right # Rotate right 90° xrandr --output HDMI-1 --rotate inverted # Rotate 180° xrandr --output HDMI-1 --rotate normal # Restore default **Note:** Add the rotation command to the end of /nodka_test/autorun.sh to apply it automatically at boot. **Touch Rotation** After screen rotation, touch coordinates will be misaligned; modify CalibrationMatrix in /usr/share/X11/xorg.conf.d/40-libinput.conf accordingly: Section "InputClass" Identifier "libinput touchscreen catchall" Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "libinput" EndSection ^ Screen Orientation ^ CalibrationMatrix ^ | 0° (default) | 1 0 0 0 1 0 0 0 1 | | 90° (clockwise) | 0 1 0 -1 0 1 0 0 1 | | 180° (upside down) | -1 0 1 0 -1 1 0 0 1 | | 270° (90° counterclockwise) | 0 -1 1 1 0 0 0 0 1 | ==== 5.10 OTA Firmware Update ==== === 5.10.1 OTA over Network === The upgrade is performed by the on-board /usr/bin/ota script. Edit the script as needed, set the FTP address and account, place the corresponding firmware at the FTP download location, then run ota. The files to modify and the corresponding code are as follows. **① Edit the upgrade script /usr/bin/ota** sudo vim /usr/bin/ota **② Set the following three items in the script** URL=ftp:// USERNAME= PASSWORD= **③ Save and run the upgrade** ota Follow the prompts to complete the upgrade. **Note:** The server address, account and firmware directory are provided by us; do not power off during the upgrade; the device reboots automatically when complete. === 5.10.2 OTA Update via USB Drive === Under Linux, the on-board /usr/bin/ota script performs the OTA update, with the USB drive as temporary firmware storage. Follow steps ① ~ ⑤ in order: for steps requiring commands, the description corresponds one-to-one with the code block immediately following it; ③④ are condition checks and require no commands. **① Unmount the USB drive** sudo umount /dev/sdb **② Format the USB drive as ext4** sudo mkfs.ext4 /dev/sdb **③ Confirm the system supports OTA update** The board must already have the /usr/bin/ota script (see 5.10.1 for script configuration). **④ Confirm USB drive specifications** The USB drive must be formatted as Linux ext4 with more than 8G of free space; otherwise the upgrade package cannot be written. **⑤ Plug in the network cable and USB drive, then run the upgrade** ota Follow the prompts to complete the upgrade; do not power off during the process; the device reboots automatically when complete. **Note:** /dev/sdb is a common device node for USB drives; the actual node depends on the lsblk output. This section describes the Linux OTA update (ext4, ≥8G, ota command); it is a separate process from the Android USB drive upgrade in 3.4 (FAT32, update.img) and the Android OTA update in 3.4.4; do not mix them. ==== 5.11 Cross-Compilation Environment ==== === 5.11.1 Install the Cross-Compilation Environment via apt === On a Debian / Ubuntu host, a single command installs the aarch64 cross toolchain; then confirm the version with -v: sudo apt install -y crossbuild-essential-arm64 aarch64-linux-gnu-gcc -v === 5.11.2 Download a Specific Toolchain Version === For a specific version, download the corresponding toolchain from ARM (developer.arm.com/downloads/-/gnu-a), extract it, then add the bin directory to PATH: export PATH=$PATH:/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/ aarch64-none-linux-gnu-gcc --version **Note:** Write it to ~/.bashrc or /etc/profile to make it permanent; replace the path with the actual extraction directory. === 5.11.3 Toolchain Downloads === Common cross-compilation toolchains and how to obtain them: * **aarch64-linux-gnu-gcc cross toolchain**: Provided in the SDK prebuilts directory * **arm-linux-gnueabihf cross toolchain**: For compiling 32-bit user-space programs * **x86 host arm64 cross-compilation toolchain**: Released by ARM, for compiling aarch64 (arm64) programs on an x86_64 host **Download:** [[https://pan.baidu.com/s/1OjJVuzDB3hFMgO6yS3EAZw|gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz]] — Baidu Netdisk, extraction code hkku **Note:** This toolchain requires no installation; extract it and add the bin directory inside the archive to PATH; call aarch64-none-linux-gnu-gcc when compiling. ==== 5.12 Qt Application Development ==== Preinstalled environments: **Debian 11 → Qt 5.15.2**, **Ubuntu 20.04 → Qt 5.12.8**. Choose between the two methods as applicable. === 5.12.1 Import a Docker Image for Compilation === Use a ready-made build image; the host does not need Qt installed, isolation is good, and it suits batch compilation. **Download:** [[ftp://drv.nodka.com/arm_download/nodka_docker_qt_build_20230223.tar|nodka_docker_qt_build_20230223.tar]] — company FTP (drv.nodka.com) - Import the image - Start the container and mount the application directory to /mnt (replace source with the actual path) - Inside the container, enter /mnt and run qmake and make sudo docker load < nodka_docker_qt_build_20230223.tar sudo docker run --rm --mount type=bind,source=/home/APP_PATH,target=/mnt/ -i -t 09a37c1b2fc3 /bin/bash cd /mnt qmake make **Note:** The image is large; after import the image and the original tar each take a copy, so reserve at least 10 GB of free disk. Chrome / Edge no longer open ftp links directly — use Windows Explorer, FileZilla or a download manager instead. The container ID (09a37c1b2fc3) is taken from the actual docker images output. === 5.12.2 Set Up the Qt Build Environment on the Board === **1. Install Qt Creator** sudo apt-get install qtcreator sudo apt-get install qt5-default If qt5-default has been removed from the official repository, use the following set of dependencies instead: sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtcreator **2. Add qmake** Qt Creator → Tools → Options → Kits → Qt Versions → Add, select the on-board qmake: /usr/local/qt5.12-arm/bin/qmake {{wiki:qt_set_qmake.png?620}} Add the on-board qmake path in Qt Versions. **3. Configure the Cross-Compiler** In the same window, switch to Compilers → Add → GCC and add g++ and gcc respectively: g++: /usr/bin/aarch64-linux-gnu-g++ gcc: /usr/bin/aarch64-linux-gnu-gcc g++ compiler location: {{wiki:qt_set_compiler_gpp.png?620}} gcc compiler location: {{wiki:qt_set_compiler_gcc.png?620}} Add the cross-compiler; when the host has crossbuild-essential-arm64 installed, the compiler is under /usr/bin; with a third-party toolchain, enter its installation path. **4. Configure the Debugger (optional, for online debugging)** sudo apt install -y gdb-multiarch The board must have /usr/bin/gdbserver; if not, install gdbserver (included in Buildroot, no installation needed). Add /usr/bin/gdb-multiarch in Debuggers in Qt Creator. {{wiki:qt_set_debugger.png?620}} **5. Configure Devices** Enter the board IP and username root; set a static IP for the board to avoid disconnections during debugging. {{wiki:qt_set_device.png?620}} **6. Configure Kits** Combine the Qt version, compiler, debugger and device above into one Kit. When the target system is Ubuntu, also fill in the sysroot path in the Kit. {{wiki:qt_set_kits_std.png?620}} In Kits, combine the Qt version, compiler, debugger and device. ==== 5.13 Video Hardware Codec Support ==== The on-board VPU supports H.264 / H.265 hardware encoding and decoding; the system ships with GStreamer plugins and OpenGL ES / OpenCL runtime libraries. **GStreamer Encoding/Decoding** The system includes test scripts; run them directly to verify hardware decoding and encoding: /rockchip-test/video/test_dec-gst.sh # Hardware decode test /rockchip-test/video/test_enc-gst.sh # Hardware encode test **OpenGL ES** Use glmark2 to benchmark and verify the GPU: glmark2-es2 **WebGL** Open Chromium, enter the following address in the address bar, and check WebGL and hardware acceleration status: chrome://gpu **OpenCL** clinfo {{wiki:cm_clinfo.png?620}} clinfo output: confirm platform, device and OpenCL version information. ===== 6 General Methods ===== This chapter covers query commands, which are basically the same under Android (adb shell) and in the Linux terminal; differences are noted in individual entries where applicable. ==== 6.1 Check CPU Temperature ==== cat /sys/class/thermal/thermal_zone0/temp # Output is in millidegrees Celsius; 45200 means 45.2℃ ==== 6.2 Check the CPU Serial Number ==== cat /proc/device-tree/serial-number # On Android getprop ro.serialno ==== 6.3 Check CPU Frequency ==== cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies ==== 6.4 Check Memory Capacity ==== free -h cat /proc/meminfo | head -3 ==== 6.5 Check Storage Capacity ==== df -h lsblk ==== 6.6 Network Ping Test ==== ping -c 4 192.168.8.1 ping -c 4 www.baidu.com ping -c 1 -W 1 8.8.8.8 ==== 6.7 Set System Time and Save to the RTC Chip ==== # Check the system time date # Set the system time and write it to the RTC chip sudo date -s "2025-04-08 17:01:01" sudo hwclock -w sudo hwclock -r **Verification**: Power off and disconnect power for more than 5 seconds, then power on and use date to check whether the time is retained. **Note:** Network time synchronization is enabled by default; perform the RTC test with the external network disconnected. **Time Zone Settings** ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime reboot In the GUI, select the time zone under "Preferences → Time and Date"; to set another time zone, replace Asia/Shanghai in the command with the corresponding city. ===== 7 Appendix ===== ==== 7.1 FAQ Troubleshooting ==== ^ Symptom ^ Possible Cause ^ Solution ^ | The flashing tool keeps showing "No device found" | Not in Loader mode / USB driver error / cable issue | Follow step ④ in 3.3 to re-enter Loader mode; uninstall and reinstall the driver; change the USB port and data cable | | Unknown device appears in Device Manager | Rockchip USB driver not installed properly | See 3.2; reinstall DriverInstall | | ADB cannot connect | USB debugging not enabled / wrong USB port | See 4.1; confirm connection to the blue USB3.0 lower port | | The serial port cannot be opened or returns no data | Wrong node / no permission / A-B or R-T reversed | See 4.5, 5.3; check the node and wiring against the silkscreen label | | GPIO read/write no response | Not exported / numbering offset varies with firmware | See 2.3, 5.4; export first, then operate | | Touch not responding or coordinates misaligned | Loose touch USB cable / CalibrationMatrix not updated after rotation | See 4.10, 5.9.5 | | After screen rotation the UI is normal but touch is reversed | libinput calibration matrix not updated | See the touch rotation table in 5.9.5 | | Boot LOGO not applied | Only one of the images replaced / bmpconvert not run | See 5.9.3; replace and convert both logo images | | Static IP configuration not effective | NetworkManager and ifupdown coexist | See the note in 5.2.1 | | No prompt during USB drive upgrade | File name is not update.img / format is not FAT32 | See 3.4.2; rename and reformat as FAT32 | ==== 7.2 Document Information and Revision History ==== ^ Item ^ Content ^ | Applicable Products | sBOX-R13 (RK3568 single platform) | | Main Control Platform | Rockchip RK3568 (4 × Cortex-A55 @2.0GHz, 1 TOPS NPU) | | Applicable Systems | Android 11, Ubuntu 22.04 | | Document Version | v1.0 | | Update Date | 2026-11-14 | ^ Version ^ Date ^ Revision Details ^ | v1.0 | 2026-11-14 | First release: product specifications, interface definitions and mechanical dimensions per the sBOX-R13 datasheet v1.0 (2026-06-18); platform chapters follow the RK3568 manual | For previous versions, contact Technical Support. ==== 7.3 Technical Support ==== * Firmware, flashing tools, SDK and specifications: contact Sales or Technical Support * When reporting an issue, provide: unit SN (see 6.2 for how to view it), system version, reproduction steps and screenshots * If an exception occurs after modifying the system yourself, reflash the factory firmware first (see 3.3) before deciding whether it is a hardware issue ==== 7.4 Development Resources ==== Datasheets, drivers, SDK, firmware and flashing tools are maintained per model; contact Sales or Technical Support to obtain them. **Note:** Flashing, ADB, serial and GPIO procedures are described in chapters 3–7 of this page; for interface count and location see 2.2.