How to connect to Ad Hoc networks using Tmobile G1 Android
Intro
The G1 does not connect to ad hoc networks through the wifi manager but we can hack it to allow scanning and connecting to ad hocs. I’ve been trying to figure this out for the longest time. Before you begin, you need to root your G1 and be comfortable using the command line. We will be editing tiwlan.ini and wpa_supplicant.conf. I will be showing you 2 ways to edit the files. Using vi and adb.
Settings
edit tiwlan.ini to read:
WiFiAdHoc = 1
dot11DesiredSSID = HydtechAdhoc (or whatever name u want)
dot11DesiredBSSType = 0
edit wpa_supplicant.conf to read:
ctrl_interface=tiwlan0
update_config=1
eapol_version=1
ap_scan=2 (tells wpa_supplicant to scan hidden networks)
network={
ssid=”HydtechAdhoc”
scan_ssid=1 (for APs with multiple SSIDS)
mode=1
key_mgmt=NONE
group=WEP104
auth_alg=SHARED
wep_key0=”MyWepKey” (replace MyWepKey with your key)
}
How to edit using vi:
Download terminal from the market and type:
su (for superuser mode)
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system (mount partition as writable)
vi /system/etc/wifi/tiwlan.ini (open tiwlan.ini in vi text editor)
now type A to enter editing mode, finish editing your file and hold trackball+1 to stop editing. To save and exit type :wq
vi /data/misc/wifi/wpa_supplicant.conf (open file for editing)
edit with the settings given above and exit and don’t forget to change the partition back to read only
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
reboot
How to edit files with adb on Ubuntu:
Connect your g1 to the computer using a usb cable and make sure USB debugging in enabled
Open up terminal and type
cd /home/hydtech/[android sdk folder]/tools (navigate to the directory which has you adb tool)
get the files from the device and place them in the root folder
sudo ./adb pull /system/etc/wifi/tiwlan.ini /
sudo ./adb pull /data/misc/wifi/wpa_supplicant.conf /
edit and save the files with the settings provided above using gedit or kate or what have you
make the partition read writable
adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
exit
place the files back onto the device
sudo ./adb push /tiwlan.ini /system/etc/wifi/tiwlan.ini
sudo ./adb push /wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf
make partition read only again
adb shell
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
exit
reboot device.
Troubleshooting
shows connected but no internet
1. I was having a problem where the connection would keep disconnecting and when it would connect, it wouldn’t load pages. To fix this I had to disable my WEP key.
SSID not showing
2. If the SSID isn’t showing up in the list, make sure you have ap_scan=2 in your wpa_supplicant
Unsuccessful connection
3. Try enabling static IP if DHCP isn’t working for you. It’s under advanced menu.
Popularity: 34% [?]
Tags: ad hoc, Android, g1, hero, linux, tiwlan, tiwlan.ini, tmobile, wep, wpa_supplicant, wpa_supplicant.conf
September 14th, 2009 at 11:43 pm
If you found this from my tutorial then you should have mentioned me in this post so people know who found this solution first.
Good thing you mentioned how to edit files using ADB and another good thing is this ap_scan=2 thing which i totally forget to mention in my post.
September 15th, 2009 at 6:48 pm
Great tutorial. I have the following problem on a G1 with modded Rogers rom . I connect to the created network but I don’t have an actual internet connection. I tried all the troubleshooting steps and disabled firewalls on PC but browser and other apps say they don’t have internet connection. WiFi is connected full bars and so on. Can’t really see what’s the problem…
September 15th, 2009 at 8:17 pm
take off your security key
September 16th, 2009 at 7:32 pm
Could you please upload the modded files so we could just use them? Not sure where to enter the commands and doing a search doesnt find “dot11DesiredSSID = HydtechAdhoc (or whatever name u want)”. Thanks
September 16th, 2009 at 7:42 pm
do i delete all the other stuff and just enter the info above?
September 17th, 2009 at 1:32 pm
hey I’m so glad to find a website here.
My problem is, can I make share my VPN connection as an adhoc connection? if so, how can I do this?
September 18th, 2009 at 7:50 am
Hi,
I did the exactly steps you stated on my G2 magic, but it doesn’t work.
the SSID was showed but my G2 can not search out my IBM T60′s signal.
Pls give some help. thanks in advance.
September 18th, 2009 at 2:43 pm
ap_scan=2 make sure it didnt get erased when you restarted.
September 20th, 2009 at 9:59 pm
Hi
At start – sory for my english , i speak not good.
Me and my friend have the same problem.
I have HTC Hero and laptop (he have G1 and laptop)
At first day this method (editing these two files) works perfectly.
Next day when i turn on wi-fi in my HTC Hero… big problem.
On phone I see my ad-hoc network on list but it still OUT OF RANGE.
I try STATIC IP and nothing work.
Other my phones (Nokia – Symbian) dont have any problem to connect to laptop.
Any solutions ?
Thanks
This is my wpa_supplicant.conf file:
ctrl_interface=tiwlan0
update_config=1
eapol_version=2
ap_scan=2
fast_reauth=1
network={
ssid=”SIEC”
scan_ssid=1
mode=1
key_mgmt=NONE
auth_alg=SHARED
}
And this is tiwlan0.ini (not full of course):
WiFiAdhoc = 1
dot11DesiredSSID = SIEC
dot11DesiredBSSType = 0
September 21st, 2009 at 3:41 pm
you have to reedit the file to include ap_scan=2 sometimes the wpa_supplicant gets reset. I am currently trying to figure out how to fix this.
September 21st, 2009 at 3:52 pm
thanks to the members from xda-developers who discovered the adhoc tether and especially to chax for his efforts.
September 23rd, 2009 at 6:12 am
Сайт очень качественный. Награду бы Вам за него или просто орден почета.
November 9th, 2009 at 4:54 pm
Hi,
Is it possible to have an infrastructure mode instead of ad-hoc mode? How hard can it be to develop something like that?
Michael
November 21st, 2009 at 3:36 am
I continually rea blogs in similar issue, but I never visited your blog. bookmarked and i’ll be your constant reader. Thanks
November 21st, 2009 at 7:33 am
[...]hydtechblog.com is another must see source of tips. Yeah Imagine getting paid for giving your opinion ! [...]
December 10th, 2009 at 3:58 pm
Cheers for the useful page – I loved reading it! I always love reading this blog.
December 30th, 2009 at 5:54 pm
[...] to connect to Ad Hoc networks using Tmobile G1 Android moved to: http://hydtechblog.com/2009/09/14/how-to-connect-to-ad-hoc-networks-using-tmobile-g1-android/ Possibly related posts: (automatically [...]
April 17th, 2010 at 5:37 pm
Could someone make a vid of this? if so sent it to my email
JohnnyHamer@yahoo.com
August 22nd, 2010 at 12:40 am
[...] | xda-developers How to get OLSR running on the Galaxy Samsung Android phone | http://www.olsr.org How to connect to Ad Hoc networks using Tmobile G1 Android | HydTech Reply With Quote + Reply to Thread « Previous Thread | Next [...]
October 5th, 2010 at 5:30 am
[...] [...]
October 14th, 2010 at 9:56 pm
it`s written “vi: not found”
what shall i do?
galaxy s 2.1
November 15th, 2010 at 2:57 am
grazie mile di informazione
November 22nd, 2010 at 6:36 am
Found this on Yahoo and I’m glad I did. Amazing article.
January 18th, 2011 at 9:21 pm
is this trick can use on sony ericson xperia x8 to ?
February 1st, 2011 at 1:18 pm
Fantastic site you have here but I was wanting to know if you knew of any forums that cover the same topics talked about in this article? I’d really like to be a part of community where I can get feedback from other knowledgeable individuals that share the same interest. If you have any suggestions, please let me know. Thanks a lot!
February 2nd, 2011 at 11:33 am
Obviously, what a wonderful web site and informative posts, I’ll add backlink – bookmark this internet site? Regards,
Reader.
February 2nd, 2011 at 1:34 pm
Bertrand Russell~ Man needs for his happiness not only the satisfaction of this or that but hope and enterprise and alter.
May 4th, 2011 at 1:39 pm
Hey .I am using Galaxy S. Tried to follow the process fully, 3 4 times… but everytime the phone becomes unbootable and stucks in the samsung logo. then i had to reflash the firmware. Has anyone ever faced such a problem?
May 20th, 2011 at 4:25 pm
It has been working the very first time on Galaxy S – i9003…. I was surprised and happy.
But after disable the wifi and enable it again, I cannot connect because out-of-range, remembered.
I have doubled checked and the configuration files are well, without modifications.
Some Ideas (please respond to e-mail aswell, because I do not have enought time to review the website)
vazromju/hotmail.com
July 28th, 2011 at 11:03 pm
Hi.
I need help.
I have Herotab C8 and I want connect it via Nokia N82 using JokuSpot Premium
What i do wrong:
1. I copy (using root_explorer) the wpa_supplicant.conf from system/etc/wifi – (I haven’t it in /data/misc/wifi/ like you) on sd card
2. edit it:
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
update_config=1
eapol_version=2
update_config=1
ap_scan=2
network={ ssid=”JoikuSpot_00226674F6B2″ – I tried droidhoc here too.
scan_ssid=1
key_mgmt=NONE
group=WEP104
aut_alg=OPEN SHARED
priority =99
mode=1 }
3. copy it back
4. restart tablet
5. install Hydtech’s adhoc wifi and turn it on …..
6. turn on wifi … and …. nothing.
What’s wrong?
(I’m apologize for my English)
September 7th, 2012 at 3:21 am
Using SkySafari pro on Sprint EVO 4g Lte android (no 4g here in Sedona AZ) and the google nexus 7 android tablet.
Will these same configurations work on a rooted google nexus 7 android tablet?
Also, your website mentions “you can join both SkyFi and your Android device to an infrastructure WiFi network, such as provided by a typical home router – but then you’ll need to carry that router with you, and find a way to power it, when you go to your remote observing site.”
Is there a recommended travel router that has been tested and known to connect android devices to SkyFi?
Thanks!