Debian Jessie

From FriendlyARM WiKi
Jump to: navigation, search


Download debian image file

S5P4418 Platform

Get the following files from:download link,Image filename: Debian8-Desktop

S5P6818 Platform

Get the following files from:download link,Image filename: Debian8-Desktop

H3 Platform

Get the following files from::download link,Image filename: Debian8-Desktop

Working with Debian

Ethernet Connection

  • If the board is connected to a network via Ethernet before it is powered on, it will automatically obtain an IP after it is powered up.

Wireless Connection

Under Debian you can manage your network with NetworkManager.
After Debian boots click on the network icon on the bottom right of the task bar a NetworkManger menu will pop up and all the available networks will be listed. If there is an active wireless network you will see something similar to the following screenshot:
You can click on a WiFI AP and connect your board to it.
For more details refer to:NetworkManager.

For either an SD WiFi or a USB WiFi you can connect it to your board in the same way. The APXX series WiFi chips are SD WiFi chips. By default FriendlyElec's system supports most popular USB WiFi modules. Here is a list of the USB WiFi modules we tested:

Index Model
1 RTL8188CUS/8188EU 802.11n WLAN Adapter
2 RT2070 Wireless Adapter
3 RT2870/RT3070 Wireless Adapter
4 RTL8192CU Wireless Adapter
5 mi WiFi mt7601

You can use the NetworkManager utility to manage network. You can run "nmcli" in the commandline utility to start it. Here are the commands to start a WiFi connection:

  • Check device list
sudo nmcli dev

Note: if the status of a device is "unmanaged" it means that device cannot be accessed by NetworkManager. To make it accessed you need to clear the settings under "/etc/network/interfaces" and reboot your system.

  • Start WiFi
sudo nmcli r wifi on
  • Scan Surrounding WiFi Sources
sudo nmcli dev wifi
  • Connect to a WiFi Source
sudo nmcli dev wifi connect "SSID" password "PASSWORD" ifname wlan0

The "SSID" and "PASSWORD" need to be replaced with your actual SSID and password.If you have multiple WiFi devices you need to specify the one you want to connect to a WiFi source with iface
If a connection succeeds it will be automatically setup on next system reboot.

For more details about NetworkManager refer to this link: Use NetworkManager to configure network settings

If your USB WiFi module doesn't work most likely your system doesn't have its driver. For a Debian system you can get a driver from Debian-WiFi and install it on your system. For a Ubuntu system you can install a driver by running the following commands:

$ sudo apt-get install linux-firmware

In general all WiFi drivers are located at the "/lib/firmware" directory.


Here are the steps to transfer a file from T2 to a mobile phone. Run the following command to search a surrounding Bluetooth device:

hcitool scan

In our example a mobile phone was detected and the following messages were listed:
Scanning ...

These messages indicated that a MEIZU MX4 mobile phone was detected. We then checked the Bluetooth services this phone supported with its MAC address presented in front of its device name

sdptool browse 38:BC:1A:B1:7E:DD

Note: you need to use your device's name and its MAC address when you run these commands.

The command listed all the services the phone supported. We needed the "OBEX Object Push" service which is for file transfers.
Service Name: OBEX Object Push
Service RecHandle: 0x1000b
Service Class ID List:
"OBEX Object Push" (0x1105)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 25
"OBEX" (0x0008)
Profile Descriptor List:
"OBEX Object Push" (0x1105)
Version: 0x0100

From the above messages we could get the channel number 25 for the "OBEX Object Push" service. We input this number to the "ussp-push" by running the following command:

ussp-push 38:BC:1A:B1:7E:DD@25 example.jpg example.jpg

Note: you need to use your device's name, its MAC address and channel number when you run these commands.

Usually after the above commands are run a popup window will show on the phone that communicates with T2 and you can start file transfers.

Common Issues:
1) If T2 cannot find a Bluetooth device you can try this command to restart its Bluetooth:

rfkill unblock 0

2) If any of these commands is not installed you can try this command to install it:

apt-get install bluetooth bluez obexftp openobex-apps python-gobject ussp-push

Install Debian Packages

We provide a Debian Jessie image. You can install Jessie's packages by commanding "apt-get". If this is your first installation you need to update the package list by running the following command

apt-get update

You can install your preferred packages. For example if you want to install an FTP server you can do this:

apt-get install vsftpd

Note: you can change your download server by editting "/etc/apt/sources.list". You can get a complete server list from [1]. You need to select the one with "armhf".

Set Audio Device

If your system has multiple audio devices such as HDMI-Audio, 3.5mm audio jack and I2S-Codec you can set system's default audio device by running the following commands.

  • After your board is booted run the following commands to install alsa packages:
$ apt-get update
$ apt-get install libasound2
$ apt-get install alsa-base
$ apt-get install alsa-utils
  • After installation is done you can list all the audio devices by running the following command. Here is a similar list you may see after you run the command:
$ aplay -l
card 0: HDMI
card 1: 3.5mm codec
card 2: I2S codec

"card 0" is HDMI-Audio, "card 1" is 3.5mm audio jack and "card 2" is I2S-Codec. You can set default audio device to HDMI-Audio by changing the "/etc/asound.conf" file as follows:

pcm.!default {
    type hw
    card 0
    device 0
ctl.!default {
    type hw
    card 0

If you change "card 0" to "card 1" the 3.5mm audio jack will be set to the default device.
Copy a .wav file to your board and test it by running the following command:

$ aplay /root/Music/test.wav

You will hear sounds from system's default audio device.
If you are using H3/H5/H2+ series board with mainline kernel, the easier way is using npi-config

Login via VNC and SSH

If your board is not connected to a display device you can login to your board from a mobile phone. You need to download and install a "VNC Viewer" from here on a mobile phone and login to the board via VNC at port 1. Its default password is "fa123456".
Here is a screenshot which shows how it looks like when users login to the board from an iPhone via VNC:
VNC to NanoPi2
In our case our board's IP address is You can login via SSH by running the following commands:

$ ssh root@

The password is fa.

Connect to USB Camera(FA-CAM202)

The FA-CAM202 is a 200M USB camera.
Refer to this link for more details on how to connect to a FA-CAM202: Connect NanoPi M1 to DVP Camera CAM500B
In Debian, click on "other"-->"xawtv" on the left bottom of the GUI and the USB Camera application will be started. After enter "welcome to xawtv!" click on "OK" to start exploring.

Use OpenCV to Access Camera

  • The full name of "OpenCV" is Open Source Computer Vision Library and it is a cross platform vision library.
  • Make sure your board is connected to the internet and an HDMI monitor, Boot Debian and login.
  • Install OpenCV libraries:
$ apt-get update
$ apt-get install libcv-dev libopencv-dev
  • Refer to the instructions in the previous sections to make sure the camera works
  • Compile and run a code sample(Official Code Sample in C++ provided by the OpenCV organization):
$ cd /home/fa/Documents/opencv-demo
$ make
$ ./demo

Only Support S5P4418/S5P6818 Platform

Connect to DVP Camera CAM500B

The CAM500B camera module is a 5M-pixel camera with DVP interface. For more tech details about it you can refer to Matrix - CAM500B.
Under Debian/Ubuntu a camera utility "nanocams" is available for previewing 40 frames and picture taking. You can try it by following the commands below

sudo nanocams -p 1 -n 40 -c 4 -o IMG001.jpg

For more details about the usage of the nanocams run "nanocams -h". You can get its source code from our git hub:

git clone

Only Support H3 Platform

Connect to DVP Camera CAM500B

The CAM500B camera module is a 5M-pixel camera with DVP interface. For more tech details about it you can refer to Matrix - CAM500B.
connect your H3 board to a CAM500B. Then boot OS, connect your board to a network, log into the board as root and run "mjpg-streamer":

$ cd /root/mjpg-streamer
$ make
$ ./

The mjpg-streamer application is an open source video steam server. After it is successfully started the following messages will be popped up:

 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 1280 x 720
 i: Frames Per Second.: 30
 i: Format............: YUV
 i: JPEG Quality......: 90
 o: www-folder-path...: ./www/
 o: HTTP TCP port.....: 8080
 o: username:password.: disabled
 o: commands..........: enabled

In our case the board's IP address was We typed in a browser and were able to view the images taken from the camera's. Here is what you would expect to observe:
The mjpg-streamer utility uses libjpeg to software-encode steam data. The Linux-4.x based ROM currently doesn't support hardware-encoding. If you use a Linux-3.x based ROM you can use the ffmpeg utility to hardware-encode stream data and this can greatly release CPU's resources and speed up encoding:

$ ffmpeg -t 30 -f v4l2 -channel 0 -video_size 1280x720 -i /dev/video0 -pix_fmt nv12 -r 30 \
        -b:v 64k -c:v cedrus264 test.mp4

By default it records a 30-second video. Typing "q" stops video recording. After recording is stopped a test.mp4 file will be generated.

Check CPU's Working Temperature

You can use the following command to read H3's temperature and frequency


Check System Information with Rpi-Monitor

Our OS contains the Rpi-Monitor utility with which users can check system information and status.
In our case our board's IP was and we typed the following IP in a browser:

We were directed to the following page:
Users can easily check these system information and status.

Test GPU

Note: this function is only supported in Allwinner Linux-3.4.y.
After OS loads please login from a terminal and run the following command:



Test VPU

Note: this function is only supported in Allwinner Linux-3.4.y
Visit this link download link to download files
After OS is loaded login from a terminal and run the following commands:

$ sudo apt-get install mpv
$ video_play mpv ./big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4

In our test it could do hard coding and play 1080P video fluently.