OMAP Pandroid Main
From OMAPpedia
IMPORTANT: The content of this page is outdated. If you have checked or updated this page and found the content to be suitable, please remove this notice. |
The Pandroid project has been retired after the last stable Gingerbread based release. PandaBoard community efforts on Android port are now consolidated in Linaro's Android Evaluation Builds. Android Open Source Project aka Upstream has support for PandaBoard and you can get started here
Contents
|
[edit] Latest Revisions
Check the OMAPpedia Release_Notes for the latest Pandroid revisions (listed as PandaBoard Release Notes / Android). As of this writing, L27.10.2 for Froyo and L27.12.2 for Gingerbread are current.
[edit] Pandroid
Pandroid is the port of Android on PandaBoard, the OMAP4 platform. More details on the Pandroid project are at http://pandroid.org . The PandaBoard details are available at http://pandaboard.org . The site also has downloads of pre-built binaries and the Issues list.
[edit] Source
Pandroid dev trees are located at: http://gitorious.org/pandroid and http://gitorious.org/pandaboard
Android file system can be taken from git.omapzoom.org . Please refer to http://omappedia.org/wiki/Android_source_code_versions for Android source code.
[edit] Pre-built Binaries
- Pre-built binaries for Pandroid can be obtained from
For instructions on how to format the SD card and copy the pre-built binaries, refer to Android_Pre-built_Binaries_Guide
Below video shows Pandroid(Port of Android) bootup on PandaBoard:
[edit] Using L27.8.2 AFS
There are some limitations and known issues with L27.8.2 AFS. Please follow the below instructions to use this release.
- GFX package MUST be installed in order to load GUI in this release. Package can be obtained from the GFX link
- Also use the below bootargs
setenv bootargs 'console=ttyO2,115200n8 mem=463M root=/dev/mmcblk0p2 rw rootdelay=2 init=/init vram="32M" omapfb.vram="0:24M"' mmcinit 0;fatload mmc 0 0x80000000 uImage; bootm 80000000
- There is a known issue with the launcher as the screen co-ordinates are off using the mouse cursor. You could use the Menu and add the applications to the home screen to access them.
You can refer to Release Notes for more details on this release
[edit] Getting Started
This section provides general instructions on how to get the PandaBoard started.
You will need to set up your MMC card. Use the shell script provided to simplify things.
Once the MMC card is set up, there are two ways to continue.
- Use a set of prebuilt binaries to boot up.
- Build your own binaries. Click here
You will then need to copy u-boot.bin, MLO and uImage (that you just built or downloaded) to the boot partition of the MMC card.
Next you will need a file system. To use a minimal file system, try this link. Others can be found here. Once you've downloaded the tar ball, you can extract it into the second partition on the MMC card.
Also, you will need a HDMI to DVI cable in case you are hooking a DVI monitor to the PandaBoard. Read this to learn more. What this means is you might have to add a few boot arguments while booting the PandaBoard (read on!)
Using a Serial A-to-B connector, connect the PandaBoard to the Serial Port on your PC. Follow this to setup your PC. (This is generally COM1).
On Windows, you should use Hyperterminal and on linux, Minicom to connect to the serial port (COM1). If all is well, when you insert the MMC card into its slot on the PandaBoard and power up your system, you should see the bootloader starting up and a prompt to hit a key to stop autoboot on the termianal in your PC. Now, hit a key to stop autoboot. This should lead to a "PANDA" prompt.
You will need to use boot arguments to load the kernel and start it up with the file system. Read here.
If all this worked, with the minimal filesystem, you will see a root prompt ("/ #") on the terminal and with other distros, the display should have booted up. You are now ready to go!
[edit] Selecting a Release
The example below shows the instructions for building L27.5.2 release. Please refer to for update on latest releases.
Latest release - L27.8.2
- Binary release
- Release Notes Pandroid_Froyo_L27.8.2_Release_Notes
[edit] Tools and Dependencies
Please refer to Release Notes for the tools needed for compiling the source.
For more instructions on setting up the Host environment and tools, please refer to Building_Android
[edit] Building bootloader and kernel
[edit] Bootloader
Start with building the bootloader. To learn more about the bootloader process or to clarify details, look in here
Use the link above for commands on how to build u-boot and MLO. Use the parameters provided below with those commands
Once you have cloned a git source, you will need to switch to a branch indicated below (for bootloader or kernel).
/* This command lists the various branches to switch to and the current branch on*/ git branch -a /*This command switches HEAD to a particular branch*/ git checkout -b
u-boot
source: git://gitorious.org/pandaboard/u-boot.git branch: origin/omap4_panda_es2.0 board config: omap4430panda_config
xloader
source: git://gitorious.org/pandaboard/x-loader.git branch: origin/omap4_panda_L24.9 board config: omap4430panda_config
[edit] Kernel
Once done building the bootloader, copy u-boot.bin and mkimage to a PATH folder and build the kernel. (Additional details can be found at here)
source: git://gitorious.org/pandroid/kernel-omap branch: origin/L27.5.2_panda board config: android_4430panda_defconfig
Latest release
source: git://gitorious.org/pandroid/kernel-omap branch: origin/L27.8.2_panda board config: android_panda_defconfig
[edit] Android filesystem
The filesystem that is being used on PandaBoard is the reference file system from TI OMAP4 releases. These are referred with L27x tags. Pandroid releases are rebased almost once a month. Please refer to the for latest update on releases.
The below example shows the instructions for the Froyo release from L27.5.2. You can refer to the details on the release and the build instructions from http://omappedia.org/wiki/L27.INC1.5.2_Froyo_ES2_Release_Notes
[edit] Get Reference Source
You can get the Android source for this release by doing:
git clone git://git.omapzoom.org/platform/omapmanifest.git cd omapmanifest git reset --hard RLS27.5.2_Froyo export MANIFEST=`pwd` mkdir -p 27.5.2/mydroid; cd 27.5.2/mydroid export MYDROID=`pwd` repo init -u $MANIFEST repo sync
Note: The manifest for some releases also contains the Bootloader. Ignore these as they are meant for the Blaze platform. Build them from the PandaBoard projetc in gitorious.
[edit] Add Pandroid features
Pandroid provides a desktop like environment with the use of HDMI display and USB keyboard and mouse. To enable mouse cursor support and some PandaBoard specific features, please apply the following patches on top of your filesystem source.
Thanks to rowboat project from where we can cherry pick these patches.
Add rowboat git tree as a remote to cherry pick the patches. The patches are to be applied in frameworks/base.
After cloning (repo sync) the TI Blaze release, perform the following.
cd frameworks/base git remote add rowboat git://gitorious.org/rowboat/frameworks-base.git git fetch rowboat git branch -a git cherry-pick 24117ce3ae32c40798d2d9bda80675814f76730d git cherry-pick ac82681dffdba3ad0b93ed3558365bac1dacbcd1 git cherry-pick b0f60c6 git cherry-pick afee303 git cherry-pick 64d7c77
[edit] Building Android Filesystem (AFS)
cd $MYDROID cp -Rfp device/ti/blaze/buildspec.mk.default buildspec.mk
Building AFS with Android Codecs Edit: “device/ti/blaze/BoardConfig.mk”: Uncomment “USE_CAMERA_STUB := true” Comment “BOARD_USES_TI_CAMERA_HAL := true” Comment "HARDWARE_OMX := true”
Note: No change in BoardConfig.mk to use TI Codecs
On step below use the number of cores you have available; i.e. -j4 or -j12:
make clean (required for rebuild only) make -j4 2>&1 |tee $MYDROID/logs/android_make.out
[edit] Preparing Android binaries
For Gingerbread and onwards, the default build system generates eMMC based binaries, making Android eMMC Booting as default.
The following steps will prepare a directory, called myfs, containing all necessary Android files that you must include within your SD card.
cd $YOUR_PATH mkdir myfs cd myfs cp -Rfp $MYDROID/out/target/product/blaze/root/* . cp -Rfp $MYDROID/out/target/product/blaze/system/ . cp -Rfp $MYDROID/out/target/product/blaze/data/ . cp -Rfp $MYDROID/device/ti/blaze/init.omap4sdp.rc init.rc ==== Copy BT drivers and firmware ==== cp -Rfp/drivers/misc/ti-st/bt_drv.ko . cp -Rfp /drivers/misc/ti-st/st_drv.ko . cp -Rfp TIInit_7.2.31.bts system/etc/firmware ==== Copy WLAN drivers and firmware === cp -Rfp $MYDROID/hardware/ti/wlan/wl1271/platforms/os/linux/tiwlan_drv.ko system/etc/wifi cp -Rfp firmware.bin system/etc/wifi
Next, modify the following file in the android file system created - tiwlan.ini file in directory system/etc/wifi.
Change the line 193 FROM: STRFRefClock = 1 # Unit: Options 5'bXX000 : Bit 0,1,2 - (0: 19.2MHz; 1: 26MHz; 2: 38.4MHz (Default); 3: 52MHz; 4: 38.4MHz XTAL) ; TO: STRFRefClock = 2 # Unit: Options 5'bXX000 : Bit 0,1,2 - (0: 19.2MHz; 1: 26MHz; 2: 38.4MHz (Default); 3: 52MHz; 4: 38.4MHz XTAL) ;
Only change the STRFRefClock value from 1 to 2. The default tiwlan.ini is preset for the Blaze and the Pandaboard requires a different value.
[edit] Additional Changes
Once you have created the Android filesystem (AFS), please make the below changes. Currently, PandaBoard is using the product spec from Blaze (another OMAP4 dev platform) and hence some changes are needed.
In "init.rc" file, diable the secondary display (comment out the below 4 lines)
# Enable secondary display on Blaze # write /sys/devices/platform/omapdss/display1/enabled 1 # write /sys/devices/platform/omapdss/overlay1/enabled 0 # write /sys/devices/platform/omapdss/overlay1/manager "2lcd" # write /sys/devices/platform/omapdss/overlay1/enabled 1
To mount the SD card, update "vold.fstab" file in system/etc/ to indicate 'mmc1' instead of 'mmc0'
## Example of a standard sdcard mount for the emulator / Dream # Mounts the first usable partition of the specified device Change dev_mount sdcard /mnt/sdcard auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc1 To dev_mount sdcard /mnt/sdcard auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc0
Note: Media clips are copied in the 1st partition (boot) for them to be detected by Gallery app. If your SD card is not getting mounted, you could try through "Media Scanner" app.
[edit] A minimal FileSystem
You could also try the following minimal filesystem.
wget http://www.elinux.org/images/b/bd/Minimal-rootfs.tar.gz add init=/linuxrc to the bootargs
[edit] Bootargs
setenv bootargs 'console=ttyO2,115200n8 mem=463M root=/dev/mmcblk0p2 rw rootdelay=2 init=/init vram="32M" omapfb.vram="0:24M"' mmcinit 0;fatload mmc 0 0x80000000 uimage; bootm 80000000
[edit] Features
Below sections will show you how to enable certain feature on the Pandroid port & filesystem.
[edit] HDMI to DVI
Using a DVI to HDMI cable, if plugged into the HDMI port a DVI display works at resolutions up to 1920x1080p-60.
[edit] USB Mouse
USB mouse with mouse cursor has been verified by using the following patch (thanks to Android port on x-86) on L27.5.2.
Features - Mouse cursor movement, Scroll, Left Button Click - Selection, Middle Button - Menu, Right Button - Back
[edit] Graphics Accelerator Drivers
[edit] Source
The Android file system and kernel require changing to fold in the GFX libraries.
The GFX libraries can be downloaded from https://gforge.ti.com/gf/project/omapgraphics/frs/
Make sure the Linux kernel is correct. The kernel source git repository is located and can be cloned at:
git clone git://gitorious.org/pandroid/kernel-omap.git -b L27.5.2_panda
Note the tag used to pull the source. L27.5.2_panda is the mainline tag for Pandroid.
The pre-built binaries (including the Android file system) can be downloaded at:
[edit] Build Instructions
Run the menuconfig facility in your downloaded kernel.
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig
Select the menu Device Driver, then select Graphics Support. Next, select the PowerVR SGX menu item for it to be built into the kernel. The SGX revision (Revision 1.2.0 - Omap 4430 ES2) and PowerVR build type menu items will appear after selection.
The first menu item, SGX revision, is a TI internal option and can be safely ignored. The second menu item leverages debug facilities in the GFX libraries. Selecting DEBUG versus RELEASE is unlikely to help during the build process, but may be helpful during application development.
Once the menuconfig is set, make the kernel uImage using the command:
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage
After the uImage is compiled, set up the boot partition as normal and the kernel part will be complete.
Next, the Android file system needs to be addressed. Go to the top level directory of the GFX libs install. For example:
cd GFX_Binaries_Froyo_L27.5.2/ user@ccdm64:~/GFX_Binaries_Froyo_L27.5.2$ ls data system uninstall
The data and system directories correspond directly to the Android file system's /system and /data directories respectively. Ignore the uninstall file. Next, copy the files into the target Android file system. The commands below assume you have already prepared your Android root file system with a partition label ROOTFS on a SD card. If your setup is different paste the commands into an editor and modify accordingly. It is also assumed root permissions are required on the Android file system target. If not necessary, do not use sudo for copying.
sudo cp data/app/* /media/ROOTFS/data/app sudo cp system/bin/* /media/ROOTFS/system/bin sudo cp system/lib/egl/* /media/ROOTFS/system/lib/egl sudo cp system/lib/hw/* /media/ROOTFS/system/lib/hw sudo cp system/lib/lib* /media/ROOTFS/system/lib
No changes are necessary for /init.rc on the Android root file system. One of the GFX files copied was an egl.cfg. This file will be recognized by the kernel (remember the menuconfig steps?),and commands already located in the init.rc will load the correct GFX libs.
A video tutorial on using GFX on Pandroid can be found below :
[edit] How to Test
Once the Panda has finished booting, there are three approaches for verifying the install. The first is to review the logcat output from the console. The second is to run example programs there were among the files copied onto the Android file system. The third is to run the tests from the Android desktop via mouse (See YouTube video).
The logcat command will show whether the kernel was able to load the GFX libraries. If the libraries failed to load, logcat will indicate a kernel fault with the addresses where the fault occurred.
The other approach is to run the Android package programs from the console. In the /data/app/ there are the following test programs:
/data/app# ls eglinfo.apk gles1test1.apk gles1_texture_stream.apk gles2test1.apk gles2_texture_stream.apk launcher.apk
Each program can be run from the Android desktop display or the serial console. For instance, in the program gles1test1, there will appear two rotating triangles. Other programs are based on the same images and animation but have different execution behaviors. Below are commands for running the test programs in the order of the above listing.
am start -a android.intent.action.MAIN -n com.imgtec.powervr.ddk.eglinfo/com.imgtec.powervr.ddk.eglinfo.EGLInfo am start -a android.intent.action.MAIN -n com.imgtec.powervr.ddk.gles1test1/com.imgtec.powervr.ddk.gles1test1.GLES1Test1 am start -a android.intent.action.MAIN -n com.imgtec.powervr.ddk.gles1_texture_stream/com.imgtec.powervr.ddk.gles1_texture_stream.GLES1TextureStream am start -a android.intent.action.MAIN -n com.imgtec.powervr.ddk.gles2test1/com.imgtec.powervr.ddk.gles2test1.GLES2Test1 am start -a android.intent.action.MAIN -n com.imgtec.powervr.ddk.gles2_texture_stream/com.imgtec.powervr.ddk.gles2_texture_stream.GLES2TextureStream am start -a android.intent.action.MAIN -n com.imgtec.powervr.ddk.launcher/com.imgtec.powervr.ddk.launcher.Launcher
If the program runs without crashes indicated by the desktop or logcat, chances are the GFX libraries are working fine.
NOTE: There is an environment issue with Pandroid where the apk exits after a few frames when run from the console. The pageflipping feature in Android disrupts the GFX test. A workaround is actually using a smaller omapfb.vram value, making Android pageflipping impossible. Use the bootargs below as only a guide for testing the above apk programs. It is best to increase the vram and omapfb.vram back to the suggested size, once testing is complete.
setenv bootargs 'console=ttyO2,115200n8 root=/dev/mmcblk0p2 rw rootdelay=3 mem=463M init=/init omapfb.vram="0:9M" vram=9M androidboot.console=ttyO2 earlyprintk omapdss.debug=1 loglevel=8' mmcinit 0; fatload mmc 0 0x80000000 uImage;bootm 80000000'
[edit] WiLink Connectivity
[edit] Release Package
Connectivity release package contains the Init scripts, Firmware.bin and any other patches that may be needed to enable WLAN and BT on Pandroid. Download the package and copy the files in the appropriate folders as per isntructions.
[edit] Bluetooth
[edit] Source
The kernel source git repository for Pandroid is located and can be cloned from:
git clone git://gitorious.org/pandroid/kernel-omap.git -b L27.5.2_Panda_new
Note the tag used to pull the source. L27.5.2_Panda_new is the branch that has support for BT and WLAN for Pandroid.
[edit] Build Instructions
BT is built as a module in kernel. After building the kernel, make sure to build the modules.
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules
This will generate bt_drv.ko and st_drv.ko.
[edit] How to Enable/Test Bluetooth
Ensure following before starting the BT validation
1) Please follow the steps mentioned in "Preparing Android binaries" section to copy BT driver (bt_drv.ko and st_drv.ko) to file system (root folder)http://omappedia.org/wiki/OMAP_Pandroid_Main#Android_filesystem
2) Copy TIInit_7.2.31.bts (BT init script for WL127x) from the Download the WLAN 1271 Connectivity Package.
to system/etc/firmware while preparing file system (SDCARD).
Important Notes
The UIM service (in init.rc - uim /dev/ttyO2...) loads st_drv.ko and bt_drv.ko. The BT and ST moudles should not be manually loaded.
To check whether the modules are inserted into kernel or not, issue the following command ‘$ lsmod’ this will list all the modules inserted in the kernel.
Below is a video example on how to enable and use Bluetooth on Pandroid :
Test BT from Android UI
1. Go to Settings, Wireless and Network
2. Select "Bluetooth". This will show "Turning On..."
3. Once BT is turned On, click Bluetooth Settings.
4. Select "Scan for Devices". This should start scanning other BT enabled devices around and list them.
5. For Panda to be seen by other devices, you'll have to turn the "Discoverable" option "On".
6. You can change the "Device Name" to identify your PandaBoard
7. Once "Discoverable" mode has been enabled, you can initiate Pairing with other devices.
Object transfer through Gallery app
1. Go to Gallery menu, choose any file
2. Long press on the file
3. Green color tick mark symbol is seen on the right hand corner of that file
4. Go to shareBluetoothchoose the remote device to transfer the files
NB:- Make sure the remote device should discoverable and paired.
Test BT config from command prompt
To turn on BT, execute "hciconfig hci0 up &" command on terminal
The expected (typical) output would be:
<6>kim kim: firmware: requesting TIInit_7.2.31.bts kim kim: firmware: requesting TIInit_7.2.31.bts <3>init: untracked pid 1018 exited init: untracked pid 1018 exited [1] Done hciconfig hci0 up
To check the status of BT, execute "hciconfig -a"
The expected (typical) output would be:
hci0: Type: UART BD Address: 00:23:D4:50:37:F9 ACL MTU: 1021:4 SCO MTU: 180:4 UP RUNNING RX bytes:702 acl:0 sco:0 events:23 errors:0 TX bytes:102 acl:0 sco:0 commands:23 errors:0 Features: 0xff 0xff 0x2d 0xfe 0x9b 0xff 0x79 0x83 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: Link mode: SLAVE ACCEPT Name: Class: 0x001f00 Service Classes: Unspecified Device Class: Invalid Device Class! HCI Ver: 2.1 (0x4) HCI Rev: 0x0 LMP Ver: 2.1 (0x4) LMP Subver: 0x1d1f Manufacturer: Texas Instruments Inc. (13)
To discover/scan BT devices in range, execute "hcitool scan" command in termial
The expected (typical) output would be:
Scanning ... 00:24:7D:09:E2:58 Ignatius N5800 00:1B:11:6F:A4:16 test1 00:1E:3A:7C:E0:39 N 95 00:16:38:3A:6C:E2 MINX0132901
[edit] WLAN
[edit] Builing WLAN driver (1271)
- Download the WLAN 1271 Connectivity Package.
It has the patch, firmware binary and BT/FM init scripts.
- 0001-Patch-for-WL1271-driver-for-Blaze-COM6-and-Pandroid.patch / 0001-omap_pm_set_min_mpu_freq-is-not-defined-in-p-android.patch must be applied to WiLink6 driver in order to load the driver on Blaze + COM6 setup.
- Apply the patch:
$cd hardware/ti/wlan/
To check whether the WiLink6 driver is latest, check the git log for following commit ID: c7e399e2804729c5d271ce58a9f299a2fa2a0631.
$git apply --stat --check -v//to check whether old patch can be applied or not
$git apply -v//to actually apply patch
$git apply --stat --check -v//to check whether old patch can be applied or not
$git apply -v//to actually apply patch
- Apply the patch:
- Building WLAN Driver
Update following environment variables in wl_env.bash file located at
$MYDROID/hardware/ti/wlan/wl1271/platforms/os/linux/
export CROSS_COMPILE=arm-none-linux-gnueabi-
export ARCH=arm
export HOST_PLATFORM=blaze
export KERNEL_DIR=
(e.g.) export KERNEL_DIR=/home/name/omap4/pandroid/L27.8.2_panda/kernel-omap
$cd $MYDROID/hardware/ti/wlan/wl1271/platforms/os/linux/
$source wl_env.bash $make
We will get tiwlan_drv.ko in $MYDROID/hardware/ti/wlan/wl1271/platforms/os/linux/
- Configuration for WLAN
Make sure the file vendor device $MYDROID/ti/blaze/BoardConfig.mk has all wifi related definitions:
- Wifi
BOARD_WLAN_DEVICE := wl1271
WPA_SUPPLICANT_VERSION := VER_0_6_X
WIFI_DRIVER_MODULE_PATH := "/system/etc/wifi/tiwlan_drv.ko"
WIFI_DRIVER_MODULE_NAME := "tiwlan_drv"
WIFI_FIRMWARE_LOADER := "wlan_loader"
Make sure the system property file $MYDROID/device/ti/blaze/system.prop has definition for wifi interface
wifi.interface=tiwlan0
[edit] Installing 1271 WLAN firmware from the package
Place the file tiwlan_drv.ko build from previous step to system/etc/wifi. Go to platform/os/linux folder and copy the required files to file system:
$ cd $MYDROID/hardware/ti/wlan/wl1271/platforms/os/linux
$ cp tiwlan_drv.ko $MYDROID/out/target/product/blaze/system/etc/wifiAnother file, firmware.bin is also required but this must be obtained from the package from the below link.
Please download the package WLAN 1271 Connectivity Package$ chmod 777 Froyo_L27.8.2_Connectivity_1271-1.0-Linux-x86-Install
$./Froyo_L27.8.2_Connectivity_1271-1.0-Linux-x86-Install
$ cd $MYDROID/out/target/product/blaze/system/etc/wifi
$ cp $YOUR_PATH/WLAN_firmware/firmware.bin .
$ chmod 777 $MYDROID/out/target/product/blaze/system/etc/wifi/firmware.bin
[edit] How to Enable/Test WLAN
Important note for WLAN driver (tiwlan_drv.ko).
First kernel should be built and then WLAN driver. Every time if kernel is rebuild, the wlan driver must be built again.
Improtant note before starting WLAN testing
1) Make sure the firmware (firmware.bin) and tiwlan_drv.ko (built) are part of system/etc/wifi folder of filesystem. Firmware.bin can be obtained from the WLAN 1271 Connectivity Package
2) Please follow the steps mentioned in "Preparing Android binaries" section to copy WLAN driver (tiwlan_drv.ko) to file system http://omappedia.org/wiki/OMAP_Pandroid_Main#Android_filesystem
Below video will show you how to enable WLAN drivers on Pandroid :
Test WLAN from Android UI
1. Go to Settings, Wireless and Network
2. Select "Wi-Fi". This will show "Turning On..."
3. Once Wi-Fi is turned On, it will scan for the available networks and connect
4. If you would want to select a particular network, select "Wi-Fi settings" and select from the list of "Wi-Fi networks"This will enable WLAN and you should be able to use Browser to connect to internet.
Install wifi driver
#cd /system/etc/wifi #insmod tiwlan_drv.ko #start wlan_loader
The expected (typical) output would be:
<6>TIWLAN: driver init TIWLAN: driver init <6>TI WiLink 1271 SDIO: Driver loaded TI WiLink 1271 SDIO: Driver loaded <4>sdp4430_wifi_power: 0 sdp4430_wifi_power: 0 <3>Unable to modify wakeup on non-wakeup GPIO53 Unable to modify wakeup on non-wakeup GPIO53
To turn on WLAN Execute "ifconfig tiwlan0 up" command on terminal
The expected (typical) output would be:
<6>TIWLAN: 195.408721: Interrogate TX/RX parameters TIWLAN: 195.408721: Interrogate TX/RX parameters
To invoke the command line interface for WLAN
Execute "wlan_cu -itwlan0 -b"
The expected (typical) output would be:
user_main, start \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, po vWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
To Scan WLAN Acess Points (AP)
Execute "/ a s"
The expected (typical) output would be:
\> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, po Wer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit .../scAn> Start, sTop, Wextstart, configApp/, configpEriodic/, configPolicy/ Application scan started
To get the list the scanned AP
Execute "/ c b"
The expected (typical) output would be:
List of all available IP \> Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, po Wer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit .../Connection> Bssid_list, Connect, Disassociate, Status, Full_bssid_list, wPs/ BssId LRssi Mode Channel SSID e2.f1.1f.26.6c.0b 0 -93 Adhoc 1 Free Public WiFi 00.21.d8.49.20.90 0 -45 Infra 11 CiscoL27 02.02.03.04.05.06 0 -75 Adhoc 6 ADHOC 00.1f.33.2a.6b.15 1 -52 Infra 6 Netgear 00.1d.7e.5e.52.a7 0 -56 Infra 6 linksys
To connect to selected AP
Excute "/ c c
", e.g. "/ c c CiscoL27" The expected (typical) output would be:
<6>TIWLAN: 1401.735260: ************ NEW CONNECTION ************ TIWLAN: 1401.735260: ************ NEW CONNECTION ************ <6>TIWLAN: 1401.746917: -- SSID = CiscoL27 TIWLAN: 1401.746917: -- SSID = CiscoL27 <6>TIWLAN: 1401.754943: -- BSSID = 00-21-d8-49-20-90 TIWLAN: 1401.754943: -- BSSID = 00-21-d8-49-20-90 <6>TIWLAN: 1401.764404: **************************************** TIWLAN: 1401.764404: ****************************************
To get the WLAN connection status
Execute S
The expected (typical) output would be:
========================== Status : CONNECTED MAC : 08.00.28.ae.8c.69 SSID : CiscoL27 BSSID : 00.21.d8.49.20.90 Channel : 11
To exit WLAN command line interface
Execute / q
The expected (typical) output would be:
# <3>init: untracked pid 1222 exited init: untracked pid 1222 exited
To configure the board to static IP
Execute "ifconfig tiwlan0 192.168.1.5"
To ping another IP
Execute ping -c4 192.168.1.2
The expected (typical) output would be:
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data. 64 bytes from 192.168.1.2: icmp_seq=1 ttl=255 time=213 ms 64 bytes from 192.168.1.2: icmp_seq=2 ttl=255 time=3.20 ms 64 bytes from 192.168.1.2: icmp_seq=3 ttl=255 time=2.86 ms 64 bytes from 192.168.1.2: icmp_seq=4 ttl=255 time=3.17 ms
[edit] Ethernet
[edit] How to Enable/Test
Once Android has booted up, on a terminal type
netcfg usb0 up netcfg usb0 dhcp setprop net.dns1
(e.g.) setprop net.dns1 192.168.0.1 [edit] USB Mass Storage
[edit] Kernel Configuration
Following Kernel Configurations are good for 2.6.27 and later Kernel versions. Enable the following configuration options by pressing 'Y' on the key board:
1. Device Drivers --->SCSI Device Support ---><*>SCSI device support <*>legacy /proc/scsi/ support <*>SCSI disk support <*>SCSI generic support [*]Asynchronous SCSI scanning
2. Device Drivers --->USB support --->
<*>USB Mass Storage support
Execute the following command to see the newly registered or mounted USB devices from the Linux commands available on Busybox or any other Tool :
$./lsusb
Or check for the devices in /proc/bus/usb
If you do not find your device, get the dmesg. Plug-out and plug-in in the Mass Storage device or the Flash drive and see the messages on the console.
To get the list of mounted USB devices , please follow the steps below:$ cd /proc/bus/usb
$ ls
002
001
devices
$cat devices
T: Bus=02 Lev=02 Prnt=02 Port=02 Cnt=03 Dev#= 5 Spd=480 MxsCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0951 ProdID=1643 Rev= 1.00
S: Manufacturer=Kingston
S: Product=DataTraveler G3
S: SerialNumber=000AEBFFB512F06183790BBE
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=31875usYou should be seeing some devices mounted. For example when a Kingston USB Flash drive is plugged in you see the above message.
If the device is not mounted, issue the following command to mount the usb file system:
$mount -t usbfs usbfs /proc/bus/usb
$cd /proc/bus/usb
$ls
002
001
devices
$cat devices[edit] USB Multimedia Support
[edit] USB Webcam
Webcam Pro 9000 from Logitech is supported on Android in the L27.x releases. The default Google Camera application can be used to see the preview stream from the USB Camera.
The following wiki section describes how to enable support for this in the kernel and how to configure the filesystem to exercise this feature.
STEP 1 ==== Kernel Configuration ==== Please follow the below steps and configure your kernel to support USB camera
Enter the following command to bring up the kernel configuration menu
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig
Following Kernel Configurations are good for 2.6.27 and later Kernel versions.
Enable the following configuration options by pressing 'Y' on the key board:
Device Drivers --->
<*>Multimedia Support --->
<*>Video for Linux
[*]Enable Video for Linux API 1 (DEPRECATED)
[*]Video capture adapters --->
[*]V4L USB devices --->
<*>USB Video Class (UVC)
[*]UVC input events device support
<*>GSPCA based webcams
[*]USB support --->
<*>Support for host side usb
<*>USB device class-devices (DEPRECATED)
<*>EHCI HCD (USB 2.0) support
<*>Inventra Highspeed Dual Role Controller (TI, ADI, ...)
Once the kernel is booted up, plug-in and plug out the USB Camera so that the device is recognized as a gadget device via OTG port.
You will see traces like below when the USB Camera is detected usb 1-1.3.2: new high speed USB device using musb_hdrc and address 4
usb 1-1.3.2: device v046d p0809 is not supported usb 1-1.3. 2: New USB device found, idVendor=046d, idProduct=0809 usb 1-1.3.2: New USB device strings: Mfr=0, Product=0, SerialNumber=2 usb 1-1.3.2: SerialNumber: 95125EAA uvcvideo: Found UVC 1.00 device
(046d:0809) input: UVC Camera (046d:0809) as /devices/platform/musb_hdrc/usb1/1-1/1-1.3/1-1.3.2/1-1.3.2:1.0/input/input9 Execute the following command to see the newly registered or mounted USB devices from the Linux commands available on Busybox or any other Tool :
$./lsusb
Or check for the devices in /proc/bus/usb
$cd /proc/bus/usb
$ls
002
001
devices
$cat devicesIf the device is not mounted, issue the following command to mount the usb file system:
$mount -t usbfs usbfs /proc/bus/usbIf you do not find your device, get the dmesg. Plug-out and plug-in in the USB webcam and see the messages on the console.
To get the list of mounted USB devices , please follow the steps below. In this example Webcam Pro 9000 from Logitech is used.
Please look for the vendor ID and the Product ID in the messages below.$ cd /proc/bus/usb
$ ls
002
001
devices
$cat devices
T: Bus=02 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 4 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=046d ProdID=0809 Rev= 0.10
S: SerialNumber=7271EE85
C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
A: FirstIf#= 0 IfCount= 2 Cls=0e(video) Sub=03 Prot=00
A: FirstIf#= 2 IfCount= 2 Cls=01(audio) Sub=02 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=16ms
I:* If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I: If#= 1 Alt= 1 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=81(I) Atr=05(Isoc) MxPS= 192 Ivl=125us
I: If#= 1 Alt= 2 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=81(I) Atr=05(Isoc) MxPS= 384 Ivl=125us
I: If#= 1 Alt= 3 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=81(I) Atr=05(Isoc) MxPS= 512 Ivl=125us
I: If#= 1 Alt= 4 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=81(I) Atr=05(Isoc) MxPS= 640 Ivl=125us
I: If#= 1 Alt= 5 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=81(I) Atr=05(Isoc) MxPS= 800 Ivl=125us
I: If#= 1 Alt= 6 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=81(I) Atr=05(Isoc) MxPS= 944 Ivl=125us
I: If#= 1 Alt= 7 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=81(I) Atr=05(Isoc) MxPS=1280 Ivl=125us
I: If#= 1 Alt= 8 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=81(I) Atr=05(Isoc) MxPS=1600 Ivl=125us
I: If#= 1 Alt= 9 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=81(I) Atr=05(Isoc) MxPS=1984 Ivl=125us
I: If#= 1 Alt=10 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=81(I) Atr=05(Isoc) MxPS=2688 Ivl=125us
I: If#= 1 Alt=11 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E: Ad=81(I) Atr=05(Isoc) MxPS=3060 Ivl=125us
I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=(none)
I:* If#= 3 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
I: If#= 3 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
E: Ad=86(I) Atr=05(Isoc) MxPS= 68 Ivl=1ms
I: If#= 3 Alt= 2 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
E: Ad=86(I) Atr=05(Isoc) MxPS= 100 Ivl=1ms
I: If#= 3 Alt= 3 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
E: Ad=86(I) Atr=05(Isoc) MxPS= 132 Ivl=1ms
I: If#= 3 Alt= 4 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
E: Ad=86(I) Atr=05(Isoc) MxPS= 196 Ivl=1msYou can also try ls /dev and see that a new /dev/videoXX device appears for the USB Camera. This will be the device file used to access the USB Camera.
STEP 2: Android FILESYSTEM Support
By default, support for Webcam Pro 9000 from Logitech USB Camera is provided within TI Camera HAL implementation via a V4L Camera Adapter and the /out/target/product/blaze/system/etc/TICameraCameraProperties.xml file has an entry for this Camera with all the properties listed.
You may add support for the specific Camera that you are trying to support by adding a separate entry listing it's properties or edit the existing entry for the USB Camera inside TICameraCameraProperties.xml.
NOTE: Support for USB Cameras on Android were added by the following patches, which are already merged to the repository in git.omapzoom.org
http://review.omapzoom.org/9758 http://review.omapzoom.org/10457
Once Android is booted up, in the console, enter the following commands
# This provides permissions for any process to access /dev/video4. # This is needed so that MediaServer process can open the V4L2 device for USB Camera. # Note that the assumption here is USB Camera enumerates as /dev/video4. It may vary depending upon your build configuration.
chmod 777 /dev/video4
# USB Camera is given an ID 3 in the default filesystem. In case you are adding a new Camera you will provide # the enumeration corresponding to that
setprop camera.defaults.index 3
After executing the above commands, launch the default Google Camera application "Camera" from the application menu and you should see the Camera app come up with USB Camera.
- Wifi