Wilink Android

From OMAPpedia

(Difference between revisions)
Jump to: navigation, search
m (Added category tag)
(Android)
 
Line 1: Line 1:
==Android==
==Android==
-
It is recommended that that these steps below are done after a completed android build.
+
We recommend that you proceed to these steps below after you have done completing the Android build.
===Build WLAN Driver===
===Build WLAN Driver===
-
* Note: uImage must be located within PATH
+
* Note: uImage must be accessible through the PATH
<pre>
<pre>
Line 31: Line 31:
* Firmware.bin is required for enabling WLAN functionality on Zoom2. Download and install from https://gforge.ti.com/gf/project/wilink_drivers/  
* Firmware.bin is required for enabling WLAN functionality on Zoom2. Download and install from https://gforge.ti.com/gf/project/wilink_drivers/  
-
Placing firmware in Android's file system
+
Placing firmware in Android's file system:
<pre>
<pre>
$ cp <$YOUR_DOWNLOAD_PATH>/firmware.bin $MYDROID/out/target/product/zoom2/root/
$ cp <$YOUR_DOWNLOAD_PATH>/firmware.bin $MYDROID/out/target/product/zoom2/root/
Line 39: Line 39:
===Bluetooth===
===Bluetooth===
-
BT is available on 2.26.27 kernel and on the latest release.  
+
BT is available on 2.26.27 kernel and in the latest release.  

Latest revision as of 17:02, 3 April 2011

Contents

[edit] Android

We recommend that you proceed to these steps below after you have done completing the Android build.


[edit] Build WLAN Driver

$ cd $MYDROID/system/wlan/ti/wilink_6_1/platforms/os/linux
$ export PATH=<path to compiler>:$PATH
$ export CROSS_COMPILE=arm-none-linux-gnueabi-
$ export ARCH=arm
$ export HOST_PLATFORM=zoom2
$ export KERNEL_DIR=$MYDROID/kernel/android-2.6.29
$ make clean
$ make


[edit] WLAN in Android file system

Copy the files needed to the root directory.

$ cd $MYDROID/system/wlan/ti/wilink_6_1/platforms/os/linux
$ cp tiwlan_drv.ko $MYDROID/out/target/product/zoom2/root/
$ cp sdio.ko  $MYDROID/out/target/product/zoom2/root/
$ cp tiwlan.ini $MYDROID/out/target/product/zoom2/root/


[edit] WLAN Firmware

Placing firmware in Android's file system:

$ cp <$YOUR_DOWNLOAD_PATH>/firmware.bin $MYDROID/out/target/product/zoom2/root/

[edit] Bluetooth

BT is available on 2.26.27 kernel and in the latest release.


[edit] BT in Android file system

$ mkdir $MYDROID/out/target/product/zoom2/system/lib/firmware
$ cp $YOUR_DOWNLOAD_PATH/BTFM/scripts_for_l25.xx/*.bts $MYDROID/out/target/product/zoom2/system/lib/firmware


[edit] BT PAN profile

Zoom2 platform can be used as Network Access Points (NAP) for tethering scenario.

[edit] Prerequisites
[edit] Kernel configuration

To enable NAT, Netfilter configuration shall be updated as below:

[edit] Procedure

[PC] Power-on the BT device.

[Zoom2] Enable Bluetooth in Settings > Wireless controls.
-Check- You should see the computer in Bluetooth settings > Bluetooth devices list.
Start the BlueZ PAN daemon to act as a Network Access Point (NAP).
$ pand --listen --role NAP
Enable the Discoverable option in Bluetooth settings (you have 120 seconds from now to scan the BT devices from your PC).

[PC] Add this connection, then start it.

[Zoom2] Check the network connection:
$ busybox ifconfig -a
-Check- You should see a bnep0 interface.
Enable it:
$ busybox ifconfig bnep0 192.168.0.1 up

[PC] Open the Network Connections (Control Panel).

-Check- You should see the Bluetooth status as Connected.
In Properties > TCP/IP properties, enter the following configuration:
  • IP address: 192.168.0.2
  • Subnet mask: 255.255.255.0
  • Default gateway: 192.168.0.1
Apply the changes.
-Check- You can now ping the Zoom2 over the BT connection:
$ ping 192.168.0.1
Pinging 192.168.0.1 with 32 bytes of data:

Reply from 192.168.0.1: bytes=32 time=16ms TTL=64
Reply from 192.168.0.1: bytes=32 time=17ms TTL=64
Reply from 192.168.0.1: bytes=32 time=18ms TTL=64
Reply from 192.168.0.1: bytes=32 time=15ms TTL=64

Ping statistics for 192.168.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 15ms, Maximum = 18ms, Average = 16ms
[Zoom2] Now we need to configure IP forwarding and Network Address Translation (NAT):
$ echo 1 > /proc/sys/net/ipv4/ip_forward
$ iptables –t nat –A POSTROUTING –j MASQUERADE –o <external network interface>
  • <external network interface> could be tiwlan0, eth0, ppp0, … Check it with ifconfig.

[PC] -Check- You can now ping a machine via the Zoom2.

[Zoom2] You need the DNS server assigned to the network connection:
$ getprop
[net.gprs.dns1]: [xx.xx.xx.xx]
[net.gprs.dns2]: [xx.xx.xx.xx]
...
[dhcp.tiwlan0.dns1]: [xx.xx.xx.xx]
[dhcp.tiwlan0.dns2]: [xx.xx.xx.xx]
...

[PC] Go back to Properties > TCP/IP properties

Fill the DNS server addresses with the values displayed by getprop above.
-Check- Open your web browser and enjoy!

[edit] Installing WLAN and Bluetooth in Android

Once the steps above have been completed continue creating Android's "myfs" directory. All the necessary files needed to run WLAN and Bluetooth will be included.

Refer to Creating Android's File System for more information.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox