VAR-SOM-MX6 Android Unit Testing: Difference between revisions

From Variscite Wiki
No edit summary
Line 2: Line 2:


= Audio =
= Audio =
The default Android sound recorder application use a a very low sampling rate producing a poor sound.
The default Android sound recorder application use a a very low sampling rate producing a poor sound.


Plug a Disk-On-Key FAT32 formated into the USB host port.
Plug a Disk-On-Key FAT32 formatted into the USB host port.


Plug an audio source (like a PC line out or smartphone line out) into the line in connector.
Plug an audio source (like a PC line out or smartphone line out) into the line in connector.


Plug speakers (like PC speakers) into the line out connector.
Plug speakers (like PC speakers) into the line out connector.
<pre>root@android:/ # tinycap /mnt/udisk/48b.wav -d 0 -b 24 -c 2 -r 48000  
<pre>
root@android:/ # tinycap /mnt/udisk/48b.wav -d 0 -b 24 -c 2 -r 48000  
</pre>
</pre>
Hit CTRL-C after couple of seconds or more.
Hit CTRL-C after couple of seconds or more.
<pre>root@android:/ # tinyplay /mnt/udisk/48b.wav   
<pre>
root@android:/ # tinyplay /mnt/udisk/48b.wav   
</pre>
</pre>
= USB OTG as a device<br/> =


Test the OTG as a device using Android ADB tool.<br/>On target:<br/>Under devloper option enable ADB debugguing
= USB OTG as a device =
Test the OTG as a device using Android ADB tool.<br>
On target:<br>
Under developer option enable ADB debugging


On Host:
On Host:
<pre>$ sudo out/host/linux-x86/bin/adb kill-server
<pre>
$ 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 start-server
$ sudo out/host/linux-x86/bin/adb devices
$ sudo out/host/linux-x86/bin/adb devices
$ sudo out/host/linux-x86/bin/adb shell
$ sudo out/host/linux-x86/bin/adb shell
</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 32: Line 36:


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


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.
= HDMI<br/> =


= HDMI =
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
Change enviroment setting with the folowing command
<pre>setenv bootargs console=ttymxc0,115200 androidboot.console=ttymxc0 init=/init video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32 video=mxcfb2:off arm_freq=1000 fbmem=28M vmalloc=400M androidboot.hardware=freescale caam mxc_hdmi.only_cea=1 mtdparts=setenv mtdpar gpmi-nand:16m(bootloader),16m(bootimg),32m(recovery),-(root) ubi.mtd=3 var_ts_type=ctw6120
<pre>
setenv bootargs console=ttymxc0,115200 androidboot.console=ttymxc0 init=/init video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32 video=mxcfb2:off arm_freq=1000 fbmem=28M vmalloc=400M androidboot.hardware=freescale caam mxc_hdmi.only_cea=1 mtdparts=setenv mtdpar gpmi-nand:16m(bootloader),16m(bootimg),32m(recovery),-(root) ubi.mtd=3 var_ts_type=ctw6120
</pre>
</pre>
Plug an HDMI TV or monitor to the HDMI port and boot the system by typing boot into u-boot.
Plug an HDMI TV or monitor to the HDMI port and boot the system by typing boot into u-boot.
Line 48: Line 52:
You should see the Android on a full 1080p device.
You should see the Android on a full 1080p device.


= External LVDS display<br/> =
= External LVDS display =
 
Boot the system and press any key to stop autoboot and get to the U-Boot command line.<br>
Boot the system and press spacebar to get into u-boot.<br/>Change enviroment setting with the folowing command
Change environment setting with the following commands:<br>


For Quad, Dual and DualLite SOM's use:
For Quad, Dual and DualLite SOM's use:
<pre>setenv bootargs console=ttymxc0,115200 init=/init ldb=sin1 video=mxcfb0:dev=ldb,800x600M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off arm_freq=1000 fbmem=24M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale mtdparts=gpmi-nand:16m(bootloader),16m(bootimg),32m(recovery),-(root) ubi.mtd=3
<pre>
setenv bootargs console=ttymxc0,115200 init=/init ldb=sin1 video=mxcfb0:dev=ldb,800x600M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off arm_freq=1000 fbmem=24M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale mtdparts=gpmi-nand:16m(bootloader),16m(bootimg),32m(recovery),-(root) ubi.mtd=3
</pre>
</pre>
For Solo use:
For Solo use:
<pre>setenv bootargs console=ttymxc0,115200 init=/init ldb=sin1 video=mxcfb0:dev=ldb,800x600M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off arm_freq=1000 fbmem=24M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale gpumem=64M mtdparts=gpmi-nand:16m(bootloader),16m(bootimg),32m(recovery),-(root) ubi.mtd=3
<pre>
setenv bootargs console=ttymxc0,115200 init=/init ldb=sin1 video=mxcfb0:dev=ldb,800x600M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off arm_freq=1000 fbmem=24M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale gpumem=64M mtdparts=gpmi-nand:16m(bootloader),16m(bootimg),32m(recovery),-(root) ubi.mtd=3
</pre>
</pre>
= Ethernet<br/> =


= Ethernet =
Just plug a cable into the system
Just plug a cable into the system


= WIFI<br/> =
= WiFi =
 
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.


Test with file transfer to host PC, Bluetooth mouse and Bluetooth keyboard.
Test with file transfer to host PC, Bluetooth mouse and Bluetooth keyboard.


= Camera<br/> =
= 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.
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| NOTE:<br>
{{note| NOTE:<br>
Line 80: Line 83:
|info}}
|info}}


= SATA<br/> =
= SATA =
<pre>cat /proc/scsi/scsi
<pre>
busybox fdisk -ul /dev/block/sda
# cat /proc/scsi/scsi
# busybox fdisk -ul /dev/block/sda
</pre>
</pre>
In the above commands you will see SCSI status and device partition table.
In the above commands you will see SCSI status and device partition table.
Line 88: Line 92:
If the device is FAT32 formated Android will auto mount it.
If the device is FAT32 formated Android will auto mount it.


= RTC (Real Time Clock)<br/> =
= RTC (Real Time Clock) =
 
Disable the auto clock sync from the Android GUI.
Disable the auto clock sync from the Android GUI.
<pre>busybox date 2013.12.01-10:50
<pre>
busybox hwclock --systohc</pre>
# date "123123592017.00"
# hwclock --systohc
</pre>
Also can set clock via GUI and check it later.
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.
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/> =
= CAN bus =
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.


Connect 2 boards. Each board JP26 connect to the other with the right cable.
Connect 2 boards. Each board JP26 connect to the other with the right cable.
Set the 2 boards:
Set the 2 boards:
<pre>$ ip link set can0 up type can bitrate 1000000
<pre>
$ busybox ifconfig can0 up up</pre>
# ip link set can0 up type can bitrate 1000000
# busybox ifconfig can0 up up
</pre>
On board 1:
On board 1:
<pre>$ candump can0</pre>
<pre>
# candump can0
</pre>
On board 2:
On board 2:
<pre>$ cansend can0 500#1E.10.10</pre>
<pre>
# cansend can0 500#1E.10.10
</pre>

Revision as of 16:09, 23 July 2017

Unit Testing

Audio

The default Android sound recorder application use a a very low sampling rate producing a poor sound.

Plug a Disk-On-Key FAT32 formatted into the USB host port.

Plug an audio source (like a PC line out or smartphone line out) into the line in connector.

Plug speakers (like PC speakers) into the line out connector.

root@android:/ # tinycap /mnt/udisk/48b.wav -d 0 -b 24 -c 2 -r 48000 

Hit CTRL-C after couple of seconds or more.

root@android:/ # tinyplay /mnt/udisk/48b.wav  

USB OTG as a device

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

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.

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.

HDMI

Boot the system and press spacebar to get into u-boot.

Change enviroment setting with the folowing command

setenv bootargs console=ttymxc0,115200 androidboot.console=ttymxc0 init=/init video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32 video=mxcfb2:off arm_freq=1000 fbmem=28M vmalloc=400M androidboot.hardware=freescale caam mxc_hdmi.only_cea=1 mtdparts=setenv mtdpar gpmi-nand:16m(bootloader),16m(bootimg),32m(recovery),-(root) ubi.mtd=3 var_ts_type=ctw6120

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.

External LVDS display

Boot the system and press any key to stop autoboot and get to the U-Boot command line.
Change environment setting with the following commands:

For Quad, Dual and DualLite SOM's use:

setenv bootargs console=ttymxc0,115200 init=/init ldb=sin1 video=mxcfb0:dev=ldb,800x600M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off arm_freq=1000 fbmem=24M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale mtdparts=gpmi-nand:16m(bootloader),16m(bootimg),32m(recovery),-(root) ubi.mtd=3

For Solo use:

setenv bootargs console=ttymxc0,115200 init=/init ldb=sin1 video=mxcfb0:dev=ldb,800x600M@60,bpp=32 video=mxcfb1:off video=mxcfb2:off arm_freq=1000 fbmem=24M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale gpumem=64M mtdparts=gpmi-nand:16m(bootloader),16m(bootimg),32m(recovery),-(root) ubi.mtd=3

Ethernet

Just plug a cable into the system

WiFi

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

Bluetooth

Use the Android GUI to enable.

Test with file transfer to host PC, 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

# cat /proc/scsi/scsi
# 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.

RTC (Real Time Clock)

Disable the auto clock sync from the Android GUI.

# date "123123592017.00"
# 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.

CAN bus

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