ADHOC Wifi Tether

pingram3541

Member
Feb 2, 2011
32
1
I have a rooted DROIDX with wifi tether working but my new 8024 tablet wouldn't connect just like my previous 7015 wouldn't. So I thought, what the heck let's not re-invent the wheel and see if the same trick works. The answer was No but Yes. The difference is file location. So far I haven't been able to figure out how to get the config file to support both adhoc and infrastructure connections so we will need to toggle between config files to keep remembered connections.

1) Things you will need:
- You need to be rooted. See this thread and my comments specifically on page 7.
- Download Script Manager from market or search for an APK on google, the version I have is 1.3.8 (this will allow you to toggle your wifi between adhoc and infrastructure modes one-touch from your desktop)
- Download Terminal from market or search for an APK - any version should be fine

2) Run Terminal and type:
su root (and if you are truly rooted the interpreter should change from a $ to a #)

3) Now let's make a backup of our wifi config file and save it to a folder on our sdcard. Type"
cd /
mkdir /sdcard/wifibackup
cp /system/etc/wifi/wpa_supplicant.conf /sdcard/wifibackup/


4) Now let's create our two wifi config files that we will toggle between, one for our existing infrastructure config (basically another copy) and the other for our ADHOC config
cp /system/etc/wifi/wpa_supplicant.conf /sdcard/wifibackup/wpa_supplicant.conf.infrastructure
cp /system/etc/wifi/wpa_supplicant.conf /sdcard/wifibackup/wpa_supplicant.conf.adhoc


5) Open Script Manager and navigate to /sdcard/wifibackup/wpa_supplicant.conf.adhoc file and after pressing on the file select the option to "Open As" and select "Text" and then select "Script Manager Editor" (or you can use any editor of choice) and modify the file as follows (obviously changing your ssid to that of your adhoc connection):

Code:
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
ctrl_interface_group=1010
update_config=1
ap_scan=2

network={
ssid="virustest"
key_mgmt=NONE
mode=1
priority=25
}

6) Save the file and now let's create our scripts by exiting out of the editor mode and then selecting the Script Manager Menu and choosing New Script and save as adhoc.sh and then OK. Choose Script Manager Editor again and add the following:

Code:
#! /system/bin/sh
cp /sdcard/wifibackup/wpa_supplicant.conf.adhoc /system/etc/wifi/wpa_supplicant.conf
echo "completed copy of adhoc configuration"

repeat for another file called "infrastructure.sh"

Code:
#! /system/bin/sh
cp /sdcard/wifibackup/wpa_supplicant.conf.infrastructure /system/etc/wifi/wpa_supplicant.conf
echo "completed copy of infrastructure configuration"

7) Now back in the Script Manager browser you will need to select each of the scripts you just created and choose the option to "Run as root" and "is favorite". Now you can exit out of Script Manager and from your desktop/home screen create a new widget, choose Script Manager and then choose adhoc.sh and repeat another widget for infrastructure.sh to be able to toggle your wifi configs. When you want to toggle connections simply press the widget shortcut which will execute the script and complete with "completed copy of ..." and then exit out of the script.

8) Sometimes I have to disable wifi and re-enable it.

If you add connections in either mode don't forget to copy the current /system/etc/wifi/wpa_supplicant.conf to /sdcard/wifibackup/wpa_supplicant.conf.XXXXX for whichever mode you are using. Good Luck!

p.s. Here is the thread from the 7015 which lead me to this workaround - Ad hoc network? - SlateDroid.com - Page 2

**admins pls sticky this**
 
Last edited:

pingram3541

Member
Feb 2, 2011
32
1
Also, if anyone wants to help me figure out how to get the ADHOC permanently enabled while also supporting conventional INFRASTRUCTURE modes, that would be greatly appreciated. Kind of a pain having to use toggle scripts but better than nothing.
 
Last edited:

weho

Member
Jun 2, 2011
9
0
Hey, i finally got this working and it really does make my 7024 a more useful device. Tether it to my iphone 3g. Fills in the gaps between access points!
Would be nice if it could do both infra and adhoc, for sure.
But a toggle works.
 

Cozz

Member
May 30, 2011
12
0
Wow nice work. But I don't know if I should root until there's a boack up for my 8024. But I would really like to try this setup with my BB Storm2
 

probbiethe1

Super Moderator
Staff member
Jun 30, 2010
1,838
139
Also, if anyone wants to help me figure out how to get the ADHOC permanently enabled while also supporting conventional INFRASTRUCTURE modes, that would be greatly appreciated. Kind of a pain having to use toggle scripts but better than nothing.

If you have a droid x why don't you just use the 3g hot spot hack and that should solve all your problems

Sent from my ADR6400L using Tapatalk
 

pingram3541

Member
Feb 2, 2011
32
1
If you have a droid x why don't you just use the 3g hot spot hack and that should solve all your problems

Sent from my ADR6400L using Tapatalk

The TBH patches were removed before I knew about the 3G hack and since I am not able to find the download I've kept my 3G hotspot frozen and settled for the wireless tether option. Please feel free to PM if you know where I can dl the TBH patch!

***hold on, it appears that my droid x has the 3g mobile hotspot activated! I unfroze the app and turned it on and only got the warning about battery consumption but nothing about incurring additional charges and was able to connect my Coby in infra mode! I suppose I'll just have to wait and see if I get a surprise on my bill but after a few searches on the web it appears that since the gingerbread update several months ago, 3G hotspot on the droid x and droid 2 might be free for all now.
 
Last edited:

pingram3541

Member
Feb 2, 2011
32
1
I haven't tried it personally mainly because when I first looked at tethering my android phone I didn't want to be tied down with USB tethering and bluetooth tethering seemed less flexible than wifi tethering so I just stuck it out and figured out how to do the wifi method. I think it supports wifi tethering with other devices like an iphone.
 
Top