5. Android Application

5.1 Serial Terminal

Debug

Connect the board and PC with USB Serial cable, then power on, the terminal will output boot information. The default baudrate is 115200.

su          //switch to root mode
Terminal_UI

Serial Terminal

5.2 Display

Display IO

IdeaT527 provides HDMI and 2x dual-LVDS output interfaces. Boardcon firmware supports 2x dual-LVDS display by default.

Android_Display

Dual-screen display sync

5.3 USB

USB

IdeaT527 provides 2x USB2.0 connector.

USB0(up) default Host mode.

su
echo usb_device > /sys/devices/platform/soc@3000000/10.usbc0/otg_role     //Device mode
echo usb_host > /sys/devices/platform/soc@3000000/10.usbc0/otg_role       //Host mode

USB2(down) cannot be used with PCIe(SSD) simultaneously. Boardcon firmware default USB2 is unavailable.

5.4 Ethernet

Ethernet

Connect the board and router with an Ethernet cable.

_images/Ethernet_connection.jpg

Network connection successful

User can open WebView Browser Tester or ping URL/IP to test Network.

_images/Android_browser.png
ifconfig
ping -I eth0 www.armdesigner.com

5.5 4G & GPS

4G+GPS

5.5.1 4G

❶ Insert 4G module to mPCIe socket (4G model: EC20).

❷ Connect antenna and insert SIM card.

❸ Power on. The default connection is 4G network.

_images/android_4G_test.jpg

4G network connection

User can open WebView Browser Tester or ping URL/IP to test 4G Network.

ifconfig
ping -I wwan0 www.armdesigner.com

5.5.2 GPS

❶ Insert 4G module to mPCIe socket.

❷ Connect GPS antenna.

❸ Power on. Click GPS Test to test.

_images/android_GPS_icon.png
_images/android_GPS_test.png

GPS Signal

5.6 SD Card

SD

Click FileManager to view the mounted SD card.

_images/Android_SD.jpg

File Manager

5.7 Audiao I/O

5.7.1 Headset

Headset

❶ Plug the Microphone into the 3.5mm Audio jack.

_images/Headset_detected.jpg

Headset insertion detected

❷ Open Sound Recorder.

_images/Record_icon.png

❸ Click Start to start recording.

_images/Android_Recording.png

❹ After finish recording, click Stop and play to test recorded file.

5.7.2 MIC

MIC

❶ Connect a MIC to the connector (2pin/2.0mm pitch).

❷ Open Sound Recorder.

❸ Click Start to start recording.

❹ After finish recording, click Stop and play to test recorded file.

_images/Record_play.png

Play recording file

5.7.3 Speaker

MIC

The Speaker connector is 2-pin 2.0mm pitch.

The output priority of headpset is higher than that of speakers. When headset is plugged in, the sound will be output through the headset.

5.8 WiFi & Bluetooth

WiFi&BT

WiFi&BT module

5.8.1 WiFi

Connect the WiFi antenna, then click Settings -> Network & internet -> Internet -> Wi-Fi -> turn on, select the SSID from the list of available networks and enter the password.

_images/Android_wifi_setting.png

After connected, user can open the browser or ping URL/IP at terminal to test Network.

5.8.2 Bluetooth

Click Settings -> Connected devices -> Pair new device

Select the available device in the list to pair.

_images/Android_BT_pair.png

After pairing, devices can connect with each other automatically.

5.9 IR

IR

Configuring the remote control requires modifying the source code \longan\bsp\drivers\ir-rx\sunxi-ir-keymap.h. Use the command getevent to obtain the key value, and fill in the corresponding value into sunxi-ir-keymap.h. After completing all the mapping values, recompile longan and android to generate firmware.

# Boardcon IR configuration
/* Key codes for the x96 remote */
     { 0x118, KEY_POWER },
     { 0x144, KEY_KPDOT },
     { 0x156, KEY_REWIND },
     { 0x15a, KEY_PLAYPAUSE },
     { 0x152, KEY_STOP },
     { 0x154, KEY_FASTFORWARD },
     { 0x143, KEY_SETUP },
     { 0x10f, BTN_TRIGGER_HAPPY14 },
     { 0x114, KEY_VOLUMEDOWN },
     { 0x110, KEY_VOLUMEUP },
     { 0x106, KEY_HOME },
     { 0x140, KEY_BACK },
     { 0x146, KEY_UP },
     { 0x147, KEY_LEFT },
     { 0x155, KEY_OK },
     { 0x115, KEY_RIGHT },
     { 0x116, KEY_DOWN },
     { 0x117, KEY_MENU },
     { 0x104, KEY_EPG },             // mouse
     { 0x14e, KEY_NUMERIC_1 },
     { 0x10d, KEY_NUMERIC_2 },
     { 0x10c, KEY_NUMERIC_3 },
     { 0x14a, KEY_NUMERIC_4 },
     { 0x109, KEY_NUMERIC_5 },
     { 0x108, KEY_NUMERIC_6 },
     { 0x148, KEY_NUMERIC_7 },
     { 0x105, KEY_NUMERIC_8 },
     { 0x107, KEY_NUMERIC_9 },
     { 0x141, KEY_MUTE },
     { 0x101, KEY_NUMERIC_0 },
     { 0x142, KEY_BACKSPACE },

5.10 Camera

_images/4xAHD.jpg

❶ Connect the cameras to the development board(four cameras for example.).

❷ Click DVR APP.

❸ Select preview channels

_images/4xCamera_channel.png

Select Camera preview channels

❹ Select camera resolution (Incorrect resolution will result in no display).

_images/4xCamera_resolution.png

Select Camera resolution

Note

If use CVBS camera, please select TD104-720x576p

❺ Select preview device.

ls /dev/video*         //View device ID

The corresponding device ID is 0, 4, 8, 12.

_images/4xCamera_device.png

Select device

❻ Click OK

_images/4xCamera_Preview_effect.jpg

Preview effect

5.11 RS485

RS485 connect

❶ Connect PC and board with USB-to-RS485 adapter.

CAN connection

RS485 connection

❷ Open the Serial Terminal of board and RS485 adapter respectively. Set the baud rate to 115200.

_images/RS485_baudrate.png

❸ Execute the following commands on the terminal serial ports of board.

su
com /dev/ttyAS3 115200 8 0 1

❹ Input character to test RS485 communication.

_images/Android_RS485_Test.png

5.12 CAN

CAN

The device name for CAN0 is awlink0, CAN1 is awlink1.

❶ Connect PC and board with USB-to-CAN adapter.

CAN connection

CAN connection

❷ Open the CAN application and set the baudrate to 1000000 on PC.

_images/CAN_baudrate.png

❸ Execute commands on Serial Terminal to configure and start the CAN network.

su
ip link set awlink0 down
ip link set awlink0 type can bitrate 1000000
ip link set awlink0 qlen 300
ip link set awlink0 up
_images/Android_CAN_config.png

❹ Configure CAN as receiver.

candump awlink0 &
_images/Android_CAN_receiver.png

❺ set CAN as Transmitter.

cansend awlink0 123#1122334455667788
_images/Android_CAN_Transmitter.png

5.13 M.2 SSD

M.2 SSD

IdeaT527 SSD on Android 13 only supports the ext4 format.

❶ Connect SSD to the M.2 socket, then power on.

❷ Mount SSD.

su
mkdir /mnt/ssd1
mount /dev/block/nvme0n1 /mnt/ssd1
ls /mnt/ssd1

Note

If the device is not in ext4 format, user can format it on the board. The formatting will result in permanent loss of all files on the device, please handle with caution.

mke2fs -t ext4 /dev/block/nvme0n1  //format SSD to ext4

5.14 RTC

RTC

❶ Insert a CR1220 battery before test. It keeps the time running when the main power is off.

❷ Set date and time manually.

su
date -s "2024-10-31 15:22:30"           //set system date
hwclock -w                              //set the hardware clock to current system time
hwclock                                 //display date and time

❸ Power off. Wait for a moment, power on again, and then execute the command hwclock, you will find that the time is saved.

If connected to the internet, the time will automatically synchronize with the network time.