MongoPi-R3 Micro Controller/Development Board Linux Wiki - DFRobot


This micro development board is specially designed to run Linux. Despite a mini body, it has all the vital functions. Equipped with F1C200S as the maincontroller chip, the board offers various commonly-used peripheral ports: GPIO, I2C & SPI, SDIO, Audio port(record, play), Video(RGB565 Display, touch, DVP), USB Host, OTG, etc. Besides, the board comes with a built-in 64MB DDR and onboard 128MB Nand Flash, which fully supports Linux ecology and running complete Python.

Currently, this product is fully open source so that users are allowed to compile any module according to their own requirements. However, it’s mainly for Python developers and senior enthusiasts as it’s a little difficult to get started.


1. Driver Installtion on Windows

If you are a Windows user, you will need to install a driver when using this MangoPi-R3.

1.1 Download the zadig driver installation helper

Click to download: zadig-2.5.exe

Original Link:

1.2 Install FEL mode Driver

Select Device -> Create New Device


The input box turns available for input.


Input the driver and USB ID as the image below ( USB ID must be corresponding ), click Install Driver.


Wait for the driver to be installed.


1.3 Install DFU mode Driver

Select Device -> Create New Device


The input box turns available for input.


Input the driver and USB ID as the image below ( USB ID must be corresponding ), click Install Driver.


Wait for the driver to be installed


Firmware Burning

Since the interface is multiplexed, the camera and SPI cannot be used at the same time. So, the firmware is divided into "camera firmware" and "spi firmware". Users can burn them according to their needs.
The current firmware version is version 0.2, click on the link below to download the firmware.

2.1 Burning on Windows

SPI NAND Flash Burning Tool

The software is a burning soft tool developed specifically for F1C100S/F1C200S chips and operates in Windows.

Software Download

Click to download SPI NAND Flash Tool

Software interface. The software will automatically get the port number and the main control IC model after it runs.


How to use the software

  1. After running the software, it will automatically get ports as the following picture shows.

  2. Connect the computer to the TTL and OTG of the MangoPi-R3 (both interfaces need to be connected to the computer) and wait for the software to acquire the board serial port and SOC.

If "COM port found:" is displayed, and the SOC recognizes and displays it, indicating that the next step can be made.


  1. Click Erase Flash, coming “Please press BOOT and RST buttons, and release to enter FEL mode”, then go on as the steps below:

1) Press the BOOT button on the board 2) Press the RST button 3) Release the BOOT button 4) Release the RST button


  1. The erase will be completed until it shows “Erase completed”

warning_yellow.png NOTE: This step is very necessary, which is also set in the software that if not to erase Flash, it cannot write in the firmware.


Camera firmware package file path: Camera_firmwareV0.2\output\images\u-boot-sunxi-with-nand-spl.bin

SPI firmware package file path: SPI_firmwareV0.2\output\images\u-boot-sunxi-with-nand-spl.bin

Camera firmware package file path: Camera_firmwareV0.2\output\images\devicetree.dtb

SPI firmware package file path: SPI_firmwareV0.2\output\images\devicetree_i2c_spi.dtb

Camera firmware package file path: Camera_firmwareV0.2\output\images\zlmage

SPI firmware package file path: SPI_firmwareV0.2\output\images\zlmage

Camera firmware package file path: Camera_firmwareV0.2\output\images\rootfs.ubi

SPI firmware package file path: SPI_firmwareV0.2\output\images\rootfs.ubi



  1. Click the Write button in turn to start burning. When "Please press BOOT and RST buttons, and release to start burning" appears, follow the order of operations: 1)Press the BOOT button on the board 2)Press the RST button 3)Release the BOOT button 4)Release the RST button

Wait for the burn. The successful burning will be indicated by the appearing “Burning completed successfully”, then click the next Write button.


  1. After completing all the burning steps, "Please press RST button to restart system..." will appear, indicating that the burning is done!


Press the RST button on the board and the new system starts working!

2.2 Burning on Linux (Use Command Line)

Install Burning Tool

What is sunxi-tools?

sunxi-tools is a command line tools collection for ARM devices with Allwinner SoC (Intelligent Application Processor Soc developed by Allwinner Technology).

Set up and install sunxi-tools

Install dependency packages

sudo apt install pkg-config zlib1g-dev libusb-dev libusb-1.0-0-dev


Download codes

git clone -b f1c100s-spiflash


Compile and install

cd sunxi-tools
sudo make install


What is dfu? Device Firmware Upgrade (DFU) is a mechanism independent of distributor and equipment, which is used to upgrade the firmware of a USB device through improved versions provided by its manufacturer, thereby offering (for example) a method of deploying firmware error repairing. During the firmware upgrade operation, the USB device will effectively change its operating mode, thus becoming a PROM programmer. Following the official DFU specification, any type of USB device can implement this function. DFU also allows users to freely use backup firmware to refresh USB devices. One of the results is that the refreshed USB device may act as a variety of device types.

What is dfu-util? dfu-util is a host (PC) program that implements the USB DFU (Universal Serial Bus Device Firmware Upgrade) protocol. DFU will download the firmware to the device that connected by USB, or download the firmware from the device. Its application ranges from small devices such as micro-controller boards to mobile phones devices. Using dfu-util, you can download/upload firmware to/from DFU-enabled devices.

Install dfu-util through apt-get

sudo apt install dfu-util


Burn firmware

Download firmware


Decompress the firmware

Create a folder (mkdir ll) --> move the compressed package (mv ll) --> decompress the compressed package (unzip


What is putty?

putty is a Telnet, SSH, and serial interface connection software.

Install the serial port tool putty

sudo apt-get install putty


Open the serial port debugging software putty

In the case of default installation, putty is added to the /usr/bin directory, so you can directly use the putty command in the terminal to open it.


Get the serial port address

Connect the board to the computer, use the command dmesg | grep tty, view serial device information.


From this, we can get that the serial port of the board is ttyUSB0

Generally, the name of the serial port is under dev, which if you don't have an external serial port card, the default is dev.

Use the command ls /dev/ttyUSB0 to see if it exists


If the result exists, then the serial port address is /dev/ttyUSB0

Fill the serial port in putty, and then open the serial port to format


Enter the firmware folder (the location where the firmware is stored)


Press the boot button and rst button of tiny200 at the same time, then release

Run the .\ script at this time


Then wait for the completion of the operation, and then enter mtd erase spi-nand0, format it.


Add file permissions

Use the ll command to view file permissions.

If the file does not have execute permissions, you need to add permissions, adding permissions through the following command.

chmod +x
chmod +x


If adding permissions fails, you can try to add sudo (ie sudo chmod +x in front of the command, or you can switch to the administrator account (su), and then add permissions.

Start burning

Enter the firmware folder ().

Press the boot button and rst button of tiny200, then release the rst button and run the following command.

sudo ./ && ./



Verify whether Mango-Pi is successfully burned

Press the RST button of Mango-Pi, enter the operational mode.

Need to wait for more than 10s if you use it for the first time.

Testing through ifconfig


A network card adapter with the address of appears, which proves that the programming is successfully burned.

The Python environment has been built in, the version is Python 3.8.5

Connect the mainboard


RNDIS refers to Remote NDIS. The implementation of RNDIS based on USB is actually TCP/IP over USB, which is to run TCP/IP on the USB device, it make the USB device act like a network card. We can access the motherboard through the network protocol.

RNDIS driver installation

Use a usb data cable to connect the OTG socket on the Mango-Pi board, connect the board to the computer.

Windows driver download address

Step 1. Open "Device Manager"

Open the menu with Win+X, select "Device Manager"


Step 2. Right-click and select the port which represent the Mango-Pi board

Mango-Pi in my case is a USB serial device (COM43)

Step 3. Install Driver

Select "Update Driver" >>> Select "Browse my computer for finding driver

Click "Browse" to locate the folder where the RNDIS driver is. Click "Next", wait for a while, it will show that the driver is installed successfully.

Step 4. Check that if the driver is installed successfully

After the driver is installed, "USB Ethernet/RNDIS Gadget" will appear in the device manager.

ps: "#3" behind USB Ethernet/RNDIS Gadget is meaningless.

图片 英文

About the functions of the two USB ports on Mango-Pi.

They are TTL and OTG interfaces

TTL interface

The TTL interface is leads out from the CP2104 chip, it converts the UART0 of the F1C200S chip into a USB serial port, we can use it as a serial port terminal on the motherboard.

OTG interface

The OTG interface is a interface that leads out the USB port of the F1C200S chip, we simulate the USB port of the F1C200S chip as an RNDIS device, which becomes a USB network card that connected to the board under the action of RNDIS driver.

We use the SSH protocol to remotely control the motherboard, use the sftp protocol to remotely transfer files. We recommend two commonly used software, one is PyCharm (commercial version), the other is MobaXterm.


PyCharm is a Python IDE, it has a set of tools that can help users become more efficiency when they are using Python language development, and also provides SSH remote control, sftp remote transmission functions.

Use PyCharm to connect to the mainboard

Connect the board, notice: the access point is the OTG interface of Mango-Pi.

1) Click Tools->Deployment->Configuration on the Pycharm tab


2) On the pop-up window, click the "+" sign, select "SFTP", create a remote server configuration


3) Then enter the remote server name on the pop-up window, click "ok"


4) Modify the SSH configuration, determine whether it can be connected through Test Connection, the Root path can be determined through Autodetect button.


5) Click Tools->Deployment->Browse Remote Host on the Pycharm tab


Then the following screen will appear.


At this point, the connection to the motherboard is completed.

Compile and run the hello dfrobot program

1) Right-click on the blank space of the Remote Host window, select File under New, create a py file, and name it



2) Write the script, and click the upload button (the red box), upload the content to Mango-Pi


3) Run

Click Tools->Start SSH Session on the Pycharm tab


In the pop-up window, select the previously configured SSH configuration information.


Then enter "python" in the pop-up window, and press Enter.



Mobaxterm is a fully functional and free to use terminal tool, it supports multiple remote terminal access methods such as SSH, Serial, VNC, X11, etc.

After installing it, we can remotely control all linux remote hosts.

Install MobaXTerm

Step 1 Create a session

Select "Session"


Select the session type "SSH"

In the "Remote host" box, fill in "", select "Specify username", and then write "root"


Click "OK", enter the session interface.

Step 2 Enter the session interface

Enter the password: dfrobot ------> The password entered here will not be displayed

Then press enter.


After pressed "enter", it will enter the session interface.


The sftp window on the left side can be used for file editing, the ssh window on the right side is used for command interaction.

Install pinpong Library

To be completed....

4. Control mainboard resources

4.1 GPIO


Mapping pin formula: 32×pin group serial number + pin sub-number = mapped pin number

Pin Group

Pin Classification Mapped Serail Number
Pin start with PA 0
Pin start with PB 1
Pin start with PC 2
Pin start with PD 3
Pin start with PE 4
Pin start with PF 5

And so on.


Start Mapping

# ls /sys/class/gpio
export  gpiochip0  unexport
# echo 132 > /sys/class/gpio/export
# ls /sys/class/gpio/
export     gpio132    gpiochip0  unexport
echo out > /sys/class/gpio/gpio132/direction
echo 1 > /sys/class/gpio/gpio132/value # Set GPIO output high level
echo 0 > /sys/class/gpio/gpio132/value # Set GPIO output low level
echo in > /sys/class/gpio/gpio133/direction
#cat /sys/class/gpio/gpio133/value
#echo 132 > /sys/class/gpio/unexport
#ls /sys/class/gpio
export  gpiochip0  unexport

Control GPIO via Pinpong

Make the LED blink.

import time
from pinpong.board import Board, Pin

b = Board("F1C")
led = Pin(3, Pin.OUT)

while True:

Connect an LED light to pin 131 (PE3)


The LED flashes after running the program.

Turn on/off the LED.

import time
from pinpong.board import Board, Pin

pyb = Board("PYB").begin()
btn = Pin(130, Pin.IN)
led = Pin(131, Pin.OUT)

while True:
    v = btn.value()

Connect an LED light to pin 131 (PE3); Connect a button to pin 130 (PE2)


After running, you can turn on and off the LED lights by pressing the button

4.2 LCD Screen



Operate the LCD

Plug the LCD cable into the motherboard socket

Check the screen interface

# ls /dev/fb0

Check the result

Power on, start the system.


#echo hello dfrobot > /dev/tty1


4.3 Camera (please install camera firmware)


Start taking photo

Set image format

media-ctl --set-v4l2 '"ov2640 0-0030":0[fmt:YUYV8_2X8/640x480]'


fswebcam -d /dev/video0 --no-banner -r 640x480 -S 10 1.jpg


Check the result

Here, I set up a file server to get the pictures

python -m http.server 8081





4.4 Record/Play



Connect a speaker to the port OUT+ and OUT-.

Modify the configuration file


How to modify?

Modify command: tinymix set serial Number Content

For Example: tinymix set 2 1 Modify the value of the term which the serial number is 2 to on.


Modify it like this

Number of controls: 25
ctl     type    num     name                                    value
0       INT     1       DAC Playback Volume                     63 (range 0->63)
1       INT     1       Headphone Playback Volume               63 (range 0->63)
2       BOOL    2       Headphone Playback Switch               On, On
3       INT     1       Line In Playback Volume                 0 (range 0->7)
4       INT     1       FM In Playback Volume                   0 (range 0->7)
5       INT     1       Mic In Playback Volume                  3 (range 0->7)
6       INT     1       Mic Boost Volume                        4 (range 0->7)
7       INT     1       ADC Capture Volume                      3 (range 0->7)
8       BOOL    1       ADC Mixer Right Out Capture Switch      Off
9       BOOL    1       ADC Mixer Left Out Capture Switch       Off
10      BOOL    1       ADC Mixer Line In Capture Switch        Off
11      BOOL    1       ADC Mixer Right FM In Capture Switch    Off
12      BOOL    1       ADC Mixer Left FM In Capture Switch     Off
13      BOOL    1       ADC Mixer Mic Capture Switch            On
14      BOOL    1       Left Mixer Right DAC Playback Switch    Off
15      BOOL    1       Left Mixer Left DAC Playback Switch     Off
16      BOOL    1       Left Mixer FM In Playback Switch        Off
17      BOOL    1       Left Mixer Line In Playback Switch      Off
18      BOOL    1       Left Mixer Mic In Playback Switch       Off
19      BOOL    1       Right Mixer Left DAC Playback Switch    Off
20      BOOL    1       Right Mixer Right DAC Playback Switch   Off
21      BOOL    1       Right Mixer FM In Playback Switch       Off
22      BOOL    1       Right Mixer Line In Playback Switch     Off
23      BOOL    1       Right Mixer Mic In Playback Switch      Off
24      ENUM    2       Headphone Source Playback Route         , DACMixer, , DACMixer

Start Playing Audio

tinplay 001.wav


Start Recording

tinycap 1.wav -d 0 -c 1 -r 44100 -b 16

Press Ctrl + C to end recording.


Check the recording result

tinplay 1.wav


4.5 I2C



Connect the OLED screen to Mango-Pi

Connect VCC, GND, SCL, and SDA to the corresponding positions on the Mango-Pi board.

Screen Pin Mango-Pi Pin

Write Script

import time
from pinpong.board import Board
from pinpong.libs.dfrobot_ssd1306 import SSD1306_I2C #Import ssd1306 library


oled=SSD1306_I2C(width=128, height=64, bus_num=0) #Initializes the screen, transmits in the numbers of screen pixels

while True:
  oled.fill(1) #fully filled display #Display is valid

  oled.fill(0) #turn off fully filled, clear the screen #Display is valid

  oled.text(0) #Display numbers
  oled.text("Hello PinPong",8,8) #Display texts at specified location  #Display is valid

Check the result

Use the following command to verify if it succeeded.




4.6 SPI(Use SPI Firmware)


Connect the TFT LCD screen to Mango-Pi

Connect DC, RES, CS, MISO, MOSI, SCLK, GND, VCC to the corresponding positions on the tiny200 board in turn.

Screen Pin Mango-Pi Pin Pinpong Pin
DC PE5 133
RES PE4 132
CS PE7 135
MISO PE10 138
MOSI PE8 136
SCLK PE9 137
VCC 3V3 3V3

Write the script

import time
from pinpong.board import Board,Pin
from pinpong.libs.dfrobot_ili9341 import ILI9341_SPI #Import ili9341 library


dc = Pin(5, Pin.OUT)
res = Pin(4, Pin.OUT)

lcd = ILI9341_SPI(width=240, height=320, bus_num=1,device_num=0, dc=dc, res=res) #Initializes the screen, transmits in the numbers of screen pixels

while True:

Check the result

Use the following command to verify if it succeeded.




4.7 WiFi

To be completed...


For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents

DFshopping_car1.png Get MangoPi R3 from DFRobot Store or DFRobot Distributor.

Turn to the Top