WuKong Pi H3 Zero User Manual
I. WuKong Pi Introduction
WuKong Pi H3 Zero is an open-source single-board computer that can run Android 4.4, Ubuntu, Debian, and Raspberry Pi Image. It is powered by the AllWinner H3 SoC and features 256MB/512MB DDR3 SDRAM.
What can I do with WuKong Pi H3 Zero?
- Build a computer
- Build a wireless server
- Games
- Music and sounds
- HD video
- A speaker
- Scratch
- And much more, as it is open source.
Whom is it for?
WuKong Pi H3 Zero is designed for anyone who wants to create with technology, not just consume. It is a simple, fun, and useful tool for taking control of the world around you.
Hardware Specification of WuKong Pi H3 Zero
Hardware | Specification |
---|---|
CPU | H3 Quad-core Cortex-A7 H.265/HEVC 4K |
GPU | Mali400MP2 GPU @600MHz, Supports OpenGL ES 2.0 |
Memory | 256MB/512MB DDR3 SDRAM (256MB version is Standard version) |
Onboard Storage | TF card (Max. 32GB) / NOR flash(2MB) |
Wifi | Yes |
Onboard Network | 100M/10M Ethernet RJ45 (Integrated POE power supply) |
Onboard WIFI | XR819, IEEE 802.11 b/g/n |
Audio Input | No, needs an expansion board |
Video Outputs | Supports external board via 13 pins |
Power Source | USB OTG can supply power (Integrated POE power supply) |
USB 2.0 Ports | One USB 2.0 HOST, one USB 2.0 OTG |
Buttons | Power button |
Low-level peripherals | 26 Pins Header, compatible with Raspberry Pi B+ |
GPIO (1x3) pin | 13 Pins Header, with 2 x USB, IR pin, AUDIO(MIC, AV), UART, ground |
LED | Power LED & Status LED |
Supported OS | Android, Lubuntu, Debian, Raspberry Pi Image |
Interface Definition
- Product size: 45mm × 48mm
- Weight: 30g
WuKong Pi is a trademark of Shenzhen Sincody CO., Limited.
II. Using Method Introduction
Follow these steps to configure and run your WuKong Pi.
1. Step 1: Prepare Accessories Needed
You will need the following accessories:
No. | Items | Requirements and Instructions |
---|---|---|
1 | TF card | 8GB min., class 10. Branded TF cards are recommended. |
2 | AV video cable | A standard AV video cable can be used to connect to a monitor if a HDMI monitor is unavailable. |
3 | Keyboard and mouse | Any keyboard and mouse with a USB port is applicable. A USB concentrator is required as keyboards and mice are high-power devices. |
4 | Ethernet cable/ USB WiFi (Optional) | Network connectivity is optional but convenient for mounting and upgrading software. |
5 | DC power adapter | 5V/2A min. high-qualified power adapter. A Type-C connector can be used for power supply. |
6 | Audio cable (Optional) | You can select an audio cable with a 3.5mm jack for stereo audio. |
2. Step 2: Prepare a TF Card
To use WuKong Pi normally, you must install the operating system onto a TF card first.
1) Write Linux into TF Card Based on Windows Platform
- Insert the TF card into your computer. The card's capacity must be larger than the operating system, typically requiring 8GB or bigger.
- Format the TF card. Download tools like TF Formatter from sdcard.org. Unzip the downloaded files and run setup.exe. In the options settings, select "format" for quick formatting and "Format size adjustment" to "ON".
- Ensure the inserted TF card is compatible. Click the "Format" button.
- Download the operating system image file from the download page: Baidu Cloud or GitHub.
- Unzip the downloaded file. Right-click the file and select "Unzip file" to write the image to the TF card.
2) Write Linux into TF Card Based on Linux Platform
- Insert the TF card into your computer. The capacity must be larger than the operating system image, typically requiring 4GB or greater.
- Formatting the TF card: Run
fdisk -l
to identify the TF disk. Useumount /dev/sdxx
to uninstall all partitions. Runsudo fdisk /dev/sdx
, useo
to delete all partitions, thenn
to add a new partition, and finallyw
to save and exit. Runsudo mkfs.vfat /dev/sdx1
to format the TF card partition to FAT32. (Note: Linux may format the TF card automatically.) - Download the OS image from the download page: Baidu Cloud.
- Unzip the file and right-click to select "Unzip file".
- Write the image to the TF card using
sudo dd bs=4M if=[path]/[imagename] of=/dev/sdx
. Monitor the procedure withsudo pkill –USR1 –n -x dd
.
3) Write Armbian Image into TF Card
- Insert the TF card into your computer. The capacity must be larger than the operating system image, typically 8GB or bigger.
- Download the OS image file from armbian.com.
- Write the image into the TF card using a tool like Rufus. Download Rufus from rufus.akeo.ie. Select the image file path and click "start". After writing, click "close".
3. Step 3: Boot your WuKong Pi
1) Hardware Connection Sketch Map
The WuKong Pi H3 Zero board has various components labeled, including the Allwinner H3 SoC, Ethernet port, USB ports, expansion ports, and interfaces for SD card, debug serial port, and WiFi antenna.
2) Details of Booting Steps
- Insert the TF card with the written image into the TF card slot.
- Connect your WuKong Pi to an HDMI TV or monitor using an HDMI cable. Alternatively, use the AV interface and audio interface to connect to an analog TV or display.
- There is a 13-pin connector on the board for expansion, offering additional USB ports, mic, and IR receiver.
- The onboard network module allows access to a wired network.
- Connect a power adapter (5V/2A or higher) to the micro USB OTG port. Avoid using smaller mobile phone chargers, as they may not provide sufficient current.
The WuKong Pi will boot in a few minutes. The first boot may take a while to display the graphical interface; please be patient. Subsequent boots will be faster.
4. Step 4: Turn off your WuKong Pi Correctly
- You can use the shutdown button on the interface to safely close the WuKong Pi.
- Alternatively, you can close the system by entering commands in the shell:
sudo halt
orsudo shutdown -h
.
Directly using the power button to shut down the system may damage the file system on the TF Card. After the system is closed, wait for more than 5 seconds before cutting off the power.
5. Other configuration
1) Connect to the wired network
Method 1:
- Enter the following in the command line:
ifconfig
. Check ifwlan*
is present. - If not, load the corresponding module, e.g.,
insmod xradio_wlan.ko
for XR819. - Enter
ifconfig
again; you should seewlan0
. - Configure the wired network by entering the SSID and PSK (account and password).
- Edit the network interfaces file:
sudo nano /etc/network/interfaces
and add the following:auto wlan0
,iface wlan0 inet dhcp
,wpa-ssid xxxX
,wpa-psk xxxX
. - Reboot the computer.
Method 2:
- Create a
wpa_supplication.conf
file in the/etc/network/
directory with the following content:network={ ssid="wifi hot spot name" psk="wifi hot spot password" priority=1 }
- Connect to WiFi using:
ifconfig wlan0 up
,sudo wpa_supplicant -i wlan0 -c /etc/network/wpa_supplication.conf &
,dhcpcd wlan0 &
. - Test the WiFi connection using
iwconfig
andping
.
6. Universal Software Configuration
1) Default Account Changing
The default login account is WuKongPi
. To enhance security, it is recommended to change it to your own account (e.g., Zhangsan).
- Log in as the root user.
- Use
usermod -l zhangsan WuKongPi
to change the username. - Use
groupmod -n zhangsan WuKongPi
to change the group name. - Use
mv /home/ornagepi /home/zhangsan
to change the home directory. - Use
usermod -d /home/WuKongPi WuKongPi
to set the home directory. - Check
/etc/passwd
to confirm the changes.
2) U Disk Automatic Mounted Configuration
- Install usbmount:
sudo apt-get install usbmount
. - Configure automount rules:
sudo vim /etc/udev/rules.d/automount.rules
. Add rules for adding and removing devices (e.g., sdb, sdc). - Reload rules:
udevadm control –reload-rules
. Refer to unix.stackexchange.com for more information.
3) System Source Configuration
Example for Ubuntu:
- Open the source file:
sudo vi /etc/apt/sources.list
. - Edit the source file by replacing it with your preferred sources. For example, Ubuntu 16.04 on Zhonkeda source:
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
Note: Replace 'xenial' with the appropriate version code for other Ubuntu versions.
4) Remote desktop installation
Software like VNC, XRDP, and X2GO can be used for remote desktop access. X2GO offers more features and better desktop color restoration. XRDP is considered safer than VNC.
- Install VNC:
sudo apt-get install tightvncserver
. - Set the VNC password by running
vncpasswd
. - Open desktops using
vncserver
orvncserver:1
. You can specify parameters like geometry and depth:vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565
.
5) NAS and DLAN Configuration
NAS:
Refer to geekfan.net for detailed descriptions on U disk mounting.
DLNA:
Use the minidlna software to share media resources within the LAN.
- Install minidlna:
sudo apt-get minidlna
. - Modify the configuration file:
sudo nano /etc/minidlna.conf
. Add media directory paths for music, video, and pictures, and database directory paths. - Restart minidlna:
/etc/init.d/minidlna restart
.
6) Modify the size of ext4 file system
Expand the file system to improve SD card performance and avoid storage limitations.
- Method 1: Extend the rootfs file partition of the TF card on a PC. Select the disk, right-click, choose "change size", adjust the size, click "re-size", and then "apply all operations".
- Method 2: Extend via shell. Enter
resize_rootfs.sh
in the command line. Reboot and check withdf -lh
. - Expand file system: Boot to Linux, unmount partitions (e.g.,
/dev/sdb1
,/dev/sdb2
). Usefdisk /dev/sdb
to adjust partition size. Delete the old partition and create a new one with the desired size. Usee2fsck -f /dev/sdb2
to check the file system andresize2fs /dev/sdb2
to adjust the size.
8) eth0 and wlan0 static mac address setting
- If the system does not use systemd, modify
rc.local
:vim /etc/rc.local
. Add MAC address and configure network interfaces. - If the system uses systemd, add a service file (e.g.,
change_mac_address.service
) in/etc/systemd/system/
.
III. Linux Kernel Source Code Compilation
This section guides you through compiling the Linux kernel source code for rapid project development.
1. Download Linux Source Code
Download the source code from the official website: github.com/Timfu2019/wukongpi_build. Subsection and compress the file, then unzip it.
2. Update the Kernel Image File and Replace Library
After compilation, the following files will be generated in the libs
directory: lichee/out/sun8iw7p1/android/common/lib/modules/3.4.39
.
VII. Using Debug tools on WuKongPi
This section covers using debug tools on WuKongPi.
1. Operation Steps on Windows
This section details using PuTTY for serial debugging.
1) Install USB driver on Windows
- Download and unzip the latest version of the driver.
- Choose to run the application as Administrator.
- Wait for the installation to complete.
2) Install putty on Windows
- Download the PuTTY installation package from putty.xp510.com.
- Unzip and install the package.
- Open the program after installation.
3) Connecting method
Use the TTL to serial port cable, connecting one end to WuKongPi and the other end to the PC.
4) Equipment information acquisition
- Start menu -> select Control Panel.
- Click on Device Manager to check the port number. Look for "Ports (COM & LPT)" and identify the "Prolific USB-to-Serial Comm Port (COM3)" or similar.
5) Putty Configuration
Configure PuTTY by selecting the correct serial port (e.g., COM3) and setting the speed to 115200.
6) Serial Debug Port
When powering on and booting WuKongPi, the serial port will automatically print debug logs.
2. Operation Steps on Linux
This section explains using Minicom and Kermit for serial debugging on Linux, with Kermit as an example.
1) Install Kermit
- Install Kermit:
sudo apt-get install ckermit
. - Configure Kermit:
sudo vi /etc/kermit/kermrc
. Add lines for setting the serial line, speed, carrier-watch, handshake, flow-control, file type, file name, receive packet size, send packet size, and window size.
2) Connecting method
Use the TTL to serial port cable, connecting one end to WuKongPi and the other end to the PC.
3) Equipment information acquisition
- Input command
ls /dev/
in the PC terminal to check the device number of the TTL to serial cable. It should be identified asttyUSB0
or similar. - Configure the
/etc/kermit/kermitc
file and update the serial port information, settingset line
to/dev/ttyUSB0
.
4) Start debug
Input the command sudo kermit -c
in the host computer terminal to enter Kermit mode. Power on and boot WuKongPi; the serial port will automatically print debug logs.
2.7. Connection instructions of debugging the serial port
1) First, you need to prepare a USB to TTL module
The USB end of the module is inserted into the USB interface of the computer. The TXD of the USB to TTL module connects to the RXD of the development board, and the RXD of the module connects to the TXD of the development board. The GND of the module connects to the GND of the development board.
2) The corresponding relationships of the debugging serial ports
The GND, TX, and RX pins of the development board correspond to the debugging serial ports.
3) The USB to TTL module GND, TXD, and RXD pins need to be connected to the debugging serial port of the development board through the DuPont line
- A. USB to TTL and the GND of the module to the GND of the development board.
- B. USB to TTL and the RXD of the module is connected to the TXD of the development board.
- C. USB to TTL connects the TXD of the module to the RXD of the development board.
4) The schematic diagram of USB to TTL module connecting the computer and WuKong Pi development board is shown below
2.7.2. Ubuntu The method of the platform debugging serial interface
- If the connection of USB to TTL module is normal, you can see the corresponding device node name under the Ubuntu PC /dev. Remember this node name, and the serial port software will be used later. (e.g.,
/dev/ttyUSB0
) - Linux offers various serial port debugging tools like putty and minicom. This section demonstrates using putty.
- First, install putty on the Ubuntu PC:
sudo apt update
,sudo apt install putty
. - Then run putty with sudo permission:
sudo putty
. - The following interface will pop up after the putty command.
- Select the setting interface of the serial port.
- Set the parameters: Serial line to connect to
/dev/ttyUSB0
, Speed (baud) to 115200, and Flow control to None. - After setting up the serial port interface, go back to the Session interface. Choose Connection type to Serial and click the Open button to connect the serial port.
After starting the development board, you can see the log output from the open serial port terminal.
2.7.3. Windows platform. The method of debug serial interface
This section demonstrates using MobaXterm, a free serial port debugging tool.
- Download MobaXterm from mobaxterm.mobatek.net.
- Use MobaXterm: Select Session -> Serial -> Speed (bps): 115200. Select a serial port and click OK.
After starting the development board, you can see the log output from the open serial port terminal.
3.11. WIFI, connection test
Do not connect to WIFI by modifying the /etc/network/interfaces profile, as this can cause problems with the WIFI network connection.
3. 11. 1. Server version mirror connects to WIFI through command
This section is recommended for connecting to a WIFI network when the development board is not connected to Ethernet and only to the serial port. nmtui
is used as it displays characters in serial port software like minicom.
- Ways to log in to the Linux system:
- Connect via network cable and log in remotely via SSH.
- Connect via debugging serial port and log in using the serial port terminal.
- Scan WIFI hotspots using
nmcli dev wifi
. - Connect to a WIFI hotspot using
nmcli dev wifi connect [wifi_name] password [wifi_passwd]
. - View the IP address using
ifconfig wlan0
. - Test connectivity using the
ping
command.
3.11.2. graphically connects to WIFI
- Log in to the Linux system via SSH if connected to a network cable, or via the serial port terminal if connected via debugging serial port.
- Enter the
nmtui
command to open the WiFi connection interface. - Select "Activate a connection" and then choose the desired WIFI hotspot.
- Enter the password when prompted.
- Successful connection displays a "*" before the connected WIFI name.
- View the IP address using
ifconfig wlan0
.
3. 12. USB interface testing
- Format the U disk and place files on it.
- Insert the U disk into the USB interface of WuKong Pi H3.
- Ensure that
usbhost2
andusbhost3
are enabled in/boot/armbianEnv.txt
for Linux 5.4 systems. - Execute
cat /proc/partitions | grep "sd*"
to see if the U disk is recognized. - Mount the U disk using
mount /dev/sda1 /mnt/
and view files withls /mnt/
. - Check capacity usage and mount point with
df -h | grep "sd"
.
3. 13. The USB Ethernet card test
- Tested USB Ethernet cards include RTL8152B and RTL8153.
- Insert the USB network card into the USB 2.0 Host interface and connect the network cable.
- Check the log information using the
dmesg
command to ensure normal identification. - Use
ifconfig
to see USB network card device nodes and assigned IP addresses. - Test network connectivity.
3.14. On-board LED light display control instructions
The development board has a green and a red LED.
- Green LED:
- Red LED:
The manual provides commands to control the LED states (on/off, flashing) using the echo
command with parameters like brightness
and trigger
.