Windows utility for flashing Debian image. Under Linux users can use "dd"

5.3.2 Linux

5.3.2.1 Boot from TF

FriendlyCore / Debian / Ubuntu are all based on a same Linux distribution and their installation methods are the same.

Extract the Linux image and win32diskimager.rar files. Insert a TF card(at least 8G) into a Windows PC and run the win32diskimager utility as administrator. On the utility's main window select your TF card's drive, the wanted image file and click on "write" to start flashing the TF card.

Insert this card into your board's BOOT slot and power on (with a 5V/2A power source). If the PWR LED is on and the STAT LED is blinking this indicates your board has successfully booted.

5.3.2.2 Boot from eMMC

5.3.2.2.1 Flash OS with eflasher Utility

Extract the eflasher Image and win32diskimager.rar files. Insert a TF card(at least 4G) into a Windows PC and run the win32diskimager utility as administrator. On the utility's main window select your TF card's drive, the wanted image file and click on "write" to start flashing the TF card.

Insert this card into your board's BOOT slot and power on (with a 5V/2A power source). If the green LED is on and the blue LED is blinking this indicates your board has successfully booted.

If your board doesn't support HDMI or no monitor is connected you can select an OS by running the following command:

$ su root
$ eflasher

The password for "root" is "fa".Type a number and enter to select an OS, then type "yes" and enter to start installation:
After installation is done shutdown the system, take out the TF card, power on your board again and it will boot from eMMC.

If you want to flash other OS image to eMMC download the whole directory "images-for-eflasher" in the CD and extract the packages in the directory to the "FRIENDLYARM" section in your SD card.

6 Work with FriendlyCore

6.1 Introduction

FriendlyCore is a light Linux system without X-windows, based on ubuntu core, It uses the Qt-Embedded's GUI and is popular in industrial and enterprise applications.

Besides the regular Ubuntu core's features our FriendlyCore has the following additional features:

6.2 FriendlyCore's User Accounts

If your board is connected to an HDMI monitor you need to use a USB mouse and keyboard.

If you want to do kernel development you need to use a serial communication board, ie a PSU-ONECOM board, which will

allow you to operate the board via a serial terminal.Here is a setup where we connect a board to a PC via the PSU-ONECOM and you can power on your board from either the PSU-ONECOM or its MicroUSB:
You can use a USB to Serial conversion board too.
Make sure you use a 5V/2A power to power your board from its MicroUSB port:

FriendlyCore User Accounts:

Non-root User:

User Name: pi
Password: pi

Root:

User Name: root
Password: fa

The system is automatically logged in as "pi". You can do "sudo npi-config" to disable auto login.

Update packages

$ sudoapt-get update

6.3 Configure System with npi-config

The npi-config is a commandline utility which can be used to initialize system configurations such as user password, system language, time zone, Hostname, SSH switch , Auto login and etc. Type the following command to run this utility.

6.5 Setup Program to AutoRun

6.6 Extend TF Card's Section

When FriendlyCore is loaded the TF card's section will be automatically extended.You can check the section's size by running the following command:

$ df-h

6.7 WiFi

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:

Change to root

$ su root

Check device list

$ 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

$ nmcli r wifi on

Scan Surrounding WiFi Sources

$ nmcli dev wifi

Connect to a WiFi Source

$ 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.

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:

$ apt-get install linux-firmware

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

6.8 Setup Wi-Fi Hotspot

Run the following command to enter AP mode:

$ su root
$ turn-wifi-into-apmode yes

You will be prompted to type your WiFi hotspot's name and password and then proceed with default prompts.
After this is done you will be able to find this hotspot in a neadby cell phone or PC. You can login to this board at 192.168.8.1:

$ ssh root@192.168.8.1

When asked to type a password you can type "fa".

To speed up your ssh login you can turn off your wifi by running the following command:

$ iwconfig wlan0 power off

To switch back to Station mode run the following command:

$ turn-wifi-into-apmode no

6.9 Bluetooth

Search for surrounding bluetooth devices by running the following command:

$ su root
$ hciconfig hci0 up
$ hcitool scan

You can run "hciconfig" to check bluetooth's status.

6.10 Ethernet Connection

If a board is connected to a network via Ethernet before it is powered on it will automatically obtain an IP with DHCP activated after it is powered up. If you want to set up a static IP refer to: Use NetworkManager to configure network settings。

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。

6.13 Connect to USB Camera(FA-CAM202)

The FA-CAM202 is a 200M USB camera. You can refer to <Connect DVP Camera (CAM500B) to Board> on how to connect a USB camera to a board.
You need to change the start.sh script and make sure it uses a correct /dev/videoX node. You can check your FA-CAM202's node by running the following commands:

"ir-keytable -t" is used to check whether the receiver receives infrared signals. You can use a remote control to send infrared signals to the receiver. If it works you will see similar messages as follows:

6.18 Access GPIO Pins/Wirings with WiringNP

The wiringPi library was initially developed by Gordon Henderson in C. It contains libraries to access GPIO, I2C, SPI, UART, PWM and etc. The wiringPi library contains various libraries, header files and a commandline utility:gpio. The gpio utility can be used to read and write GPIO pins.
FriendlyElec integrated this utility in FriendlyCore system allowing users to easily access GPIO pins. For more details refer to WiringNP WiringNP

Here is a hardware setup for connecting an audio device to a NanoPi NEO Plus2:
Make sure an audio device is connected to your NEO Plus2 and then you can test audio recording and playing by running the following commands.
Check audio devices: