Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Saturday, April 17, 2010

Wifi-ADHoc support in Android

wifi connectivity using AP mode and GPRS works great

This post is related to enabling Wifi-ADHoc support in android 1.5, its simple and it works great. I tried this in HTC hero, i beleive it should be same for other make.

- Your phone should be rooted. Take a look at this link to root, http://theunlockr.com/2009/08/27/how-to-root-your-htc-hero-in-one-click/

- You should have android SDK in your computer. If not download from this http://developer.android.com/sdk/index.html

- We need to edit 2 files "tiwlan.ini" & "wpa_supplicant.conf". Ensure you take the backup of these files before editing.

- Pull the both the files from the mobile to the computer, this would be easy for editing.

adb pull /system/etc/wifi/tiwlan.ini tiwlan.ini
adb pull /data/misc/wifi/wpa_supplicant.conf wpa_supplicant.conf

- Edit the file as below
* In twilan.ini file set WiFiAdhoc = 1 (Will be 0 by default)
* Add the below 2 lines to the file
dot11DesiredSSID = Android (Wifi adhoc name configured in the computer)
dot11DesiredBSSType = 0

* In wpa_supplicant.conf, replace the contents with the below.
ctrl_interface=tiwlan0
ap_scan=2
network={
ssid="android"
scan_ssid=1
mode=1
key_mgmt=NONE
}

- Restart Wifi, it should detect your wifiadhoc networks.

Enjoy & have fun!