EVALUATION GUIDE AMOS-820 VAB-820 Android BSP 3.1.0 1.04-04152015-171700 Copyright Copyright © 2014 - 2015 VIA Technologies Incorporated. All rights reserved. No part of this document may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual or otherwise without the prior written permission of VIA Technologies, Incorporated. Trademarks All brands, product names, company names, trademarks and service marks are the property of their respective holders. Disclaimer No license is granted, implied or otherwise, under any patent or patent rights of VIA Technologies. VIA Technologies makes no warranties, implied or otherwise, in regard to this document and to the products described in this document. The information provided in this document is believed to be accurate and reliable as of the publication date of this document. However, VIA Technologies assumes no responsibility for the use or misuse of the information (including use or connection of extra device/equipment/add-on card) in this document and for any patent infringements that may arise from the use of this document. The information and product specifications within this document are subject to change at any time, without notice and without obligation to notify any person of such change. VIA Technologies, Inc. reserves the right the make changes to the products described in this manual at any time without prior notice.. AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Revision History Revision Date Remarks 1.00 2015/2/25 Initial external release 1.01 2015/3/11 TIC reviewed 1.02 2015/3/26 Corrected “boot selection jumper” picture 1.03 2015/4/1 Rename to “Evaluation Guide” 1. 1.04 2015/4/15 Rename to AMOS-820 VAB-820 Android BSP V3.1.0 Evaluation Guide 2. Corrected “1. Introduction” description 3. Corrected light LVDS panel argument iii AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Table of Contents 1. Introduction ........................................................................................ 1 1.1. 2. Overview ..................................................................................... 1 Making Android System Booting Media .............................................. 2 2.1. Requirements .............................................................................. 2 2.2. Procedure ................................................................................... 2 2.2.1. 3. Setting the display devices ..................................................... 8 Testing ............................................................................................ 13 3.1. Installing APK through file manager ......................................... 13 3.2. Installing APK through Android SDK (optional) ............................. 13 3.3. Testing Items ............................................................................ 20 3.3.1. OpenGL ES 2.0 ..................................................................... 20 3.3.2. OpenVG ................................................................................ 20 3.3.3. Network ................................................................................. 22 3.3.3.1. Wired LAN Network ...................................................... 22 3.3.3.2. WiFi .............................................................................. 22 3.3.3.3. Wired LAN static IP ...................................................... 24 3.3.4. COM port ............................................................................... 24 3.3.4.1. COM1 ........................................................................... 24 3.3.4.2. COM2 ........................................................................... 26 3.3.4.3. Test in SmartETK ......................................................... 26 3.3.5. Audio ..................................................................................... 29 3.3.5.1. Line-out ......................................................................... 29 3.3.5.2. Mic-in ............................................................................ 29 iv AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.5.3. 3.3.6. Line-in ........................................................................... 31 I²C.......................................................................................... 32 3.3.6.1. Detect device ADV7180 ............................................... 32 3.3.6.2. Detect device HDMI EDID ............................................ 32 3.3.6.3. Detect device SGTL5000 ............................................. 32 3.3.7. GPIO ..................................................................................... 33 3.3.7.1. Test in debug port (COM2) ........................................... 33 3.3.7.2. Test in SmartETK ......................................................... 35 3.3.8. Watchdog .............................................................................. 36 3.3.8.1. Test in debug port (COM2) ........................................... 36 3.3.8.2. Test in SmartETK ......................................................... 37 3.3.9. RTC ....................................................................................... 38 3.3.10. USB ....................................................................................... 38 3.3.10.1. USB storage ................................................................. 38 3.3.10.2. USB OTG ..................................................................... 38 3.3.11. MicroSD storage ................................................................... 40 3.3.12. Dual Display .......................................................................... 40 3.3.13. Camera.................................................................................. 41 3.3.13.1. Basic operation ............................................................. 41 3.3.13.2. ADV7180 testing........................................................... 42 3.3.13.3. UVC testing .................................................................. 44 3.3.14. Touch panel .......................................................................... 44 3.3.15. Video ..................................................................................... 46 3.3.16. WiFi as the preferred network ............................................... 46 3.3.17. FlexCAN ................................................................................ 47 3.3.18. 3G.......................................................................................... 50 3.3.19. SPI ROM ............................................................................... 51 v AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.20. GPS ....................................................................................... 52 vi AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide List of Figures Figure 1: Boot select jumper ........................................................................ 5 Figure 2: Boot select jumper ........................................................................ 6 Figure 3: u-boot parameter .......................................................................... 7 Figure 4: LVDS power selection jumper .................................................... 10 Figure 5: LVDS power selection jumper .................................................... 11 Figure 6: SDK Manager ............................................................................. 15 Figure 7: APK installation setting ............................................................... 19 Figure 8: OpenGL ES 2.0 .......................................................................... 20 Figure 9: VT9271 connector ...................................................................... 22 Figure 10: WiFi enable ............................................................................... 23 Figure 11: COM1 ....................................................................................... 25 Figure 12: COM1 test ................................................................................ 26 Figure 13: COM2 ....................................................................................... 26 Figure 14: Test in SmartETK (COM Port) .................................................. 28 Figure 15: Audio connector ........................................................................ 29 Figure 16: Tinymix ..................................................................................... 30 Figure 17: i2cdetect adv7180 .................................................................... 32 Figure 18: i2cdetect HDMI EDID ............................................................... 32 Figure 19: i2cdetect SGTL5000 ................................................................. 33 Figure 20: Test in SmartETK (GPIO) ......................................................... 35 Figure 21: WDOG reboot ........................................................................... 36 Figure 22: Test in SmartETK(WatchDog) .................................................. 37 Figure 23: Test in SmartETK(WatchDog) .................................................. 37 Figure 24: RTC setting ............................................................................... 38 Figure 25: Camera.apk .............................................................................. 41 vii AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Figure 26: Camera function1 ..................................................................... 41 Figure 27: Camera function2 ..................................................................... 41 Figure 28: Camera function3 ..................................................................... 42 Figure 29: eGalaxCalibrator ....................................................................... 44 Figure 30: CAN bus H/W connection ......................................................... 47 Figure 31: APN setting ............................................................................... 50 Figure 32: SPI ROM test result .................................................................. 51 Figure 33: RIL OEM HOOK Test setting ................................................... 52 Figure 34: GPS messages ......................................................................... 53 viii AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide List of Tables Table 1: LVDS power selection jumper settings ........................................ 10 Table 2: LVDS power selection jumper settings ........................................ 11 Table 3: GPIO pins .................................................................................... 33 ix AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 1. Introduction The purpose of this document is to provide a practical introduction on evaluating Android 4.4.2 for the AMOS-820 (Bare board: VAB-820 Freescale i.MX6 Quad). 1.1. Overview The VIA VAB-820 platform is an embedded system powered by ARM processor with Android 4.4.2 operating system by default. VAB-820’s Android BSP offers a development package. Users can develop it under an Ubuntu environment. There are four major boot components for Android, the “u-boot.bin”, “boot.img”, “system.img” and “recovery.img”. The system will not boot successfully into an Android environment if one of these files does not exist in the boot media. 1 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 2. Making Android System Booting Media VAB-820 Android BSP only supports booting from onboard eMMC. This section will guide you through making the Android system boot media for VAB-820 from EVK folder. 2.1. Requirements Linux development computer Micro SD storage card. Recommended size is 4GB, class 4 at least. EVK folder 2.2. Procedure Step 1 Insert the Micro SD card to your Linux development computer. Step 2 Open the “Terminal” utility. Step 3 The Micro SD storage card can be identified and auto mounted once inserted to the computer. You can check Micro SD card code name by $ df -h user@ubuntu:~$ df –h ... Filesystem Size Used Avail Use% Mounted on 2 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide /dev/sdb1 7.2G 531M 6.3G 8% /media/usb However, there are some instances that the Micro SD storage card cannot be identified or auto mounted after inserting to the computer. In that case, you can try the other way to identify the Micro SD card. user@ubuntu:~$ dmesg | grep –i removable [105.502517] sd 9:0:0:0 [sdb] Attached SCSI removable disk The Micro SD storage card code name for this example is identified as sdb. 3 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Step 4 The EVK path for this example is /home/user/EVK, user can enter the folder “Images_autoinstall_sd/scripts” which is under EVK. user@ubuntu:~$ sudo cd /home/user/EVK/Images_autoinstall_sd/scripts user@ubuntu:~/EVK/Images_autoinstall_sd/scripts$ ls mk_install_sd.sh Step 5 User can run the script “mk_install_sd.sh” to make a bootable Micro SD card. Thus, user can install the Android image into VAB-820 eMMC through the Micro SD card. The target Micro SD storage card code name for this example is identified as sdb. user@ubuntu:~/EVK/Images_autoinstall_sd/scripts$ sudo ./mk_install_sd.sh /dev/sdb User can unplug the Micro SD card from Linux development PC after the message “Done!” appears. Step 6 Insert the Micro SD card into VAB-820. Make sure to set the jumper setting to make it bootable from Micro SD. For more details about the boot select jumper, please refer to the VAB-820 User Manual. 4 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Figure 1: Boot select jumper Notes: 1. It is recommended to connect COM2 debug cable to make sure the u-boot parameter is correct. 2. Make sure the u-boot parameter is clean. User can type the command below in u-boot: u-boot> destroyenv u-boot> reset 5 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Here, the VAB-820 should boot into Linux. Step 7 Type this command to format/partition/flash Android image into SPI/eMMC. $./fsl-eMMC-partition.sh –f /dev/mmcblk0 The u-boot will flash into SPI ROM and the others will flash into eMMC. Shutdown Linux by this command $poweroff Step 8 Set the J11 jumper (short pin 2-3) to SPI booting selection. Then power on the VAB-820 and set u-boot parameter through COM2 debug port. For more details about the boot select jumper, please refer to the VAB-820 User Manual. Make sure the u-boot parameter is clean. User can type the command below in u-boot: u-boot> destroyenv u-boot> reset Figure 2: Boot select jumper 6 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Step 9 Setting u-boot parameter for eMMC. Connect the VAB-820 and host PC through J5 (COM2) of VAB-820. Run “putty” on host PC to receive the booting message. Power on the VAB-820 and press any key to stop the booting process as shown in Figure 3. Figure 3: u-boot parameter 7 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 2.2.1. Setting the display devices [HDMI] To set HDMI as boot display: setenv display run hdmi To set HDMI resolution: setenv hdmi ‘setenv bootargs ${bootargs} video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=28M vmalloc=400M androidboot.hardware=freescale audio=hdmi’ To replace the resolution, change the red color part with the desired resolution mode. For example: To set the 1280 x 720, change the 1920 x 1080 to 1280 x 720. setenv hdmi ‘setenv bootargs ${bootargs} video=mxcfb0:dev=hdmi,1280x720M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=28M vmalloc=400M androidboot.hardware=freescale audio=hdmi’ The HDMI only supports CEA mode, here is the list of the supporting modes: Width Height Frame rate 640 480 60 720 480 60 1280 720 60 1440 240 60 1440 480 60 1920 1080 60 720 576 50 1280 720 50 1440 288 50 1440 576 50 1920 1080 50 1920 1080 24 8 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 1920 1080 25 1920 1080 30 1280 720 100 1280 720 120 9 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide [LVDS] There are three LVDS panels supported by VAB-820. Here is the list: AUO 22” G220SVN01.0 AUO 10.4” G104XVN01.0 AUO 7" G070VW01 V0 The LVDS type for this example is AUO 22” G220SVN01.0. Check the LVDS power selection setting: J3 : LVDS power select IVDD PVDD *1-3 +12V 2-4 +3.3V 3-5 +5V *4-6 +5V Table 1: LVDS power selection jumper settings Figure 4: LVDS power selection jumper To set LVDS AUO 22” G220SVN01.0 as display device: setenv display run lvds_auo_g220 10 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide The LVDS type for this example is AUO 10.4” G104XVN01.0. Check the LVDS power selection setting: J3 : LVDS power select IVDD PVDD *1-3 +12V *2-4 +3.3V 3-5 +5V 4-6 +5V Table 2: LVDS power selection jumper settings Figure 5: LVDS power selection jumper To set LVDS AUO 10.4” G104XVN01.0 as display device: setenv display run lvds_auo_g140 To set LVDS AUO 7" G070VW01 V0 as display device: setenv display run lvds_auo_g007 To set the other LVDS panels, user can add a customized lvds parameter when finish porting lvds driver (ldb.c). Here is an example; the “red” words depend on LVDS SPEC. setenv lvds_custmize ‘setenv bootargs ${bootargs} video=mxcfb0:dev=ldb,LDB-WSXGA+,if=RGB24,bpp=32 ldb=spl0 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=28M androidboot.hardware=freescale audio=sgtl5000’ setenv display run lvds_custmize 11 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 12 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3. Testing This chapter will guide you through evaluating VAB-820 Android evaluation image. 3.1. Installing APK through file manager An “open Manager” file manager is prebuilt into image. User can install necessary testing APK. Note: There are known copy/paste issues in open Manager, it is recommended to use it only when installing the APK. Installing APK from USB disk 1. Open the “Open Manager”. 2. Choose “udisk” folder. 3. Select the app you want to install. The program will ask you “Do you want to install this application?”, then press “Install”. 3.2. Installing APK through Android SDK (optional) [Host PC: Windows XP] Step 1 13 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Download JDK (jdk-7u40-windows-i586.exe) from http://www.oracle.com/technetwork/java/javase/downloads/index.html and install it. Step 2 Download the Android SDK (adt-bundle-windows-x86-20130729.zip) and install it. 14 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Step 3 Execute the SDK manager and select packages. Figure 6: SDK Manager Step 4 Open a text console utility in Windows XP. Run -> cmd cd <<Your SDK Installation Path>>\tools\ #run command in the console android.bat update adb Step 5 Go to C:\Documents and Settings\ {User Account} \.android Modify the file adb_usb.ini: # ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT. # USE 'android update adb' TO GENERATE. # 1 USB VENDOR ID PER LINE. 15 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 0x18d1 Step 6 Unpack android_usb_fsl.zip from Tools under EVK folder. 16 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Step 7 Connect your PC to VAB-820. Windows XP will detect a new android device. Install the driver by choosing android_winusb.ini which is in the android_usb_fsl folder Run -> cmd cd <<Your SDK Installation Path>>\platform-tools #run below command in the consle adb.exe kill-server adb.exe start-server adb.exe devices You will see as below: List of devices attached 0123456789ABCDEF device [Host PC: Linux] Step 1 Download JDK6 package and install it. Step 2 Download the Android SDK. Step 3 Update the adb configuration to scan for freescale's pid: Run SDK's tools to generate a configuration file: ./android-sdk-linux_86/tools/android update adb Modify the files:~/.android/adb_usb.ini, to add freescale vendor id: # ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT. # USE 'android update adb' TO GENERATE. # 1 USB VENDOR ID PER LINE. 0x18d1 17 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Create a new udev rule file under the PC's /etc/udev/rules.d/ named: imx-android.rules. Fill in the following line into the file: SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666" 18 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Change the new udev rule file's permission: chmod a+r /etc/udev/rules.d/imx-android.rules Connect the Android Device through USB OTG. To ensure that Android device is connected, find the adb first in androidsdk/platform-tools ./adb devices List of devices attached: 0123456789ABCDEF device Step 4 Install APK through adb After setup, you can use adb to install app. Go to Settings->Security and enable Unknown Sources Figure 7: APK installation setting adb.exe install {your apk file} 19 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3. Testing Items 3.3.1. OpenGL ES 2.0 Install the ApiDemo.apk obtained from EVK/app folder. Run “API Demos” Figure 8: OpenGL ES 2.0 Select Graphics-> OpenGL ES->OpenGL ES 2.0 3.3.2. OpenVG OpenVG is not originally supported by Android; however, it is possible to use OpenVG in Android by downloading AndroidVG. Get more detailed information on: http://code.google.com/p/androidvg/wiki/Installation_Guide_Linux 20 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide To install the “AppleVG.apk” and “TigerVG.apk” files into Android for testing. 21 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.3. Network 3.3.3.1. Wired LAN Network Plug in the cable before booting. Run “Browser” and verify the network. Unplug the cable and plug it back immediately, check whether the network is still working or not. Unplug the cable and reboot, plug in again after booting and check the network. 3.3.3.2. WiFi Connect the VT9271 WLAN device to VAB-820. Figure 9: VT9271 connector Go to Settings and enable the Wi-Fi. You will see AP list. 22 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Figure 10: WiFi enable Run “Browser” and verify the network. 23 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.3.3. Wired LAN static IP Install the ethernet.apk obtained from EVK/app folder. Run apk and choose “Configure Ethernet”, in “Connection type” chooses “Static IP”. Set the “IP address”, “DNS address”, “Prefix length”, and “gateway”, then choose “confirm”. You can input “busybox ifconfig” and “busybox route” through COM port to check the settings. After setting, you can use static IP function Note: The prefix length means the size of the subnet and is the number of 1 bits in the netmask. For example: Netmask: 255.255.248.0 = 1111,1111,1111,1111,1111,1000,0000,0000 Prefix length = 21. Netmask: 255.255.255.0 = 1111,1111,1111,1111,1111,1111,0000,0000 Prefix length = 24. 3.3.4. COM port 3.3.4.1. COM1 Install the SerialPort_1.1.apk obtained from EVK/app folder. After setting up the serial port API, open the Console item o Device : ttymxc0 o Baud rate : 115200 Connect from VAB-820 to host PC via J4. 24 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Figure 11: COM1 Execute “putty” on host PC. o Serial -> Flow control : RTS/CTS 25 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Type any key in putty and Serial Port API, you will see the words in the other machine. Figure 12: COM1 test 3.3.4.2. COM2 Connect from VAB-820 to host PC via J5. Figure 13: COM2 Execute “putty” on host PC. Power on the VAB-820. Booting message will be shown on the screen of putty. PS. Putty setting: “Speed” : 115200 “Connection type” serial Type command through COM2. 3.3.4.3. Test in SmartETK Install VAB820StandardExample.apk (SmartETK demo APK) Select “UART” 26 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Set “Device” as ttymxc0 (COM1) and “BaudRate” Click “Connect” and input the message then press “Send” 27 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Figure 14: Test in SmartETK (COM Port) 28 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.5. Audio 3.3.5.1. Line-out Connect the headphone plug to the green jack socket. Figure 15: Audio connector 3.3.5.2. Mic-in Install Hi-Q MP3 Rec (Lite).apk obtained from EVK/app folder. Plug the microphone to the red jack socket. User needs tinymix to set the Mic-in. root@android:/# tinymix 29 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Figure 16: Tinymix 30 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide root@android:/# tinymix 24 0 root@android:/# tinymix 26 1 Run “Hi-Q” app in the Android to test the sound record. Note: Tinymix does not support Mic-in for headphone. 3.3.5.3. Line-in Plug audio cable to the blue jack socket. Here, user can use an audio cable to connect. It is recommended to download Hi-Q MP3 Rec (Llite) 1.6.12 to test. Audio-out on player, Line-in on I/O board, and play the music. Line-in cannot be used directly. User needs tinymix to set Line-in. root@android:/# tinymix root@android:/# tinymix 24 1 root@android:/# tinymix 27 1 If you want to set the line-in to headphone, set the tinymix argument as: root@android:/# tinymix 23 1 root@android:/# tinymix 25 1 root@android:/# tinymix 27 1 Run “Hi-Q” app After setting the line-in to headphone, and if you want to hear the system voice, set the tinymix argument as: root@android:/# tinymix 23 0 31 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.6. I²C 3.3.6.1. Detect device ADV7180 ADV7180 could be found at address 0x21 on I2C1. Figure 17: i2cdetect adv7180 3.3.6.2. Detect device HDMI EDID EDID could be found at address 0x50 on I2C2 Figure 18: i2cdetect HDMI EDID 3.3.6.3. Detect device SGTL5000 SGTL5000 could be found at address 0x0A on I2C3 32 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Figure 19: i2cdetect SGTL5000 3.3.7. GPIO 3.3.7.1. Test in debug port (COM2) Change the directory to /sys/class/gpio Generate the numbers corresponding to the GPIO pins. Pin VAB-820 name FSL name T4 GPIO_1 GPIO1_1 T1 GPIO_2 GPIO1_2 R6 GPIO_4 GPIO1_4 R4 GPIO_5 GPIO1_5 R3 GPIO_7 GPIO1_7 R5 GPIO_8 GPIO1_8 T2 GPIO_9 GPIO1_9 R2 GPIO_16 GPIO7_11 Table 3: GPIO pins The number is (X-1)*32+Y for each GPIOX_Y. Example: The number for GPIO7_11 is (7-1)*32+11=203 The number for GPIO1_5 is (1-1)*32+5=5 echo 203 > export echo 5 > export The directories “gpio203” and “gpio5” will be created under /sys/class/gpio/ 33 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Set GPIO IN/OUT echo out > gpio203/direction echo in > gpio5/direction Notes: 1, 2, 4, and 5 are IN. 7, 8, 9 and 203 are OUT. Test The following GPIO are connected by jumper, we can test them together. gpio1 --- gpio7 gpio2 --- gpio8 gpio4 --- gpio9 gpio5 --- gpio203 Write value 0 or 1 to “out” and read value from “in”. echo 0 > /sys/class/gpio/gpio203/value cat /sys/class/gpio/gpio5/value Check if the value is the same as you wrote it. 34 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.7.2. Test in SmartETK Install VAB820StandardExample.apk (SmartETK demo APK). Select “GPIO” Click “Enable” to test GPIO. Test example: o Pin 1 - Pin 7: Without jumper connection. User select GPO to up, GPI won’t change voltage. o Pin 5 - Pin 203: With jumper connection. User select GPO to up, GPI will change voltage. Figure 20: Test in SmartETK (GPIO) 35 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.8. Watchdog 3.3.8.1. Test in debug port (COM2) ioctl –r /dev/watchdog 2 The system will reboot in 60 seconds. [WDOG] will be shown in the line of “Boot Reason”. Figure 21: WDOG reboot 36 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.8.2. Test in SmartETK Install VAB820StandardExample.apk (SmartETK demo APK). Select “WatchDog”. Select ”Enable WatchDog” and press “Test WatchDog”. The system will be reset by watchdog in one minute. Figure 22: Test in SmartETK(WatchDog) Figure 23: Test in SmartETK(WatchDog) 37 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.9. RTC Test way: Setup hardware time in Settings Figure 24: RTC setting Reboot the system (power off first and power on again) and check the time. 3.3.10.USB 3.3.10.1. USB storage Android will detect the USB disk automatically. Once the USB disk is detected, system will inform you and mount it to /storage/udisk automatically. You can also mount the USB disk manually. Go to Settings->Storage Select “Mount udisk” 3.3.10.2. USB OTG Connect the Android device to Linux or XP PC through USB OTG. Go to android-sdk/platform-tools and type: 38 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide ./adb devices If the device is detected successfully, terminal will show a message: List of devices attached: 0123456789ABCDEF device 39 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.11.MicroSD storage MicroSD card as storage: Detection and Access Find the device node of MicroSD card under /dev/block as ”mmcblk1”. Android should mount MicroSD card automatically. Check files under /storage/extsd. Copy file to/from /storage/extsd. 3.3.12.Dual Display Note: VAB-820 DualLite does not support dual display. To set Dual display (auo 10.4” + hdmi 720p): In u-boot set, setenv display ‘run dual_display’ To set the other configuration of dual display. Here is an example; the “red” words depend on LVDS SPEC and HDMI mode what user wants to set. setenv dual_display ‘setenv bootargs ${bootargs} video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24,bpp=32 ldb=sin0 video=mxcfb1:dev=hdmi,1280x720M@60,bpp=32 video=mxcfb2:off video=mxcfb3:off fbmem=28M vmalloc=400M androidboot.hardware=freescale audio=sgtl5000’ setenv display run dual_display 40 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.13.Camera 3.3.13.1. Basic operation Open the Camera.apk. Figure 25: Camera.apk You can switch to video mode or photo mode. Figure 26: Camera function1 Take a photo or record a video by pressing the round button. Figure 27: Camera function2 41 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Android has two camera lenses: back_camera and front_camera. Back_camera is ADV7180, and front_camera is UVC. You can switch them by using the following icon. Figure 28: Camera function3 The following settings are only for ADV7180. Switch video input source by the command through COM2. root@android:/ # setprop adv7180_src 2 The value ”1” is composite and value ”2” is S-Video. You have to re-open the camera.apk after doing the above settings. Check the settings by the command ”getprop”. root@android:/ # getprop adv7180_src 2 3.3.13.2. ADV7180 testing 1. Open the camera.apk. The default camera is back_camera (ADV7180) with composite source and NTSC format. 2. Take a photo. Photo is jpg format. 3. Switch to video mode and test video recording. The codec of video recording should be: fileFormat="mp4" 42 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide <Video codec="h264" bitRate="3000000" frameRate="30" /> <Audio codec="aac" bitRate="96000" sampleRate="44100" channels="1" /> Width and height are based on the format. NTSC is 720 x 480 and PAL is 720 x 576. 43 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.13.3. UVC testing 1. Open the camera.apk and switch to front_camera. 2. Take a photo. The photo is in jpg format. 3. Switch to video mode and test video recording. The codec of video recording should be: fileFormat="mp4" <Video codec="h264" bitRate="3000000" width="640" height="480" frameRate="30" /> <Audio codec="aac" bitRate="96000" sampleRate="44100" channels="1" /> 3.3.14.Touch panel Install the eGalaxCalibrator.apk obtained from EVK/app folder. Connect the USB cable on touch panel to VAB-820. Run eGalaxCalibrator and choose 4 or 9 Points Calibration. Figure 29: eGalaxCalibrator 44 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide After calibration, you can surf android with your finger. 45 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.15.Video Install the MX Player_1.7.31.apk obtained from EVK/app folder. Select the video file to play. The MX player will use hardware acceleration to decode the video by default and show “HW” on the top right corner. If the file cannot be decoded by hw, player will decode by sw and show “SW” on the top right corner. 3.3.16.WiFi as the preferred network Make sure the Ethernet cable is unplugged and connected to a WiFi AP. Check the connection by entering the following command : root@android:/ # logcat | grep ‘ConnectivityService’ Connection status will be shown on the screen: D/ConnectivityService( D/ConnectivityService( CONNECTED/CONNECTED D/ConnectivityService( same reset per doReset D/ConnectivityService( 2555): Active connection : WIFI(CONNECTED) 2555): ConnectivityChange for WIFI: 2555): handleConnectivityChange: address are the linkProperty[1]: resetMask=0 2555): Active connection : WIFI(CONNECTED) Plug the Ethernet cable in the VAB-820, and the following message will be shown on the screen: PHY: 1:07 - Link is Up D/ConnectivityService( CONNECTED/CONNECTED D/ConnectivityService( down network ETHERNET D/ConnectivityService( - 100/Full 2555): ConnectivityChange for ETHERNET: 2555): Not broadcasting CONNECT_ACTION to torn 2555): Active connection : WIFI(CONNECTED) 46 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.17.FlexCAN Connect the VAB-820-A to VAB-820, and use a non-jumper cable to connect can0 and can1 as shown in Figure 30. Figure 30: CAN bus H/W connection # # # # ip link ip link candump cansend # # # # Testing command: cansend and candump set can0 up type can bitrate 500000 set can1 up type can bitrate 500000 can1 & can0 -i0x123 0xaa 0xbb 0xcc 0xdd Testing command: cantest ip link ip link cantest cantest set can0 up type can bitrate 500000 set can1 up type can bitrate 500000 can1 & can0 123#aabbccdd If the setting is successful, it will show “ID” and “DATA”. The other testing (reference). Simple Tx/Rx Test. All receive. # ip link set can0 up type can bitrate 500000 # ip link set can1 up type can bitrate 500000 # candump can1 & # cansend can0 -i0x123 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 -> <0x123> [8] 11 22 33 44 55 66 77 88 Add Filter to candump, kill the older candump at first. 47 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide # candump can1 --filter=0x123:0x7ff & # cansend can0 -i0x111 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 -> not received(filter not hit) # cansend can0 -i0x123 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 -> <0x123> [8] 11 22 33 44 55 66 77 88 48 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Change Bitrate and send message part 1. # ifconfig can0 down # ip link set can0 up type can bitrate 250000 # candump can1 & # cansend can0 -i0x123 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 -> not received(different bitrate) # ifconfig can1 down # ip link set can1 up type can bitrate 250000 # candump can1 & # cansend can0 -i0x123 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 -> <0x123> [8] 11 22 33 44 55 66 77 88 Change Bitrate and send message part 2. # ifconfig can0 down # ifconfig can1 down (BITRATE = 1000000, 500000, 250000, 125000, 100000, 50000) # ip link set can0 up type can bitrate 50000 # ip link set can1 up type can bitrate 50000 # candump can1 & # cansend can0 -i0x123 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 -> <0x123> [8] 11 22 33 44 55 66 77 88 49 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.18.3G Connect the u-blox LISA U-200 to VAB-820. Open the APN setting menu (Settings->WIRELESS & NETWORKS->More->Mobile networks->Access Point Names). Add a new APN (setting the suitable Name and APN for SIM card) and choose the APN. Figure 31: APN setting Run “Browser” and verify the network. 50 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.19.SPI ROM Connect the VAB-820-B to VAB-820. These 2 SPI ROMs could be found under /dev/block as “mtdblock1” and “mtdblock2”. Copy spi_test.sh from “/EVK/tool” to android system “/data”. Use this command to run script. # sh spi_test.sh /dev/block/mtdblock1 # sh spi_test.sh /dev/block/mtdblock2 We can see the test result as shown in Figure 32. Figure 32: SPI ROM test result 51 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide 3.3.20.GPS Connect the u-blox LISA U-200 to VAB-820 and enable 3G. Install the uCenter.apk obtained from EVK/app folder. Open the RIL OEM Hook Test menu (Settings->WIRELESS & NETWORKS->More->RIL OEM HOOK Test). Figure 33: RIL OEM HOOK Test setting Choose API 4 type command and input below commands line by line. AT+UGPRF=1 AT+UGRMC=1 AT+UGGSV=1 AT+UGGGA=1 AT+UGPS=1,0 Before running the uCenter, you need to take the GPS antenna out of window, and then GPS can find more satellite and locate your position. 52 AMOS-820 VAB-820 Android BSP 3.1.0 Evaluation Guide Run uCenter and scroll display menu to see the messages, and after about 10 minutes, GPS will locate your position. Figure 34: GPS messages 53
© Copyright 2025