Skip to main content

How to connect an android phone to your ad-hoc wi-fi network

Cannot see ad-hoc wifi "Wireless" on android phone, do not worry.
EDIT: You can connect android phone without rooting your device using a program called Connectify that turns you PC or laptop into an access point that phones can see, but this program only works on Windows 7 not XP not Vista.
Read more about connecting your Android phone to a laptop or pc using Connectify.

I got my HTC Hero with android today and I am aboard, when I tried to connect it to the internet using an AD-HOC wireless network it didn't see it, but a program called Wifi analyzer can see the adhoc network "A Program I installed from android market", if you don't have windows 7 the only solution so far is rooting your device then:



First: I have yet to be able to connect to the ad-hoc network with WPA1&2-security. But I am pretty sure it should work, we just need to work out the correct configurations in the system files. Right now I am connected with WEP-security. That will keep the neighborhood noobs of my wifi-network, but it is not a satisfactory solution for security in the long run, as it _easily_ can be cracked by neighborhood parasites with freely available tools. In time, one should therefore really try to configure the connection with WPA2.
Here is the approach I used to allow connections to ad-hoc wifi networks with HTC Hero:
We need to edit two system files within Android; /system/etc/wifi/tiwlan.ini and /data/misc/wifi/wpa_supplicant.conf. I prefer doing this with Android’s debugging bridge (adb), to avoid messing with badly written terminal applications for the HTC Hero. Adb makes it possible to alter android system files from your command line on your computer. To use adb you need to install the drivers. Most Windows-users have these installed from when installing HTC Sync. I use Linux and had to install them by grabbing the Android SDK from their homepage (I can elaborate on this if necessary). Note that you will have to ‘root’ your device to make the procedure work (if necessary I can elaborate on this, as well. It basically means that you achieve full system read/write capabilites on your device). You might also need set the device to ‘USB debugging’-mode. You’ll find out soon enough :)
Open a terminal window (in Windows, the command line) and type:
Code:
adb pull /system/etc/wifi/tiwlan.ini .
This will copy the file from the device to the computer. In Linux the file will be stored in the user’s home directory. I am not sure where it will be stored in Windows (search for it if you can’t find it). Open the file in a text editor. Locate the text “WiFiAdhoc = 0″ and change the 0 to 1. Then we will place two new lines right underneath it, to make it look like this:
Code:
WiFiAdhoc = 1
dot11DesiredSSID = InsertyourSSIDhere
dot11DesiredBSSType = 0
Replace InsertyourSSIDhere with the name/SSID of your planned ad-hoc network. We are finished with this file for now, so save and close the file.
In the terminal, type:
Code:
adb pull /data/misc/wifi/wpa_supplicant.conf .
Wpa_supplicant.conf is the tool we use to configure the network security. Open the file in the text editor. I have my file configured like this:
Code:
ctrl_interface=tiwlan0
update_config=1

eapol_version=2
ap_scan=2
fast_reauth=1

network={
    ssid="InsertyourSSIDhere"
    scan_ssid=0
    mode=1
    key_mgmt=NONE
    group=WEP104
    auth_alg=SHARED
    wep_key0="InsertyourownPASSKEYhere"
}
Once you are happy with your configuration, save and close the file.
Ok, now that we have configured the files, we will transfer them back to the HTC Hero by executing the following commands (each line is a new command):
Code:
adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
exit
adb push tiwlan.ini /system/etc/wifi/tiwlan.ini
adb push wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf
adb shell
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
exit
Now you just have to create an ad-hoc wi-fi network with internet sharing on your laptop. There are numerous online guides on how to do this. The important thing is to match the network settings with the configuration in wpa_supplicant.conf. Note that ‘WEP104′ might be labelled  ‘WEP128′ in the network manager on your computer. Once you have created and activated your new ad-hoc wi-fi network, configured with internet sharing, turn on the wi-fi on your HTC Hero. You will see the ad-hoc network listed immediately, but wait a minute or two for the device to obtain the network address distributed from the laptop.
That’s pretty much it! You should now be online on your HTC Hero through your ad-hoc wi-fi network. The device should automatically be connecting to the network when wi-fi is enabled at both laptop and device.
Keep in mind: please consider this a temporary solution; we should really strive to configure wpa_supplicant.conf with WPA2-security. I’ll be back with another blog post if/when this is achieved.
Disclaimer: Remember, I am not responsible for your actions :)
VIA [TIS]

But I wont try it any soon, I wont give up HTC hero original ROM just for ad-hoc networks, I will wait until I get a reasonable reason to root my device.
My recommendation "Buy an access point" for me I will wait until I am back from my vacation for now I will use a near public wifi.

Comments

mrbrocks said…
great article :)
diyism said…
Connectify only works on Windows 7 not XP not Vista,
but VirtualAccessPoint v2.2 works on windows xp.
Anonymous said…
Yes but lots of wi-fi cards do not supported the ap mode, only the ad-hoc.
webvan said…
Thanks, but not working on Motorola Milestone.
littlebearz said…
I m using enterprise windows 7,but adhoc does not work. Maybe I m doing it wrong
S3nd41 said…
Tested Connectify on Windows 7 64-bit and it works like a charm with my Android cell.
Anonymous said…
Or you can try this one ... http://www.youtube.com/watch?v=rDfR5yuu5R4 it doesn't solve the problem to connect to any, but you can have the internet connection and more..
Anonymous said…
Any comment on getting this to work with the Droid Incredible?
Anonymous said…
Ad hoc network still not showing on Evo

Popular posts from this blog

Tria Mera - 666 - The truth

Following is a reference to the movie white noise, what you see on this page is not my opinion, and I am not interested on this stuff, if you come here than you are probably searching after watching the movie or researching tria mera term, this is for educational purposes only.



The expression, Third Day, appears in several narratives in the Bible. (Occasionally, it is “three days.”) Some biblical interpreters have thought that some of these third day motifs have significance by signifying a certain divine principle, and a few interpreters have thought that they are cryptic in meaning. Why? Interestingly, these narratives record some of the most important events in the history of Israel. And surprisingly, except for the Bible’s mention of the third day, the seventh day, and its account of creation in Genesis 1, the Bible rarely mentions the other days of the week.
The Number of the Beast is described in the Book of Revelation 13:18. From the King James translation:[5]
Here is wisdom. L…

How to Access Satellite Internet for Free

Before you start, please note that sniffing data is highly illegal, and the below is a tutorial so you understand how it works, there is no other reference in English that goes in depth except this page, therefore you need to link back in case you used this content on any medium.
I held no responsibility what so ever if you use the below in other purposes that is not educational or testing.

For a long time satellite internet is the right solution for people in remote locations, such as forests, desert, islands and more deep far locations.

Even after the huge expansion of internet to most of the inhabited remote locations there are still people who uses satellite internet for different reasons, as it cannot be disrupted by your government, it is portable, just take your dish and decoder with you to your new home as long as the satellite you subscribed in is covering your new area as well.

Now about free access to this internet, it's around you everywhere, all you need is the right …

Best Web Hosting Hosting Ever - HostMonster.com

You all know HostMonster.com, they are known for the power of their services and up-time, the big storage and more, but now they got even better the holy "UNLIMITED EVERYTHING".
and yes do trust them.
Guess how much : 5.95 a month

Hosting Features:
Disk Storage Unlimited
Host UNLIMITED DOMAINS
Free Domain Name
Free Drag and Drop Site Builder
Support International Domain Names
POP3/POP3 Secure Email Support Unlimited
IMAP/Secure IMAP Email Support Unlimited
Gigs of Site Transfer Unlimited
Forwarding Email Accounts Unlimited
Email Autoresponder Unlimited
Add-on Domains Unlimited
Parked Domains Unlimited
Subdomains Unlimited
Additional FTP Accounts Unlimited
MySQL Databases 100
PostgreSQL Databases 100
IMAP/secure IMAP Email Support
3 Different Web Based Email Solutions
CGI-BIN
CGI Library
Server Side Includes
Frontpage 2000/2002 Extensions
Account "Control Panel"
FTP Access
Shell Access (SSH)
Override .htaccess Support
Anonymous …