Using the RK1808M0 AI Compute Card

Testing Environment:

  • RK1808M0 AI Compute Card

  • LKD3588

Other Neardi products can also refer to this guide.

The Toybrick TB-RK1808M0 AI Compute Card (referred to as the Compute Card) is equipped with the RK1808neural network processor by Rockchip, configured with 1GB of RAM, and uses a standard Mini-PCIe interface,The DIP switch allows switching between USB3.0 and mini-PCIe data communication, The Compute Card follows the Mini-PCIespecification and allows switching between two modes via the DIP switch:

../../_images/rk1808.png

For the LKD3588, USB communication is used, and the DIP switch should be switched downwards.

Hardware Connection

../../_images/LKD3588-RK1808.png

Kernel Settings

The default firmware does not enable CONFIG_USB_NET_RNDIS_WLAN,Enable it as follows:

--- a/kernel/arch/arm64/configs/rockchip_linux_defconfig
+++ b/kernel/arch/arm64/configs/rockchip_linux_defconfig
@@ -677,3 +677,4 @@ CONFIG_USB_WDM=y
 CONFIG_USB_SERIAL_WWAN=y
 CONFIG_USB_NET_CDCETHER=y
 CONFIG_USB_NET_CDC_NCM=y
+CONFIG_USB_NET_RNDIS_WLAN=y

Introduction to Active Mode Development and Environment

  • Confirm that the USB hardware connection is normal.

Insert RK1808 AI compute stick into the PC’s USB port and use the lsusb command to check, as shown below (where 2207:0018 represents the RK1808 AI compute stick):

neardi@LPA3588:~$ lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 002: ID 05e3:0620 Genesys Logic, Inc. USB3.2 Hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 007 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
**Bus 002 Device 002: ID 2207:0018 Fuzhou Rockchip Electronics Company TB-RK1808M0**
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • When the RK1808 compute stick is inserted into the host, it will be virtualized as a network card device.

neardi@LPA3588:~$ ifconfig -a
enx10dcb69ff286: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::c88:e6b0:9127:d944  prefixlen 64  scopeid 0x20<link>
        ether 10:dc:b6:9f:f2:86  txqueuelen 1000  (Ethernet)
        RX packets 35  bytes 1396 (1.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 40  bytes 8779 (8.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enx10dcb69ff286 is the USB network card (virtual network card of the RK1808 AI compute stick).

  • Configure the virtual network card on the host, setting the IP to 192.168.180.1, ensuring a normal network connection between the host and the RK1808.

Configure the virtual network card with a fixed IP of 192.168.180.1:

neardi@LPA3588:~$ sudo ifconfig enx10dcb69ff286 192.168.180.1
neardi@LPA3588:~$ ifconfig -a
enx10dcb69ff286: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.180.1  netmask 255.255.255.0  broadcast 192.168.180.255
        ether 10:dc:b6:9f:f2:86  txqueuelen 1000  (Ethernet)
        RX packets 137  bytes 4628 (4.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 88  bytes 18660 (18.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Test the network connectivity:

neardi@LPA3588:~$ ping 192.168.180.8
PING 192.168.180.8 (192.168.180.8) 56(84) bytes of data.
64 bytes from 192.168.180.8: icmp_seq=1 ttl=64 time=0.748 ms
64 bytes from 192.168.180.8: icmp_seq=2 ttl=64 time=0.686 ms
64 bytes from 192.168.180.8: icmp_seq=3 ttl=64 time=0.736 ms
  • The default IP of the compute stick is 192.168.180.8, with both the username and password being toybrick. Users can SSH into the compute stick to copy models and server programs onto it.

neardi@LPA3588:~$ ssh toybrick@192.168.180.8
toybrick@192.168.180.8's password: 
Linux debian10.toybrick 4.4.194 #5 SMP PREEMPT Fri Jun 24 17:46:46 CST 2022 aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Oct 23 00:14:17 2019 from 192.168.180.1
toybrick@debian10:~$ 
  • Using the NPU

Please refer to theToybrick Official Website