Difference between revisions of "CM-FX6: Android: Operating instructions"

From Compulab Mediawiki
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= Overview =
 
= Overview =
This page contains information useful for day-to-day operating of CM-FX6 Android package.
+
Most CM-FX6 [http://www.compulab.co.il/products/operating-systems-and-drivers-for-cm-fx6-and-sbc-fx6 supported features] are operated using normal Android controls.<br/>
 +
This page contains information about features and services, which are less straight-forward to operate, or are less widely known.
  
 +
= Operating instructions =
 
=== Display configuration ===
 
=== Display configuration ===
 
By default CM-FX6 is configured to use HDMI display with 1080p resolution.<br/>
 
By default CM-FX6 is configured to use HDMI display with 1080p resolution.<br/>
Line 11: Line 13:
 
setenv videomode video=mxcfb0:dev=dvi,if=RGB24,1920x1080M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off    # DVI display with 1080p resolution
 
setenv videomode video=mxcfb0:dev=dvi,if=RGB24,1920x1080M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off    # DVI display with 1080p resolution
 
setenv videomode video=mxcfb0:dev=dvi,if=RGB24,1280x1024M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off    # DVI display with 1280x1024 resolution
 
setenv videomode video=mxcfb0:dev=dvi,if=RGB24,1280x1024M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off    # DVI display with 1280x1024 resolution
 +
setenv videomode video=mxcfb0:dev=lcd,if=RGB666,SCF04-WVGA video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off      # DataImage 480x800 LCD
 
setenv videomode video=mxcfb0:dev=lcd,if=RGB24,KD050C-WVGA video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off      # Startek 800x480 LCD
 
setenv videomode video=mxcfb0:dev=lcd,if=RGB24,KD050C-WVGA video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off      # Startek 800x480 LCD
 
</pre>
 
</pre>
 
* Type in '''boot''' to proceed to kernel boot overriding default video mode.
 
* Type in '''boot''' to proceed to kernel boot overriding default video mode.
 +
 +
=== Handling memory shortage ===
 +
Devices with small amount of physical memory (~512MB) might experience memory shortage expressed by system processes being killed and restarted repeatedly, resulting in performance lag.<br/>
 +
In this case, freeing up some memory reserved for graphics sub-system might turn out useful, e.g. by degrading screen resolution to 720p and lowering GPU-reserved memory below default 192MB, by appropriately setting ''videomode'' bootloader variable:
 +
<pre>
 +
setenv videomode video=mxcfb0:dev=hdmi,if=RGB24,1280x720M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off gpumem=64M
 +
</pre>
 +
 +
=== Accessing Bootloader Variables from Android ===
 +
CM-FX6 Android is packed with '''fw_printenv''' and '''fw_setenv''' u-boot tools, that allow viewing and setting U-Boot environment variables from Android, as opposed to U-Boot console.<br/>
 +
For instance, '''display configuration''' settings could be overridden from Android:
 +
* Connect ADB to CM-FX6
 +
* On PC workstation, issue
 +
$ adb root
 +
{{Note | In case ADB is connected via USB, detach / re-attach USB cable.}}
 +
* Display ''videomode'' setting
 +
$ adb shell fw_printenv videomode
 +
* Set ''videomode'' to DVI
 +
$ adb shell fw_setenv videomode video=mxcfb0:dev=dvi,if=RGB24,1920x1080M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off
 +
* Reboot CM-FX6
 +
 +
=== Automatic suspend when inactive ===
 +
By default, CM-FX6 is configured to stay awake while connected to the power.<br/>
 +
In order to change this behavior, proceed to '''Settings'''->'''Developer options''', uncheck '''Stay awake ... while charging''' to enable the device going to suspended state.
 +
{{Note|If '''Developer options''' item is hidden, re-introduce it proceeding to '''Settings'''->'''About tablet''' and clicking on '''Build number''' 7 times consequently.}}
  
 
=== ON/OFF button ===
 
=== ON/OFF button ===
Line 21: Line 49:
 
=== Graceful shutdown ===
 
=== Graceful shutdown ===
 
Due to specifics of i.MX6 SoC hardware, the ON/OFF button cannot be used to bring up the Android '''Power off''' menu.<br/>
 
Due to specifics of i.MX6 SoC hardware, the ON/OFF button cannot be used to bring up the Android '''Power off''' menu.<br/>
CM-FX6 pre-configures GPIO 29 (P18, pin 2 on SB-FX6 base board) as GPIO Power Button. As GPIO 29 has an internal pull-up resistor, it can be momentarily connected to the ground to produce a 'power button press'. Short press will behave identically to short press on ON/OFF button, whereas long press will bring up the '''Power off''' menu allowing graceful shutdown.
+
CM-FX6 pre-configures GPIO 29 (P18, pin 2 on SB-FX6 base board) as GPIO Power Button. As GPIO 29 has an internal pull-up resistor, it can be momentarily connected to the ground to produce a ''power button press''. Short press will behave identically to short press on ON/OFF button, whereas long press will bring up the '''Power off''' menu allowing graceful shutdown.
 +
 
 +
=== Physical HOME button ===
 +
GPIO 205 (GPIO7_13) is pre-programmed as hadware HOME key.
  
 
=== Security ===
 
=== Security ===
Line 29: Line 60:
  
 
=== Start-up script ===
 
=== Start-up script ===
'''/system/etc/install-recovery.sh''' script is run upon system boot by Android ''init'' process.<br/>
+
'''/system/etc/install-recovery.sh''' script is run upon system boot by Android ''init'' process with ''root'' permissions.<br/>
 
As ''system'' partition is mounted 'read-only', one should remount ''system'' 'rw', prior to attempting to edit the script.
 
As ''system'' partition is mounted 'read-only', one should remount ''system'' 'rw', prior to attempting to edit the script.
  
== For devices running Ice Cream Sandwich ==
+
=== Networking ===
 +
Normal Android behavior is to prioritize network interfaces (in descend order):
 +
* Ethernet
 +
* Wi-Fi
 +
* ''3G [not supported]''
 +
Whenever higher-priority network interface is available, the lower-priority interfaces will be torn down.
  
=== Networking ===
+
=== Audio sink selection ===
Normally, when both networking interfaces are enabled (Ethernet, Wi-Fi), CM-FX6 Android will tear Wi-Fi down preferring Ethernet.<br/>
+
CM-FX6 may use either one of the following audio devices:
In order to override this policy, enabling Ethernet and Wi-Fi co-existence, proceed to the console, and type in:
+
* '''HDMI''' - default when HDMI video is selected, and totally inaccessible otherwise
<pre>
+
* '''analog''' - default when DVI video is selected
# setprop compulab.net.disable_policy true    # (or 'y', or '1')
+
* '''S/PDIF'''
</pre>
+
Audio sink selection should be done with a designated application, e.g. ''SoundAbout'', available via Google Play Store.<br/>
  
=== S/PDIF audio ===
+
{| class="wikitable" border="1" cellspacing="0"
Normally, Android audio streams to HDMI or analog audio codec according to configuration.<br/>
+
! audio device
In order to switch audio output to S/PDIF, proceed to the console, and type in:
+
! sink name
<pre>
+
|-
# setprop compulab.audio.spdif 1
+
| HDMI
</pre>
+
| Aux Digital (HDMI)
 +
|-
 +
| analog
 +
| Speaker
 +
|-
 +
| S/PDIF
 +
| Wired Headphones
 +
|}
  
 +
{{Note|If after making the selection with ''SoundAbout'' nothing happens, restart the application.}}
  
 
[[Category:Android]]
 
[[Category:Android]]
 
[[Category:CM-FX6]]
 
[[Category:CM-FX6]]

Latest revision as of 13:59, 4 November 2014

Overview

Most CM-FX6 supported features are operated using normal Android controls.
This page contains information about features and services, which are less straight-forward to operate, or are less widely known.

Operating instructions

Display configuration

By default CM-FX6 is configured to use HDMI display with 1080p resolution.
This setting can be overridden by providing alternate boot arguments to the Android/Linux kernel.

  • Connect to the serial console as explained in the Development section.
  • Press ENTER to stop the countdown.
setenv videomode video=mxcfb0:dev=hdmi,if=RGB24,1920x1080M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off    # default video mode (HDMI)
setenv videomode video=mxcfb0:dev=dvi,if=RGB24,1920x1080M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off     # DVI display with 1080p resolution
setenv videomode video=mxcfb0:dev=dvi,if=RGB24,1280x1024M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off     # DVI display with 1280x1024 resolution
setenv videomode video=mxcfb0:dev=lcd,if=RGB666,SCF04-WVGA video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off       # DataImage 480x800 LCD
setenv videomode video=mxcfb0:dev=lcd,if=RGB24,KD050C-WVGA video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off       # Startek 800x480 LCD
  • Type in boot to proceed to kernel boot overriding default video mode.

Handling memory shortage

Devices with small amount of physical memory (~512MB) might experience memory shortage expressed by system processes being killed and restarted repeatedly, resulting in performance lag.
In this case, freeing up some memory reserved for graphics sub-system might turn out useful, e.g. by degrading screen resolution to 720p and lowering GPU-reserved memory below default 192MB, by appropriately setting videomode bootloader variable:

setenv videomode video=mxcfb0:dev=hdmi,if=RGB24,1280x720M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off gpumem=64M

Accessing Bootloader Variables from Android

CM-FX6 Android is packed with fw_printenv and fw_setenv u-boot tools, that allow viewing and setting U-Boot environment variables from Android, as opposed to U-Boot console.
For instance, display configuration settings could be overridden from Android:

  • Connect ADB to CM-FX6
  • On PC workstation, issue
$ adb root
Admolition note.png In case ADB is connected via USB, detach / re-attach USB cable.
  • Display videomode setting
$ adb shell fw_printenv videomode
  • Set videomode to DVI
$ adb shell fw_setenv videomode video=mxcfb0:dev=dvi,if=RGB24,1920x1080M@60 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off
  • Reboot CM-FX6

Automatic suspend when inactive

By default, CM-FX6 is configured to stay awake while connected to the power.
In order to change this behavior, proceed to Settings->Developer options, uncheck Stay awake ... while charging to enable the device going to suspended state.

Admolition note.png If Developer options item is hidden, re-introduce it proceeding to Settings->About tablet and clicking on Build number 7 times consequently.

ON/OFF button

ON/OFF button suspends and resumes CM-FX6 operation (i.e. sends to sleep / wakes up), whenever suspend is not disabled manually, or by Android policy.
Pressing and holding the ON/OFF button for more than 5 seconds, will unconditionally power the module down. This operation is pretty much equivalent to unplugging the power supply, so it should really be considered the last resort.

Graceful shutdown

Due to specifics of i.MX6 SoC hardware, the ON/OFF button cannot be used to bring up the Android Power off menu.
CM-FX6 pre-configures GPIO 29 (P18, pin 2 on SB-FX6 base board) as GPIO Power Button. As GPIO 29 has an internal pull-up resistor, it can be momentarily connected to the ground to produce a power button press. Short press will behave identically to short press on ON/OFF button, whereas long press will bring up the Power off menu allowing graceful shutdown.

Physical HOME button

GPIO 205 (GPIO7_13) is pre-programmed as hadware HOME key.

Security

CM-FX6 Android package permits full root access.
The su utility will switch a user to root not requiring any credentials or password.
In order to harden system security one might replace su implementation or remove it altogether.

Start-up script

/system/etc/install-recovery.sh script is run upon system boot by Android init process with root permissions.
As system partition is mounted 'read-only', one should remount system 'rw', prior to attempting to edit the script.

Networking

Normal Android behavior is to prioritize network interfaces (in descend order):

  • Ethernet
  • Wi-Fi
  • 3G [not supported]

Whenever higher-priority network interface is available, the lower-priority interfaces will be torn down.

Audio sink selection

CM-FX6 may use either one of the following audio devices:

  • HDMI - default when HDMI video is selected, and totally inaccessible otherwise
  • analog - default when DVI video is selected
  • S/PDIF

Audio sink selection should be done with a designated application, e.g. SoundAbout, available via Google Play Store.

audio device sink name
HDMI Aux Digital (HDMI)
analog Speaker
S/PDIF Wired Headphones


Admolition note.png If after making the selection with SoundAbout nothing happens, restart the application.