Toybrick EN

中文 / EN
Toybrick EN»Wiki教程

TB-RK1808S0 AI Compute Stick Specification

Product Introduction

The RK1808 artificial intelligence computing stick is a member of Rockchip’s Toybrick series of products. The computing stick is equipped with Rockchip’s RK1808 neural network processor. It has low power consumption and high performance, and can be used in various artificial intelligence applications. . The host computer can obtain powerful deep learning reasoning ability through the RK1808 artificial intelligence computing stick. With the powerful computing power of the RK1808 artificial intelligence computing stick, embedded devices can build artificial intelligence algorithms on the edge of the network, allowing traditional embedded devices to easily complete artificial intelligence upgrades.

The RK1808 artificial intelligence computing stick can be used to assist inference calculations, and it also supports the completion of independent artificial intelligence calculation functions through secondary development.

Product technical specifications

CPU RK1808
RAM 1GB LPDDR
storage 8GB EMMC
size 82×31×13mm
interface USB3.0 Type-A
Minimum system requirements X86_64 computer with Ubuntu 16.04 or win 7; USB 2.0 Type-A port; 2 GB RAM; 4 GB available storage space;
temperature 0℃~40℃

Product appearance size


TB-RK1808S0 AI Compute Stick Development Guide

Passive mode development introduction and environment installation

Introduction to the passive mode development process

Note: The calculation stick is in passive mode by default. Do not modify the configuration of the calculation stick, which means that the calculation stick does not need to change the mode, and the default passive mode is uniformly fixed.

In passive mode: RK1808 artificial intelligence computing stick is a general AI accelerator. The upper computer transmits the model and pre-processed data to the RK1808 artificial intelligence computing stick through RKNN-Toolkit. The RK1808 artificial intelligence computing stick completes the inference and returns the result to the upper computer, which performs post-processing and display operations.

Currently the following platforms and systems support passive mode:

PC Linux system, Windows system, Mac OS

RK3399, RK3399Pro platform Linux system, Android system

For other platforms and systems that do not support passive mode, users can use active mode. For active mode, please refer to the Wiki tutorial--TB-RK1808S0--active mode development

The passive mode development flow chart is as follows:

The overall data flow diagram of the passive mode is as follows:

In passive mode, two sets of APIs, python and C, are provided for host computer programming.

  1. The host computer for Python programming needs to install RKNN-Toolkit. The RKNN-Toolkit installation package is provided under the link http://repo.rock-chips.com/python/. Users can use these installation packages to install RKNN-Toolkit. For the specific development and use of RKNN-Toolkit, please refer to "Rockchip_User_Guide_RKNN_Toolkit". For more documentation of RKNN-Toolkit, please refer to the link http://repo.rock-chips.com/rk1808/rknn-toolkit_doc/.
  2. Under the link of http://repo.rock-chips.com/rk1808/rknn-api/, there are library files and header files for the upper computer C programming. For the specific development and use of C programming, please refer to: "Rockchip_User_Guide_RKNN_API" . Before the host computer executes the compiled C language executable program, it needs to run npu_transfer_proxy to communicate with the computing stick. The download link of npu_transfer_proxy is http://repo.rock-chips.com/rk1808/npu_transfer_proxy/.
  3. To use RKNN-Toolkit under Windows, ntb driver needs to be installed in advance. Please download ntb driver from http://repo.rock-chips.com/rk1808/driver/windows/ntb/ link address, ntb driver installation and RKNN-Toolkit under windows Please refer to: "RKNN_Toolkit_Windows_Platform_Quick_Start_CN.pdf".

Passive mode Linux host computer environment installation

Compute stick running on PC

This section mainly describes how to use RKNN-Toolkit to quickly run the deep neural network model mobilenet_v1 on an Ubuntu 18.04 PC based on python3.6.

PC environment preparation

• Intel Core i3 or higher x86 64-bit PC with ubuntu 18.04 operating system (CPU instruction set needs to support SSE4.2 AVX AVX2, if not, the user needs to download the tensorflow source code by himself, remove the instruction set dependency and then compile and install).

• RK1808 artificial intelligence computing stick.

• Insert the RK1808 AI Compute Stick into the USB port of the PC, and use the lsusb command to view it, as follows (the red font 2207:0018 is our RK1808 AI Compute Stick):

  1. Enter the command as follows:
lsusb
  1. The execution results are as follows:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 009: ID 2207:0018

Install RKNN-Toolkit on PC

RKNN-Toolkit is an NPU development kit for model conversion, reasoning and performance evaluation based on python interface programming provided by Rockchip for users. In this section, an x86 64-bit PC with ubuntu 18.04 operating system is used as an example to illustrate when the Python version is How to install RKNN-Toolkit when it is 3.6, the following are the commands executed in the terminal:

• Install Python3.6

sudo apt-get install python3.6

• Install OpenCV

 sudo apt-get install -y  python3-opencv

• Install pip3

sudo apt-get install python3-pip

• Insert the TB-RK1808 artificial intelligence computing stick, the U disk device will be displayed on the PC, and the directory structure of the U disk device is as follows:

• Perform the following steps:(note:the following software versions are for demonstration purposes only. Due to version iteration updates, please install the latest version yourself. https://github.com/rockchip-linux/rknn-toolkit)

  1. Create the rknn directory in the current user directory, and enter the rknn directory:
mkdir ~/rknncd ~/rknn
  1. Install wget:
sudo apt-get install -y wget
  1. Download RKNN-Toolkit from the official FTP file server:
wget http://repo.rock-chips.com/python/rknn_toolkit-1.2.1-cp36-cp36m-linux_x86_64.whl
  1. Install Python dependencies. The minimum version of tensorflow requires 1.11.0. Here, install 1.13.1 as an example:
pip3 install --user tensorflow==1.13.1
  1. Install RKNN-Toolkit:
pip3 install --user rknn_toolkit-1.2.1-cp36-cp36m-linux_x86_64.whl

Note: RKNN-Toolkit package must be consistent with python version, ubuntu18.04 defaults to python3.6 by default.

  1. Check whether RKNN-Toolkit is installed successfully.

1)Enter the following command in the terminal:

python3

2)Enter the following code in the python3 operating environment to import the RKNN module:

from rknn.api import RKNN

(a) The successful import of RKNN module is as follows:

$ python3
>>> from rknn.api import RKNN
>>>

(b) If no error is reported when importing the RKNN module, then enter quit() to exit Python3 (skip the following step (3)).

(c) If the following error is reported when importing the RKNN module, this is because the Tensorflow installation package that RKNN relies on uses the SSE4.2 instruction set. These instructions cannot run on the old version of the CPU. Please check and replace it with one that supports SSE4.2 PC with instruction set.

$ python3
>>> from rknn.api import RKNN
2019-06-25 20:10:25.255397: F tensorflow/core/platform/cpu_feature_guard.cc:37] The TensorFlow library was compiled to use SSE4.2 instructions, but these aren't available on your machine.
Modification of device access permissions on PC
  1. Insert the RK1808 artificial intelligence computing stick, you need to modify its USB device access permissions, the operation steps are as follows:

1) Return to the root directory of the USB flash drive, copy tool/update_rk1808_ai_cs_rule.sh to the rknn directory of the current HOME directory, and modify update_rk1808_ai_cs_rule.sh to executable permissions.

cp tool/update_rk1808_ai_cs_rule.sh  ~/rknn -f
chmod +x ~/rknn/update_rk1808_ai_cs_rule.sh

2) Return to the rknn directory, update_rk1808_ai_cs_rule.sh must be executed with root privileges.

cd  ~/rknnsudo 
./update_rk1808_ai_cs_rule.sh

Note: This step only needs to be executed once during the installation, and does not need to be executed in the future.

  1. After executing the script, check the USB device number of the RK1808 artificial intelligence computing stick.

1) Enter the following command:

lsusb

2) The execution results are as follows:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 009: ID 2207:0018

Note: Bus 003 Device 009 is the device number of the calculation stick.

  1. According to the USB device number of the computing stick, confirm the read and write permissions of the RK1808 artificial intelligence computing stick device

1) Enter the following command:

ls -l /dev/bus/usb/003/009

Note: For the above 003/009, different PCs may get different numbers, depending on the specific situation.

2) The execution result is as follows (the correct read and write permissions are shown in red font):

crw-rw-rw- 1 root root 189, 264 6 月 14 16:02 /dev/bus/usb/003/009
Run the example on the PC

Take mobilenet_v1 as an example. The function implemented by the mobilenet_v1 example is to perform feature extraction on a picture and identify the category of the picture.

The following is the directory structure of the mobilenet_v1 example and the description is as follows:

• dataset.txt: A text file containing the path of the test image.

• dog_224x224.jpg: test picture as an example of mobilenet_v1.

• mobilenet_v1.tflite: TensorFlow Lite model file.

• mobilenet_v1.rknn: rknn model file. The rknn model file generated by the RKNN-Toolkit model conversion from a non-rknn model file (here is the TensorFlow Lite model).

• test.py: sample running script (including rknn model conversion part).

• test_inference.py: sample running script (only load the rknn model for inference).

The sample operation steps are as follows:

  1. Download the mobilenet_v1compressed package from the official FTP file server and unzip it:
wget http://repo.rock-chips.com/rk1808/mobilenet_v1.tar.gz
tar xvf mobilenet_v1.tar.gz
  1. Enter the mobilenet_v1 directory and execute the test.py script:
cd mobilenet_v1/
python3 test.py

\3. Get the following results

--> config model
done
--> Loading model
done
--> Building model
done
--> Export RKNN model
done
--> Init runtime environment
done
--> Running modelmobilenet_v1
-----TOP 5-----
[156]: 0.8837890625
[155]: 0.0677490234375
[188 205]: 0.00867462158203125
[188 205]: 0.00867462158203125
[263]: 0.0057525634765625
done
--> Begin evaluate model performance
========================================================================                               Performance                              ========================================================================
Total Time(us): 7140FPS: 140.06
========================================================================
done
  1. According to the above execution results, TOP5 represents the top 5 classification results predicted by the model, where [156] represents the label of the dog, 0.8837890625 represents the probability of the prediction for the label, and it can be seen that the predicted result is the possibility of the dog The biggest, from the test picture (dog_224x224.jpg), it can be seen that the prediction result is accurate.

Compute stick running on RK3399ProD

This section mainly describes how to run the RK1808 AI computing stick on RK3399ProD (fedora system), and use RKNN-Toolkit to quickly run the deep neural network model mobilenet_v1 based on python3.6.

RK3399ProD environment preparation

• Toybrick RK3399ProD development board (firmware version is V1.5), rk1808 artificial intelligence computing stick (firmware version is V1.3.4).

• Insert the RK1808 AI Compute Stick into the USB interface of RK3399ProD and use the lsusb command to view it as follows (the red font part 2207:0018 is our RK1808 Artificial Intelligence Compute Stick):

  1. Enter the command as follows:
lsusb
  1. The execution result is as follows, you can see two NPUs, 0018 is the NPU of the computing stick, and 1808 is the NPU that comes with the development board

Bus 004 Device 004: ID 2207:0018

*Bus 004 Device 003: ID 2207:1808*

RKNN-Toolkit installation on RK3399ProD
sudo dnf install -y cmake gcc gcc-c++ protobuf-devel protobuf-compiler lapack-devel opencv-devel
sudo dnf install -y python3-devel python3-opencv python3-numpy-f2py python3-h5py python3-lmdb  python3-grpcio

• Insert the TB-RK1808 artificial intelligence computing stick, and the U disk device will be displayed on the RK3399ProD development board. The directory structure of the U disk device is as follows:

• Perform the following steps:

  1. Create the rknn directory in the current user directory, and enter the rknn directory:
mkdir ~/rknncd ~/rknn
  1. Install wget:
sudo dnf install wget
  1. Download RKNN-Toolkit from the official FTP file server:
wget http://repo.rock-chips.com/python/rknn_toolkit-1.2.1-cp36-cp36m-linux_aarch64.whl
  1. Install tensorflow
pip3 install --user tensorflow
  1. Install RKNN-Toolkit:
pip3 install --user rknn_toolkit-1.2.1-cp36-cp36m-linux_aarch64.whl

Note: The RKNN-Toolkit package must be consistent with the python version. The current development board fedora system defaults to python3.6 by default.

  1. Check whether RKNN-Toolkit is installed successfully.

1) Enter the following command in the terminal:

python3

2) Enter the following code in the python3 operating environment to import the RKNN module:

from rknn.api import RKNN

(a) The successful import of RKNN module is as follows:

$ python3
>>> from rknn.api import RKNN
>>>

(b) If no error is reported when importing the RKNN module, then enter quit() to exit Python3.

Modification of device access permissions on RK3399ProD
  1. Insert the RK1808 artificial intelligence computing stick, you need to modify its USB device access permissions, the operation steps are as follows:

1) Return to the root directory of the USB flash drive, copy tool/update_rk1808_ai_cs_rule.sh to the rknn directory of the current HOME directory, and modify update_rk1808_ai_cs_rule.sh to executable permissions.

cp tool/update_rk1808_ai_cs_rule.sh  ~/rknn -f
chmod +x ~/rknn/update_rk1808_ai_cs_rule.sh

2) Return to the rknn directory, update_rk1808_ai_cs_rule.sh must be executed with root privileges.

cd  ~/rknn
sudo 
./update_rk1808_ai_cs_rule.sh

Note: This step only needs to be executed once during the installation, and does not need to be executed in the future.

  1. After executing the script, check the USB device number of the RK1808 artificial intelligence computing stick.

1) Enter the following command:

lsusb

2) The execution results are as follows:

Bus 004 Device 004: ID 2207:0018
Bus 004 Device 003: ID 2207:1808

Note: Bus 004 Device 004 is the device number of the computing stick, * *Bus 004 Device 003 is the internal NPU number of rk3399proD** .

  1. According to the USB device number of the computing stick, confirm the read and write permissions of the RK1808 artificial intelligence computing stick device

1) Enter the following command:

ls -l /dev/bus/usb/004/004

Note: For the above 004/004, different equipment may get different numbers, depending on the specific situation.

2) The execution result is as follows (the correct read and write permissions are shown in red font):

crw-rw-rw- 1 root root 189, 387 Sep 23 21:49 /dev/bus/usb/004/004
Run example on RK3399ProD

Take mobilenet_v1 as an example. The function implemented by the mobilenet_v1 example is to perform feature extraction on a picture and identify the category of the picture.

The following is the directory structure of the mobilenet_v1 example and the description is as follows:

• dataset.txt: A text file containing the path of the test image.

• dog_224x224.jpg: test picture as an example of mobilenet_v1.

• mobilenet_v1.tflite: TensorFlow Lite model file.

• mobilenet_v1.rknn: rknn model file. The rknn model file generated by the RKNN-Toolkit model conversion from a non-rknn model file (here is the TensorFlow Lite model).

• test.py: sample running script (including rknn model conversion part).

• test_inference.py: sample running script (only load the rknn model for inference).

The sample operation steps are as follows:

  1. Download the mobilenet_v1 compressed package from the official FTP file server and unzip it:
wget http://repo.rock-chips.com/rk1808/mobilenet_v1.tar.gztar xvf mobilenet_v1.tar.gz
  1. Enter the mobilenet_v1 directory and execute the test.py script:
cd mobilenet_v1/
python3 test.py
  1. The operation will report the following error
E More than 1 device detected to usb ntb. Please specify the device to use with device id parameter.

This is because there are 2 NPUs, and the code does not specify which NPU to use.

Modify test.py to specify the device id, where TS018080000000055 is the device id of the computing stick, each computing stick is different, the user can modify it according to his own device

ret = rknn.init_runtime(target='rk1808', device_id='TS018080000000055')

If the user wants to enumerate the device id of all the computing stick devices, you can add it in the code

_, ntb_devices = rknn.list_devices()
  1. Run python3 test.py again to get the following results
--> config model
done
--> Loading model
done
--> Building model
done
--> Export RKNN model
done
--> Init runtime environment
done
--> Running model
mobilenet_v1
-----TOP 5-----
[156]: 0.8837890625
[155]: 0.0677490234375
[188 205]: 0.00867462158203125
[188 205]: 0.00867462158203125
[263]: 0.0057525634765625
done
--> Begin evaluate model performance
========================================================================                               Performance                              ========================================================================
Total Time(us): 7140FPS: 140.06
========================================================================
done
  1. According to the above execution results, TOP5 represents the top 5 classification results predicted by the model, where [156] represents the label of the dog, and 0.8837890625 represents the probability of the predicted label. It can be seen that the predicted result is the probability of a dog. The biggest, from the test picture (dog_224x224.jpg), it can be seen that the prediction result is accurate.

For more detailed usage and interface description of RKNN-Toolkit, please refer to the "Rockchip_RK1808_AI_Compute_Stick_User_manual_CN.pdf" manual.

Passive mode Windows host computer environment installation

This chapter explains how to use RKNN-Toolkit in Windows system and Python 3.6 environment.

Installation file download address: Click here to download

Ready to work

  1. Operating system confirmation: Windows 7 (x64) and above, Intel Core i3 and above x86 64-bit PC (CPU instruction set needs to support SSE4.2 AVX AVX2, if not, the user needs to download the tensorflow source code by himself, and remove the instruction set Depend on recompile and install). Some system versions of Windows 10 will lack the runtime library, and users need to install vc_redist.x64.exe by themselves, Click here to download
  2. Configure environment variables, "right click on the computer"-"Properties"-"Advanced System Settings"-"Environment Variables"-"User Variables"-"New"

  1. Connect the TB-RK1808 AI computing stick to the PC via USB

  2. A camera is required to run the demonstration. If the machine does not have a camera, an external USB camera is required

  3. Download the environment package: win_rknn_env.zip

  4. Introduction to environmental package files:

• download.bat: Double-click to run, it will automatically download related software packages to packages, and demo (yolov3) for demonstration

• install.bat: first manually install the ntb driver in the packages directory and python3.6.8; then double-click to run install.bat, it will automatically install rknn-toolkit

• run_yolov3.bat: Double-click to run, it will automatically run yolov3 demo, this file will be generated after running install.bat

Package installation

Installation package download

  1. Double-click to run download.bat and wait for the download to complete. After the download is complete, two directories packages and yolov3 will be added.

Driver Installation

Enter the packages directory and run the zadig-2.3.exe program as an administrator to install the driver of the computing stick, as shown in the following figure:

  1. Confirm the equipment to be installed and the driver to be installed.

Note: The USB ID of the device to be installed should be 2207:0018; select libusb-win32 (v1.2.6.0) as the driver to be installed, and click Install Driver to start installing the driver after confirmation.

  1. After the installation is successful, the following interface will appear:

After the installation is complete, if there is no exclamation mark in the USB of the Windows Device Manager, and the following is shown, the installation is successful:

Note: You need to restart the computer after installing the driver.

Install Python 3.6

  1. Enter the packages directory.

  2. Double-click python-3.6.8-amd64.exe to install, and you must check Add PATH.

Install RKNN-Toolkit

Before installing RKNN-Toolkit, you need to make sure that Python 3.6 has been installed in the system. This can be determined by executing python -version in cmd, as shown below, the system has Python 3.6 installed:

Double-click install.bat and wait for the automatic installation to complete.

Run the demo

Make sure the computing stick has been inserted, make sure there is a camera on the computer, if there is no built-in camera, you need to insert a USB camera.

Double-click run_yolov3.bat (this file is generated after running install.bat), wait for a while, show the screen, if you want to exit, click the display box with the mouse, and press the'Esc' key to exit.

Passive mode macOS host environment installation

This chapter explains how to use RKNN-Toolkit in the MacOS-system and Python3.6 environment.

Installation file download address: Click here to download

Preliminary preparation

  1. Operating system confirmation: MacOS 10.12 (x64) and above

  2. Connect the TB-RK1808 AI computing stick to the PC via USB

  3. A camera is required to run the demonstration. If the machine does not have a camera, an external USB camera is required.

  4. Download the environment package: mac_rknn_env.zip

  5. Put mac_rknn_env.zip in the Downloads directory of the PC and decompress it

  6. Introduction to environmental package files:

• download.sh.command: automatically download related software packages to packages, and demo (yolov3) for demonstration

• install.sh.commad: first manually install the Horndis driver and python3.6.8; then double-click to run install.sh.commad, it will automatically install rknn-toolkit

• rknn_camera_tiny.py.command: automatically run yolov3 demo

Installation package download

Double-click to run download.sh.command, the computer will install some programs at this time, and a pop-up window will prompt to install the software. After entering the password, click Confirm

Wait for the download to complete. During the download process, the download tool will be installed automatically. You may need to enter a password. The download tool installation will take a long time. After the download is complete, a new package directory will be added.

If there is an error that the third-party application cannot be installed, you need to execute sudo spctl --master-disable to allow any source application to be installed

Package installation

Driver Installation

  1. Enter the packages directory

  2. Double-click to install HoRNDIS-9.2.pkg

Install Python 3.6

  1. Enter the packages directory

  2. Double-click to install python-3.6.8-macosx10.9.pkg

Install RKNN-Toolkit

Double-click to run install.sh.command, the computer will automatically install some program packages, please be patient and wait for the installation to complete.

Run the demo

After the above steps are installed, you only need to run the following operations to start the demo program.

  1. Make sure the computing stick is plugged in, make sure there is a camera on the computer, if there is no built-in camera, you need to insert a USB camera.

  2. Double-click to run run_yolov3.sh.command (this file is generated after running install.sh.command)

  3. After waiting for a while, the demo screen will appear. If you want to exit, click the display box with the mouse and press the'Esc' key to exit.

Active mode development introduction and environment installation

Introduction to the active mode development process

Overview

Note: Do not modify the configuration of the computing stick, which means that the computing stick does not need to change the mode, and the default passive mode can be uniformly fixed.

In active mode, RK1808 artificial intelligence computing stick is a dedicated AI application module. RK1808 artificial intelligence computing stick is an active device. rknn-toolkit and rknn-api are installed by default inside the RK1808 artificial intelligence computing stick. The upper computer (also called host) does not need to install rknn-toolkit and rknn-api. The model and algorithm are solidified in RK1808. In the artificial intelligence computing stick, the upper computer only needs to input data (such as pictures and video streams) to the computing stick through the USB port. The RK1808 artificial intelligence computing stick automatically completes the pre-processing, inference, and post-processing of the data, and then passes the processing results through the USB port Output to the host computer. The host computer here can be any platform with USB interface and any operating system, including x86/x64/arm32/arm64 linux/windows/mac os and single-chip microcomputer, raspberry pie, etc...

In order to facilitate users to transfer data through the USB port, the RK1808 artificial intelligence computing stick will virtualize the USB port into a standard device such as a network card. Users only need to operate the standard device interface (such as network socket programming) to complete the RK1808 artificial intelligence computing stick. Data input and output.

Details as follow

  1. After the RK1808 computing stick is inserted into the host computer, it will be virtualized as a network card device

  2. The host computer configures the virtual network card, and the IP is 192.168.180.1 to ensure that the network connection between the host computer and 1808 is normal

  3. The default IP of the computing stick is 192.168.180.8, and the account password is toybrick. Users can log in to the computing stick with SSH, and copy the model and server service program to the computing stick.

  4. The computing stick end runs the server service program to receive the connection request from the upper computer, call RKNN for processing, and then return the result

  5. The host computer runs the client program and after successfully connecting to the server, it sends a reasoning request and obtains the return result from the 1808 end

Overall flow chart of active development mode:

AI development process in active mode

The AI program developed in the active mode is divided into two parts: the computing stick server program and the host computer client application.

• The model is pre-deployed on the storage of the computing stick. The computing stick server program initializes the environment and loads the model, starts the socket server, receives the data pushed by the host computer, performs inference, and then returns the result of the inference to the host computer.

• The host computer client application collects data (such as capturing camera data), pushes the data to the computing stick through the socket client, and receives the processing results returned by the computing stick through the socket client, and performs further processing (such as display).

RKNN API call reference on RK1808 artificial intelligence computing stick in active mode: "Rockchip_RK1808_Developer_Guide_Linux_RKNN".

The RK1808 artificial intelligence computing stick has provided the libraries and header files required by the RKNN API C/C++ language, and also pre-installed the RKNN API python 3.6 library. Users can develop and deploy C/C++ or C/C++ on the RK1808 artificial intelligence computing stick. Active AI program for python.

In the active mode, SSH login is provided for development and debugging: the linux operating system of the RK1808 artificial intelligence computing stick is fedora, and users can log in to the fedora system through SSH for development and debugging. The password of the root user is toybrick, and the password of the ordinary user toybrick is toybrick .

Development process based on Toybrick platform

  1. As a network card device (rndis), RK1808 artificial intelligence computing stick is configured into active mode through the web. For details, please refer to the web configuration introduction (if you need to restore the passive mode, please reset and select the passive mode).

  2. Set the toybrick_deploy login password.

  3. Use the active mode development tool toybrick_deployc to upgrade the system software package in the RK1808 artificial intelligence computing stick to ensure that the system software package in the RK1808 artificial intelligence computing stick is at the latest version. Toybrick maintains its own source server, and will update the system software package from time to time to increase system stability. This step depends on the user's needs to choose whether to update or not. If the existing system can meet the development needs, it may not be updated.

  4. The RK1808 artificial intelligence computing stick communicates with the upper computer through the network socket, writing the upper computer service program and the lower computer program of the RK1808 artificial intelligence computing stick, and installing the rpm and python dependency packages in the RK1808 artificial intelligence computing stick through the active mode development tool toybrick_deployc (If necessary), solidify the model and running program on the RK1808 artificial intelligence computing stick, and run the inference and related processing programs on the RK1808 artificial intelligence computing stick. The upper computer program receives the inference and related data processing results in the RK1808 artificial intelligence computing stick. .

  5. Use the active mode development tool toybrick_deployc to set the program solidified in the RK1808 artificial intelligence computing stick to start up, and restart the RK1808 artificial intelligence computing stick to verify whether the setting is successful and prepare for deployment.

Product deployment process

  1. Fix the model and algorithm on the RK1808 artificial intelligence calculation stick, and set the program solidified in the RK1808 artificial intelligence calculation stick to start automatically.

  2. Insert the RK1808 artificial intelligence computing stick into the target device, such as web camera equipment, PC, drone, smart car, etc.

  3. Run the host computer service program on the target device and display the processing result.

  4. For specific cases, please refer to the yolov3 active mode case in the wiki tutorial.

Active mode Android host computer environment installation

Main process

  1. Operating system confirmation: Android 8.1.0 (the demonstration device is Toybrick TB-RK3399ProD V1.3 version of the Android system, the development process of other Android platforms is for reference only).

  2. Connect the TB-RK1808 AI Compute Stick to a PC (win, Mac, Linux) via USB, configure the TB-RK1808 AI Compute Stick server environment, copy the server program that needs to be run to the TB-RK1808 AI Compute Stick and Set to start the server program at boot.

  3. Connect the TB-RK1808 AI Compute Stick to the Android device via USB, configure the TB-RK1808 AI Compute Stick and Android local network sharing (before configuration, please make sure that the Android device has installed the rndis driver to correctly identify the Compute Stick network card).

  4. A camera is required to run the demonstration. If the Android device does not have a built-in camera, an external USB camera is required.

  5. Install master_yolov3_demo.apk and run the demo program

For details, please refer directly to: yolov3 active mode Android platform development process

Active mode other system host computer environment installation

The active mode is suitable for any system on any platform. The upper computer only needs to be able to communicate via USB. rknn-toolkit and rknn-api are installed by default in the RK1808 artificial intelligence computing stick. The upper computer does not need to install rknn-toolkit and rknn-api. , The host computer only needs to send data to the computing stick through the Socket, the computing stick receives the data and infers, the computing stick sends the inference result to the host computer through the socket, and the host computer displays the result.

For active mode development, please directly refer to the related Demo of the active mode in the "Sample".

For the Raspberry Pi development board using the RK1808 computing stick, users can refer to http://t.rock-chips.com/forum.php?mod=viewthread&tid=1380&extra=page%3D1

Configure Compute Stick Network Sharing

Linux system configuration computing stick network sharing

RK1808 artificial intelligence computing stick can share the network by configuring the NAT function and bridging function of the Linux host computer to realize computing stick networking. NAT is recommended.

Linux system configuration NAT function

  1. If the host computer uses Fedora system

1) Open "Preferences" -> "Network Connections", open "Settings" -> "Network Connections" in Ubuntu system, "Wired connection 1" is the local network card link, "Wired connection 2" is the RK1808 artificial intelligence computing stick network card link, Select "Wired connection 2" and click "Configuration" as shown in the figure below.

2) Enter the "Wired connection 2" configuration interface, select "IPv4 Settings", select the "Manual" mode of connection, click "Add", enter Address and Netmask, as shown in Figure 5 below. Click "Save" to save and exit.

  1. If the host computer uses the Ubuntu system

1) Run ifconfig, you can see that eno1 is a local network card for accessing the external network, and enp0s20u12u2i1 is a USB network card (RK1808 artificial intelligence computing stick virtual network card). The name of the network card in different systems may be different, and the actual network card name shall prevail.

2) In command line mode, execute the following command, where enp0s20u12u2i1 needs to be modified to the user's local actual value; under normal circumstances, it only needs to be set once. If the network card name is changed or the user manually deletes the network card, it needs to be reset.

sudo nmcli connection add con-name toybrick type ethernet ifname enp0s20u12u2i1 autoconnect yes ip4 192.168.180.1/24
  1. To configure the NAT function, execute the following commands, among which eno1 needs to be modified to the user's local actual value; shutdown is invalid, so it must be reset every time the computer is restarted.
sudo sysctl   -w net.ipv4.ip_forward=1
sudo iptables -F
sudo iptables -t nat -F
sudo  iptables  -t  nat  -A POSTROUTING -o eno1 -j MASQUERADE

Linux system configuration bridging function (supporting dhcp use)

  1. The calculation stick needs to turn on DHCP. Refer to point 8 of the main function introduction on the WEB page to set it.

  2. Create the configuration script bridge-setup.sh with the following content:

#!/bin/bash
if [ $# -lt 2 ]; then
     echo "Invalid argument"
     exit 0
     fi
count=`nmcli con show | awk '$(NF-1)=="bridge"' | wc -l`
for i in $(seq 1 $count)
do    
    uuid=`nmcli con show | awk '$(NF-1)=="bridge"' | awk '{print $(NF-2)}'`
    sudo nmcli con del $uuid
    sleep 1
done
count=`nmcli con show | awk '$(NF-1)=="802-3-ethernet" || $(NF-1)=="ethernet"' | wc -l`for i in $(seq 1 $count)
do    
      uuid=`nmcli con show | awk '$(NF-1)=="802-3-ethernet" || $(NF-1)=="ethernet"' | awk 'NR==1{print $(NF-2)}'` 
      sudo nmcli con del $uuid
      sleep 1
      done
nmcli con add con-name br0 type bridge ifname br0 -- ipv4.routes 192.168.180.0/24 ipv4.method auto bridge.stp no
#nmcli con add con-name $1 type bridge-slave ifname $1 master br0
#nmcli con add con-name $2 type bridge-slave ifname $2 master br0
for var in $@
do    
    nmcli con add con-name $var type bridge-slave ifname $var master br0
donen
mcli con up br0
ip addr add 192.168.180.1/24 dev br0
  1. Create the cleanup script bridge-clean.sh with the following content:
#!/bin/bash
if [ $# -ne 2 ]; then    
     echo "Invalid argument"    
     exit 0
fi
count=`nmcli con show | awk '$(NF-1)=="bridge"' | wc -l
`for i in $(seq 1 $count)
do    
     uuid=`nmcli con show | awk '$(NF-1)=="bridge"' | awk '{print $(NF-2)}'`    
     nmcli con del $uuid    
     sleep 1
done

count=`nmcli con show | awk '$(NF-1)=="802-3-ethernet" || $(NF-1)=="ethernet"' | wc -l`
for i in $(seq 1 $count)
do    
    uuid=`nmcli con show | awk '$(NF-1)=="802-3-ethernet" || $(NF-1)=="ethernet"' | awk 'NR==1{print $(NF-2)}'`    
    nmcli con del $uuid    
    sleep 1
done

nmcli con add con-name $1 type ethernet ifname $1
nmcli con up $1
nmcli con add con-name $2 type ethernet ifname $2 ipv4.addr 192.168.180.1/24 ipv4.method manual
nmcli con up $2 
  1. Take the Ubuntu system as an example, eno1 is the local network card, used to access the external network. enp0s20u12u2i1 is a USB network card (RK1808 artificial intelligence computing stick virtual network card). The name of the network card in different systems may be different, and the actual network card name shall prevail.

  1. To configure the bridging function, execute the following commands:
sudo ./bridge-setup.sh eno1 enp0s20u12u2i1

If there are multiple USB network cards, you can configure the bridge function with the USB network card name as a parameter according to actual needs.

  1. To clear the bridge function, execute the following command:
sudo ./bridge-clean.sh eno1 enp0s20u12u2i1

Precautions:

*1. Calculation** In the DHCP mode, if there is an abnormality in obtaining the address, please execute *

sudo rm /var/lib/dhclient/dhclient.leases

Delete the record, and then restart the Compute Stick.

2. If the NAT or bridge configuration of the host computer fails and the computing stick cannot be connected to the Internet, please find a host computer with a newly installed system to configure the NAT or bridge to avoid the failure of the NAT or bridge configuration due to the unclean system of the host computer.

Window7/10 system configuration computing stick network sharing

RK1808 artificial intelligence computing stick can share the network by configuring the NAT function and bridging function of the Windows host computer to realize computing stick networking. It is recommended to use NAT.

Window7/10 system ** configure NAT function

  1. Open "Network and Sharing Center" -> "Change Adapter Settings", "Local Connection" is the local network card device, and "Local Connection 2" is the computing stick network card device (the one with RNDIS means the computing stick network card device).

  1. Select "Local Connection", right-click to open "Properties" -> "Sharing", check "Allow other network users to use the Internet connection of this computer to connect", click "Please a dedicated network link", select "Local Connection" 2", click "OK" to exit. After clicking "OK", you will be prompted that the ip address of the virtual network card may be changed, so you need to modify the ip address. Refer to step 3 to modify the ip address.

Note: If the Windows 10 system may not have the "Local Connection 2" option, please change to another Windows 10 computer and re-configure.

  1. Select "Local Area Connection 2", right-click to open "Properties" -> "Network", select "Internet Protocol Version 4 (TCP/IPv4)", click "Properties", modify the "IP address" to 192.168.180.1, and click "OK" to exit.

  1. Open "Windows Firewall" -> "Custom Settings", turn off the firewall, and click "OK" to exit.

Windows7/10 system bridge configuration

  1. The calculation stick needs to turn on DHCP. Refer to point 8 of the main function introduction on the WEB page to set it.

  2. Open "Control Panel" -> "Network and Sharing Center" and enter "Change Adapter Configuration".

Among them, "local connection" is the local network card, and "local connection 2" is the computing stick network card.

  1. Select "Local Area Connection" and "Local Area Connection 2" at the same time, right-click and select "Bridge" to complete the bridge configuration.

  1. Open the command prompt window with administrator privileges and enter "route PRINT" to view the bridge interface serial number. As shown in the figure below, the bridge interface serial number is 51. The specific bridge interface serial number is subject to actual conditions.

  1. Open the command prompt window with administrator privileges. For example, the IP address of the computing stick is 192.168.180.8, and enter "route ADD 192.168.180.8 MASK 255.255.255.255 192.168.180.8 IF 51" to add routing information.

  2. If the PC is not connected to the external network to configure the bridge, you need to configure the bridge interface to a static address: 192.168.180.1.

Precautions:

If the nat or bridge configuration of the host computer fails, and the computing stick cannot be connected to the Internet, please find a host computer with a newly installed system to configure the nat or bridge to avoid the nat or bridge configuration failure due to the dirty system of the host computer.

Configure Compute Stick Network Sharing on macOS

macOS Configure Network Sharing (NAT)

  1. Open "System Preference" and select "Network".

  2. Select RK1808S0, configure ip address

  1. Enable forwarding
sudo sysctl -w net.inet.ip.forwarding=1
sudo sysctl -w net.inet6.ip6.forwarding=1
  1. Create a new toybrick file in the /etc/pf.anchors directory with the following content (en0 is the local network card, and en6 is the computing stick network card. The value is not fixed. The actual value of the user is subject to the user's local actual value. The user can view it through ifconfig):
nat on en0 from en6:network to any -> (en0)
  1. Modify /etc/pf.conf as follows:
scrub-anchor "com.apple/*"
nat-anchor "com.apple/*"
nat-anchor "toybrick"
rdr-anchor "com.apple/*"
dummynet-anchor "com.apple/*"
anchor "com.apple/*"
anchor "toybrick"
load anchor "com.apple" from "/etc/pf.anchors/com.apple"
load anchor "toybrick" from "/etc/pf.anchors/toybrick"
  1. Enable configuration file
sudo pfctl -ef /etc/pf.conf

macOS configuration bridged network

  1. The calculation stick needs to turn on DHCP. Refer to point 8 of the main function introduction on the WEB page to set it.

  2. Open "System Preference" and select "Network".

  1. Select "Manage Virtual Interfaces..." to configure bridging.

  1. Select "Ethernet" and "RK1808S0", where "Ethernet" is the local network card, and "RK1808S0" is the computing stick network card.

  1. Click "Create" to create the bridge configuration, and finally click "Apply" to complete the bridge configuration.

  2. Configure the IP address:

ifconfig *** alias 192.168.180.1

Note: *** refers to the actual Bridge Name

Precautions:

If the nat or bridge configuration of the host computer fails, and the computing stick cannot be connected to the Internet, please find a host computer with a newly installed system to configure the nat or bridge to avoid the nat or bridge configuration failure due to the dirty system of the host computer.

Android configuration computing stick network sharing

Run the configuration script manually

The demonstration device is the Android system of Toybrick TB-RK3399ProD V1.3. The development process of other Android platforms is for reference only.

Note: Android configuration network commands need to root the Android machine. Please make sure that the Android machine correctly obtains root privileges and installs the rndis driver. If you need to run the script on startup, you need to modify the Android source code to re-write the Android firmware according to the standard Android startup process. If you do not set the startup, you need to reset it every time you restart.

  1. The calculation stick needs to turn on DHCP. Refer to point 8 of the main function introduction on the WEB page to set it.

  2. Download the script and download it to the Android device

Configuration script: cfgainetd.sh

Network tool: ethtool

Download link :imgcfgainetd.zip

Use adb push to push the script to the Android device

adb root && adb remount
adb push cfgainetd.sh /data
adb push ethtool /data
  1. Set script execution permissions

The script file that uses adb push does not have executable permissions. We need to use the chmod command to add executable permissions

E:\master_yolov3_demo>adb shell
rk3399_mid:/ # cd data/
rk3399_mid:/data # ls -la cfgainetd.sh ethtool
-rw-rw-rw- 1 root root    2052 2020-01-02 08:01 cfgainetd.sh
-rw-rw-rw- 1 root root 1369842 2019-12-31 09:42 ethtool
rk3399_mid:/data # chmod a+x cfgainetd.sh ethtool
rk3399_mid:/data # ls -la cfgainetd.sh ethtool
-rwxrwxrwx 1 root root    2052 2020-01-02 08:01 cfgainetd.sh
-rwxrwxrwx 1 root root 1369842 2019-12-31 09:42 ethtool 
rk3399_mid:/data #
  1. Run the script

Insert the RK1808 artificial intelligence computing stick into the Android device. Then execute the script in the background.

E:\master_yolov3_demo>adb shell
rk3399_mid:/ # nohup /data/cfgainetd.sh > /dev/null 2>&1 &
[1] 4180
rk3399_mid:/ #
  1. Verify whether the execution of cfgainetd.Sh is successful

When the RK1808 artificial intelligence computing stick is inserted and the script is executed normally, you can see through ifconfig that the network card of the RK1808 artificial intelligence computing stick is assigned to ip, and if there is an abnormality, it is not assigned to ip.

Failure conditions:

rk3399_mid:/ # ifconfig -a
lo        
           Link encap:Local Loopback          
           inet addr:127.0.0.1  Mask:255.0.0.0          
           inet6 addr: ::1/128 Scope: Host          
           UP LOOPBACK RUNNING  MTU:65536  Metric:1          
           RX packets:29981 errors:0 dropped:0 overruns:0 frame:0          
           TX packets:29981 errors:0 dropped:0 overruns:0 carrier:0          
           collisions:0 txqueuelen:1          
           RX bytes:2752109 TX bytes:2752109

eth1      Link encap:Ethernet  HWaddr ec:26:ae:2a:b6:e4          
          BROADCAST MULTICAST  MTU:1500  Metric:1          
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0          
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0          
          collisions:0 txqueuelen:1000          
          RX bytes:0 TX bytes:0
eth0      Link encap:Ethernet  HWaddr f2:16:66:a4:5b:0b          
          inet addr:172.16.9.10  Bcast:172.16.9.255  Mask:255.255.255.0          
          inet6 addr: fe80::f016:66ff:fea4:5b0b/64 Scope: Link          
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          
          RX packets:1585 errors:0 dropped:0 overruns:0 frame:0          
          TX packets:94 errors:0 dropped:0 overruns:0 carrier:0          
          collisions:0 txqueuelen:1000          
          RX bytes:118419 TX bytes:8392          
          Interrupt:24
rk3399_mid:/ # route    //或者  busybox route 
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.16.9.0      *               255.255.255.0   U     0      0        0 eth0
rk3399_mid:/ #

The configuration is successful, you can see inet addr:192.168.180.1

130|rk3399_mid:/ # ifconfig -a
lo        Link encap:Local Loopback          
          inet addr:127.0.0.1  Mask:255.0.0.0          
          inet6 addr: ::1/128 Scope: Host          
          UP LOOPBACK RUNNING  MTU:65536  Metric:1          
          RX packets:36959 errors:0 dropped:0 overruns:0 frame:0          
          TX packets:36959 errors:0 dropped:0 overruns:0 carrier:0          
          collisions:0 txqueuelen:1          
          RX bytes:3391375 TX bytes:3391375
eth1      Link encap:Ethernet  HWaddr ec:26:ae:2a:b6:e4          
          inet addr:192.168.180.1  Bcast:192.168.180.255  Mask:255.255.255.0        
          inet6 addr: fe80::ee26:aeff:fe2a:b6e4/64 Scope: Link          
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          
          RX packets:59 errors:0 dropped:0 overruns:0 frame:0          
          TX packets:53 errors:0 dropped:0 overruns:0 carrier:0          
          collisions:0 txqueuelen:1000          
          RX bytes:2048 TX bytes:4978
eth0      Link encap:Ethernet  HWaddr f2:16:66:a4:5b:0b          
          inet addr:172.16.9.10  Bcast:172.16.9.255  Mask:255.255.255.0          
          inet6 addr: fe80::f016:66ff:fea4:5b0b/64 Scope: Link          
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          
          RX packets:1854 errors:0 dropped:0 overruns:0 frame:0          
          TX packets:94 errors:0 dropped:0 overruns:0 carrier:0          
          collisions:0 txqueuelen:1000          
          RX bytes:139777 TX bytes:8392          
          Interrupt:24
rk3399_mid:/ # route    //或者  busybox route 
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.16.9.0      *               255.255.255.0   U     0      0        0 eth0
192.168.180.0   *               255.255.255.0   U     0      0        0 eth1
rk3399_mid:/ #

Precautions:

If the nat or bridge configuration of the host computer fails, and the computing stick cannot be connected to the Internet, please find a host computer with a newly installed system to configure the nat or bridge to avoid the nat or bridge configuration failure due to the dirty system of the host computer.

Host network configuration and WEB login

Note: The web of the computing stick is disabled by default. To enable web, you can log in to the computing stick through SSH and modify the configuration file /etc/toybrick.conf under root privileges, setting web=on;

RK1808 artificial intelligence computing stick supports the use of web interface for system configuration. The following describes how to access this configuration interface and the main functions of the interface.

Host network configuration

Network configuration under Windows 7/10:

  1. Insert RK1808 artificial intelligence computing stick.

  2. Open the device manager, and in the network adapter module, "Remote NDIS based Internet Sharing Device" will appear.

Note: Some computers will have unrecognized devices. Uninstall the unrecognized devices and wait for the RNDIS driver to be reinstalled.

  1. Open the network and Internet settings, click "Ethernet" -> "Change adapter options".

  1. Right-click "Ethernet*" (remote NDIS compatible device), -> "Properties" -> "Internet Protocol Version 4", -> "Properties", select "Use the following IP address", enter the IP address and subnet mask Code, click "Confirm".

1.png)

  1. Confirm the IP address.

Network configuration under Linux (take ubuntu18.04 as an example)

  1. Before inserting the RK1808 AI calculation stick, first open the terminal on the host computer and enter the command ifconfig.

  1. Then insert the RK1808 artificial intelligence computing stick, enter the command ifconfig on the host computer again, and find that there is an additional item in the red box in the figure.

  1. Open the system settings, select Network, find the newly added device with the same Mac address in the second step, and click Settings in the upper right corner.

  1. According to the following figure, select ipv4, manually, add new ip - 192.168.180.1 255.255.255.0, and click Apply to complete the network configuration.

Network configuration under MAC OS

  1. Open "System Preference" and select "Network".

  2. Select RK1808S0 and configure the ip address.

WEB login

  1. After the network configuration is completed, modify /etc/toybrick.conf, set the web to on mode, and enter http://192.168.180.8 in the browser to enter the RK1808 artificial intelligence computing stick login page.

If you forget the password, please click the link below. This operation will not only reset the password, but also restore the computing stick web configuration to the factory settings. Please operate with caution:

  1. Enter the user name and password to log in (the default user name and password are both toybrick) to enter the Home page.

Model encryption and decryption

Introduction

In order to protect the model stored in emmc from being illegally copied, some customers need a method of encrypting the model to protect the model. Rockchip provides users with a unified data encryption and decryption interface. The encryption and decryption keys of each device are different. Customers can use this interface to encrypt and decrypt models. Hackers copy the model illegally to other devices and it will not work properly.

installation

To use this function, you need a computing stick to burn the firmware v1.4.1 and above, or use the sudo dnf update command to update

Follow "Wiki Tutorial"-"TB-RK1808S0"-"Configure Compute Stick Network Sharing" to confirm that the Compute Stick can be connected to the Internet normally

ssh toybrick@192.168.180.8 login to the computing stick

sudo dnf install rk-tee-service

test

vi test.c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "rockchip/rk_tee_service_host.h"

int main(int argc, char *argv[])
{
    int test_size = 64*1024+110;
    unsigned char *plaint = malloc(test_size);
    memset(plaint, 0x11, test_size);
    unsigned char *cipher = malloc(test_size);
    unsigned int cipher_len = test_size;
    unsigned char *plaint2 = malloc(test_size);
    unsigned int plaint2_len = test_size;


    rk_encrypt_data(plaint, test_size, cipher, &cipher_len);
    printf("cipher_len=%d\n", cipher_len);
    rk_decrypt_data(cipher, cipher_len, plaint2, &plaint2_len);
    printf("plaint2_len=%d\n", plaint2_len);
    if (memcmp(plaint, plaint2, plaint2_len) == 0)
        printf("success!\n");
    else
        printf("fail!\n");
}

gcc test.c -o test -lrktee_service

sudo ./test

Firmware online upgrade

Online upgrade can upgrade the firmware of the computing stick to the latest version.

First, configure the host computer to connect to the external network according to "Configure Compute Stick Network Sharing", and then insert the computer stick into the USB port of the host computer. After the computer stick is started, there are two ways to perform the calculation stick upgrade:

One way is to log in to the webpage http://192.168.180.8 of the computing stick through the web , and click the Update button on the Update page to upgrade;

Another way is to log in to the computing stick through ssh and execute the sudo dnf update -y command in the shell to upgrade;

After the upgrade is complete, check the software version information on the web page, or check the version information by executing rpm -qa | grep toybrick-server under the shell.

Online upgrade of python wheel pack for rknn toolkit lite:

  1. ssh login computing stick: ssh toybrick@192.168.180.8 , password toybrick;

  2. execute the pip3 upgrade in the following order: (Note: must be under the root user)

    sudo su;
    
    pip3 install --upgrade pip;
    
    ln -s /usr/local/bin/pip /usr/bin/pip;
    
    ln -s /usr/local/bin/pip3 /usr/bin/pip3;
    
    ln -s /usr/local/bin/pip3.6 /usr/bin/pip3.6;
    
    exit;
    
  3. execute pip3 install rknn-toolkit-lite --user --upgrade in shell. (Note: Must be under the toybrick user)

Note: When the upgrade is unsuccessful, first check whether the computing stick is available through the upper computer network, you can log in to the computing stick with SSH, and execute sudo pingimgwww.baidu.com on the computing stick to see if you can ping the external network.

Firmware burning

Windows needs to install the USB driver first

Downloaddownload burning tool and firmware.

First insert the calculation stick into the PC for 1 minute to confirm that the PC recognizes the calculation stick, and then plug and unplug the calculation stick on the PC for 5 times. Each insertion time is 3 to 8 seconds, and the calculation stick becomes a burnable maskrom state.

Then perform the following programming steps:

  1. Under windows: Double-click to run windows_flash.exe in the windows directory, open the flashing tool, click the execute button, start flashing, and wait for the flashing to complete.

  2. Under Mac: Double-click to run mac_flash.sh.command in the unix directory, and according to the prompt, enter the password for booting, and wait for the programming to be completed.

  3. Under Linux: In the command line, cd unix, then run ./linux_flash.sh, follow the prompts, enter the sudo password, and wait for the programming to be completed.

If the user plugs and unplugs on the PC 5 times, the maskrom state cannot be entered

Users can refer to "wiki--WEB configuration introduction" to set the host network configuration, then windows users open cmd.exe and enter ssh toybrick@192.168.180.8 to log in to the computing stick (win7 needs to install openssh first), linux users enter ssh toybrick on the command line @192.168.180.8 Log in to the computing stick, execute sudo reboot loader on the computing stick to make the computing stick enter the loader mode, and then perform the above burning steps.

note:

1. Flashing firmware is risky. Please be cautious. Please do not cut off the power during the firmware programming process. Please strictly follow the official operation steps. It is forbidden to burn firmware other than the official release.

2. It is recommended to upgrade the firmware online.

Products Store Community Wiki Download About TB


To Top