VAR-SOM-MX6 Android Unit Testing

From Variscite Wiki
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 any key to stop autoboot and get to the U-Boot command line.

Change the bootargs environment variable and boot:

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

You should see Android via HDMI@1080p.

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 (or: hwclock -f /dev/rtc0 --systohc)

You can also set the clock via the 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 CAN bus 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
# ifconfig can0 up up

On board 1:

# candump can0

On board 2:

# cansend can0 500#1E.10.10