DART-SD410 Android Unit Testing LL 1 1: Difference between revisions

From Variscite Wiki
(Created page with "{{PageHeader|Unit Testing & Engineering Notes}} Most of the hardware can be tested via Android GUI. Additional apk packages can be downloaded from Variscite's FTP site. = Audi...")
 
No edit summary
 
Line 1: Line 1:
{{PageHeader|Unit Testing & Engineering Notes}}
{{PageHeader|Unit Testing & Engineering Notes}}
Most of the hardware can be tested via Android GUI.
= Testing =
Additional apk packages can be downloaded from Variscite's FTP site.
Most of the hardware can be tested via Android GUI.<br>
= Audio =
Additional apk packages can be downloaded from Variscite's FTP site.<br>
== Changing Volume ==
== Audio ==
=== Changing Volume ===
Increasing the audio volume is done via. At the hyper terminal shell, type:
Increasing the audio volume is done via. At the hyper terminal shell, type:
<pre>root@android:/ # tinymix
<pre>root@android:/ # tinymix
Line 16: Line 17:
Will set the volume to maximum.
Will set the volume to maximum.


== Capture Audio ==
=== Capture Audio ===
The tinycap application, is routing the audio stream by default to the USB flash disk.
The tinycap application, is routing the audio stream by default to the USB flash disk.
Therefore, use a Disk-On-Key to record audio in the example below.
Therefore, use a Disk-On-Key to record audio in the example below.
Line 26: Line 27:
Hit CTRL-C after couple of seconds or more.
Hit CTRL-C after couple of seconds or more.


== Playing sample .wav file ==
=== Playing sample .wav file ===
<pre>root@android:/ # tinyplay /mnt/media_rw/usbdisk/test0.wav   
<pre>root@android:/ # tinyplay /mnt/media_rw/usbdisk/test0.wav   
</pre>
</pre>


= USB OTG as a device (ADB) <br/> =
== USB OTG as a device (ADB) <br/> ==


Test the OTG as a device using Android ADB tool.<br/>On target:<br/>Under devloper option enable ADB debugguing
Test the OTG as a device using Android ADB tool.<br/>On target:<br/>Under devloper option enable ADB debugguing
Line 41: Line 42:
</pre>
</pre>


= USB OTG as a host =
== USB OTG as a host ==


Use an external HUB. Plug into it a Disk-On-Key, mouse and keyboard.
Use an external HUB. Plug into it a Disk-On-Key, mouse and keyboard.
Line 47: Line 48:
Make sure with the Android GUI that they are functional.
Make sure with the Android GUI that they are functional.
Test USB Stick  with:
Test USB Stick  with:
<pre>$ dd if=/dev/zero of=/dev/sdb bs=128K count=10000
<pre>$ dd if=/dev/zero of=/dev/sdb bs==128K count==10000
</pre>
</pre>
{{note| NOTE:<br>
{{note| NOTE:<br>
Line 54: Line 55:
|info}}
|info}}


= USB HOST =
== USB HOST ==


Plug a mouse into all 3 ports and make sure it is working.
Plug a mouse into all 3 ports and make sure it is working.
Line 60: Line 61:
Use an external HUB. Plug into it a Disk-On-Key, mouse and keyboard.<br/>Plug it into all 3 ports and make sure all 3 devices are functioning.
Use an external HUB. Plug into it a Disk-On-Key, mouse and keyboard.<br/>Plug it into all 3 ports and make sure all 3 devices are functioning.


= FASTBOOT =
== FASTBOOT ==


== Install tools on host ==
=== Install tools on host ===
<pre>$ sudo add-apt-repository ppa:nilarimogard/webupd8
<pre>$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get update
Line 69: Line 70:
</pre>
</pre>


== Flash target eMMC ==
=== Flash target eMMC ===
{{note| NOTE:<br>
{{note| NOTE:<br>
Make sure you built Android for emmc |info}}
Make sure you built Android for emmc |info}}
Line 77: Line 78:
</pre>
</pre>
The mbr need to be collected once of an eMMC formatted target. You can install the eMMC for the fisrt time by using our nand-recovery utility.
The mbr need to be collected once of an eMMC formatted target. You can install the eMMC for the fisrt time by using our nand-recovery utility.
<pre>$ dd if=/dev/mmcblk1 of=emmc_mbr.img bs=512 count=1
<pre>$ dd if=/dev/mmcblk1 of==emmc_mbr.img bs==512 count==1
</pre>
</pre>
{{note| NOTE:<br>
{{note| NOTE:<br>
Line 91: Line 92:


You need to pick and choose the right image for your development system.  
You need to pick and choose the right image for your development system.  
Follow the link for more information. [http://www.variwiki.com/index.php?title=VAR-SOM-MX6_Android_KK2_R01#Images_created_by_the_Android_build_for_Variscite_MX6_system  Available Images]
Follow the link for more information. [http://www.variwiki.com/index.php?title==VAR-SOM-MX6_Android_KK2_R01#Images_created_by_the_Android_build_for_Variscite_MX6_system  Available Images]


= HDMI<br/> =
== HDMI<br/> ==


Boot the system and press spacebar to get into u-boot.
Boot the system and press spacebar to get into u-boot.
Change enviroment setting with the folowing command add  
Change enviroment setting with the folowing command add  
<pre>$ setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off vmalloc=400M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=384M androidboot.selinux=disabled androidboot.dm_verity=disabled  androidboot.serialno=131211d4df646298
<pre>$ setenv bootargs console==ttymxc0,115200 init=/init video==mxcfb0:dev==hdmi,1920x1080M@60,if==RGB24,bpp==32 video==mxcfb1:off video==mxcfb2:off video==mxcfb3:off vmalloc==400M androidboot.console==ttymxc0 consoleblank==0 androidboot.hardware==freescale cma==384M androidboot.selinux==disabled androidboot.dm_verity==disabled  androidboot.serialno==131211d4df646298
</pre>
</pre>


Line 103: Line 104:


You should see the Android on a full 1080p device.
You should see the Android on a full 1080p device.
== Audio over HDMI ==
=== Audio over HDMI ===
Download and install SoundAbout
Download and install SoundAbout
pm install /mnt/media_rw/usbdisk/apk/SoundAbout-com.woodslink.android.wiredheadphoneroutingfix-122-v2.5.8.0.apk
pm install /mnt/media_rw/usbdisk/apk/SoundAbout-com.woodslink.android.wiredheadphoneroutingfix-122-v2.5.8.0.apk
Use the GUI to set the service as foreground and select the audio over HDMI.
Use the GUI to set the service as foreground and select the audio over HDMI.


= External LVDS display<br/> =
== External LVDS display<br/> ==


The current Linux kernel is device tree based kernel. In order to switch LVDS display setting a change in the kernel device tree is required.
The current Linux kernel is device tree based kernel. In order to switch LVDS display setting a change in the kernel device tree is required.


= Ethernet<br/> =
== Ethernet<br/> ==


Just plug a cable into the system
Just plug a cable into the system


= WLAN  =
== WLAN  ==


== Setup ==
=== Setup ===
{{note| NOTE:<br>
{{note| NOTE:<br>
By default this steps are not required.  |info}}
By default this steps are not required.  |info}}
Line 140: Line 141:
</pre>
</pre>


== Test ==
=== Test ===
Use the Android GUI to enable and connect to a WIFI AP.
Use the Android GUI to enable and connect to a WIFI AP.


= BLUETOOTH =
== BLUETOOTH ==


Use the Android GUI to enable.
Use the Android GUI to enable.
Line 149: Line 150:
Test with Bluetooth mouse and Bluetooth keyboard.
Test with Bluetooth mouse and Bluetooth keyboard.


= Camera<br/> =
== Camera<br/> ==


Use the Android GUI to activate and test the camera. You can take a picture and send it over Bluetooth to a PC host.
Use the Android GUI to activate and test the camera. You can take a picture and send it over Bluetooth to a PC host.
Line 157: Line 158:
|info}}
|info}}


= SATA<br/> =
== SATA<br/> ==
<pre>$ busybox fdisk -ul /dev/block/sda
<pre>$ busybox fdisk -ul /dev/block/sda
</pre>
</pre>
Line 164: Line 165:
If the device is FAT32 formated Android will auto mount it.
If the device is FAT32 formated Android will auto mount it.


= Serial port<br/> =
== Serial port<br/> ==
pm install /mnt/media_rw/usbdisk/apk/SerialPort_1.1.apk
pm install /mnt/media_rw/usbdisk/apk/SerialPort_1.1.apk
You can download it from the Google play store.
You can download it from the Google play store.
Line 170: Line 171:
You can shortcut pins 2&3 and test with loopback option or connect to anther host and use the console to send receive characters.
You can shortcut pins 2&3 and test with loopback option or connect to anther host and use the console to send receive characters.


= RTC (Real Time Clock)<br/> =
== RTC (Real Time Clock)<br/> ==


Disable the auto clock sync from the Android GUI.
Disable the auto clock sync from the Android GUI.
Line 178: Line 179:


In any method power down the board and wait 5 minutes. After that power up the board and check the the clock is correct.
In any method power down the board and wait 5 minutes. After that power up the board and check the the clock is correct.
= Canbus<br/> =
== Canbus<br/> ==
We added support for canbus in the kernel and the support library layer.
We added support for canbus in the kernel and the support library layer.



Latest revision as of 22:20, 17 January 2016

Unit Testing & Engineering Notes

Testing

Most of the hardware can be tested via Android GUI.
Additional apk packages can be downloaded from Variscite's FTP site.

Audio

Changing Volume

Increasing the audio volume is done via. At the hyper terminal shell, type:

root@android:/ # tinymix

You will get a list of all available mixer option. The volume is controled by:
0 INT 2 PCM Playback Volume 127 127
27 INT 2 HP DAC Playback Volume 71 71

root@android:/ # tinymix 0 120 120
root@android:/ # tinymix 27 118 118

Will set the volume to maximum.

Capture Audio

The tinycap application, is routing the audio stream by default to the USB flash disk. Therefore, use a Disk-On-Key to record audio in the example below. Plug a Disk-On-Key, FAT32 formated into the USB host port. Plug an audio source (like a PC line out or smartphone line out) into the line in jack. Use the below command from hyper-terminal shell to capture the audio:

root@android:/ # tinycap /mnt/media_rw/usbdisk/test0.wav 

Hit CTRL-C after couple of seconds or more.

Playing sample .wav file

root@android:/ # tinyplay /mnt/media_rw/usbdisk/test0.wav  

USB OTG as a device (ADB)

Test the OTG as a device using Android ADB tool.
On target:
Under devloper option enable ADB debugguing

On Host:

$ sudo out/host/linux-x86/bin/adb kill-server
$ sudo out/host/linux-x86/bin/adb start-server
$ sudo out/host/linux-x86/bin/adb devices
$ sudo out/host/linux-x86/bin/adb shell

USB OTG as a host

Use an external HUB. Plug into it a Disk-On-Key, mouse and keyboard.

Make sure with the Android GUI that they are functional. Test USB Stick with:

$ dd if=/dev/zero of=/dev/sdb bs==128K count==10000
NOTE:

In VAR-DVK-SOLO and VAR-DVK-DUAL the USB OTG port is configured as OTG.
In VAR-DVK-MX6 the USB OTG port is configured as device. To configure it as host a change in the device tree is required.

USB HOST

Plug a mouse into all 3 ports and make sure it is working.

Use an external HUB. Plug into it a Disk-On-Key, mouse and keyboard.
Plug it into all 3 ports and make sure all 3 devices are functioning.

FASTBOOT

Install tools on host

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install android-tools-fastboot
$ sudo apt-get install android-tools-adb android-tools-fastboot

Flash target eMMC

NOTE:
Make sure you built Android for emmc

In case you already have partitions on the eMMC you can skip the next step.

$ sudo `which fastboot` flash mbr  emmc_mbr.img

The mbr need to be collected once of an eMMC formatted target. You can install the eMMC for the fisrt time by using our nand-recovery utility.

$ dd if=/dev/mmcblk1 of==emmc_mbr.img bs==512 count==1
NOTE:
If you write the MBR reset the board and enter again to fastboot before you try to flash the other images.

Boot the target press spacebar to stop at u-boot and run "fastboot". From KitKat build folder

$ sudo `which fastboot` flash boot out/target/product/var_mx6/boot-som-solo-vsc.img
$ sudo `which fastboot` flash recovery out/target/product/var_mx6/recovery-som-solo-vsc.img
$ sudo `which fastboot` flash system out/target/product/var_mx6/system.img
$ sudo `which fastboot` reboot

You need to pick and choose the right image for your development system. Follow the link for more information. Available Images

HDMI

Boot the system and press spacebar to get into u-boot. Change enviroment setting with the folowing command add

$ setenv bootargs console==ttymxc0,115200 init=/init video==mxcfb0:dev==hdmi,1920x1080M@60,if==RGB24,bpp==32 video==mxcfb1:off video==mxcfb2:off video==mxcfb3:off vmalloc==400M androidboot.console==ttymxc0 consoleblank==0 androidboot.hardware==freescale cma==384M androidboot.selinux==disabled androidboot.dm_verity==disabled  androidboot.serialno==131211d4df646298

Plug an HDMI TV or monitor to the HDMI port and boot the system by typing boot into u-boot.

You should see the Android on a full 1080p device.

Audio over HDMI

Download and install SoundAbout pm install /mnt/media_rw/usbdisk/apk/SoundAbout-com.woodslink.android.wiredheadphoneroutingfix-122-v2.5.8.0.apk Use the GUI to set the service as foreground and select the audio over HDMI.

External LVDS display

The current Linux kernel is device tree based kernel. In order to switch LVDS display setting a change in the kernel device tree is required.

Ethernet

Just plug a cable into the system

WLAN

Setup

NOTE:
By default this steps are not required.

VAR-SOM-MX6 V2.X & V1.x(Wilink6/WiLink8): First time need to set mac address to be used automatically

$ mount -o remount,rw /system 
$ calibrator set nvs_mac /system/etc/firmware/ti-connectivity/wl1271-nvs.bin 00:00:00:00:00:00

VAR-SOM-MX6 V2.X (WiLink8): First time need to select your correct device

  • Select your WL183x p/n:
  • Make sure the wifi is off
$ mount -o remount,rw /system 
$ cd /etc/wifi/wlconf
$ . ./configure-device.sh wl1831
select one out of : WL1831, WL1833, WL1835, WL1837.
As a result some additional information may be required like 1/2 antenna connected

Test

Use the Android GUI to enable and connect to a WIFI AP.

BLUETOOTH

Use the Android GUI to enable.

Test with Bluetooth mouse and Bluetooth keyboard.

Camera

Use the Android GUI to activate and test the camera. You can take a picture and send it over Bluetooth to a PC host.

NOTE:

First time boot of Android must be with camera module installed. If you booted without the camera module installed Android will mark the system as "no camera". In such a case you need to re flash the Android and first time boot it with camera installed.

SATA

$ busybox fdisk -ul /dev/block/sda

In the above commands you will see SCSI status and device partition table.

If the device is FAT32 formated Android will auto mount it.

Serial port

pm install /mnt/media_rw/usbdisk/apk/SerialPort_1.1.apk You can download it from the Google play store. Set the device to ttymxc2 and baudrate to 115200. You can shortcut pins 2&3 and test with loopback option or connect to anther host and use the console to send receive characters.

RTC (Real Time Clock)

Disable the auto clock sync from the Android GUI.

busybox date 2013.12.01-10:50
busybox hwclock --systohc

Also can set clock via GUI and check it later.

In any method power down the board and wait 5 minutes. After that power up the board and check the the clock is correct.

Canbus

We added support for canbus in the kernel and the support library layer.

Connect 2 boards. Each board JP26 connect to the other with the right cable. Set the 2 boards:

$ ip link set can0 up type can bitrate 1000000
$ busybox ifconfig can0 up up

On board 1:

$ candump can0

On board 2:

$ cansend can0 500#1E.10.10