Android Tablets Forum banner
1 - 20 of 120 Posts

·
Registered
Joined
·
142 Posts
Okay, I'm not taking 100% credit for this because all I did was modify the work that this user did:

YasinSiddiqui;32417 said:
NOTE: I'm using Rogerbraun Custom ROM 5.1 on Rockchip APAD, but I don't see any reason why this shouldn't work on the PDN too.

Hi Guys,

Finally figured this out.

Since the wpa_supplicant.conf file is read-only, an Android app can't modify the file. Hence, we were having to go back to connecting the APAD to the PC and use DroidExplorer to overwrite the wpa_supplicant file everytime we wanted to enable Adhoc Wifi.

I realized that when you upload a file to the APAD using DroidExplorer, it gets write permissions


And once you have the file with write permissions, an app CAN modify the file.

So, I've created a small app for easy switching between Normal and Ad-hoc wifi modes.

Here are the steps:
1. Step removed because the files were replaced (see below!)
2. Use DroidEXplorer to copy the 3 files: wpa_supplicant.conf, wpa_supplicant.conf.adhoc and wpa_supplicant.conf.normal to /data/misc/wifi folder
3. Install AdhocAble.apk using any File Manager or even DroidExplorer

Now, start up adhoc wifi tethering on your phone (Barnacle Wifi Legacy on Android, JoikuSpot on Symbian, WMWifirouter on Windows Mobile, MyWi on IPhone etc.) and set the adhoc SSID to: adhocable with NO password.

Remember that you have to Turn wifi off and on everytime you switch modes.

For experts: How the app buttons work:
1. Switch to Ad-hoc Wifi Mode: Overwrite wpa_supplicant.conf with wpa_supplicant.conf.adhoc
So if you want to change the adhoc SSID or give it a password, edit the wpa_supplicant.conf.adhoc before copying it via Droidexplorer

2. Switch to Normal Wifi Mode: Overwrite wpa_supplicant.conf with wpa_supplicant.conf.normal

3. Backup Normal Settings: Overwrite wpa_supplicant.conf.normal with wpa_supplicant.conf
This allows you to avoid having to type the normal wifi passwords every time. But, remember not to use this button when you are in ad-hoc mode, otherwise you'll lose all your saved wifi passwords.

4. Do let us know: opens up an email compose window so that you can tell me whether you like the app or not. Do write your name, country and details of which devices and ROMs you have.
My modifications to these instructions are as follows:

Instead of the supplicant files supplied by the user above use mine
Also feel free to open "wpa_supplicant.conf.adhoc" and change the SSID to whatever you want, i.e. I called mine "AndroidTether"

Also I didn't bother with any security because I'm just using the access control feature on my tethering program, I'm not sure if they all have this feature but basically, my phone tells me when someone is trying to connect and asks if I want to allow the connection before the device is assigned an IP.

1. download: "wpa_supplicant_files_WORKING.zip and unzip
1.1 Open "wpa_supplicant.conf.adhoc" and edit SSID to whatever you want
2. place "wpa_supplicant.conf" , wpa_supplicant.conf.adhoc & wpa_supplicant.conf.normal into the sdk's "tool" folder (where adb.exe is)
3. download "AdhocAble_apk.zip" and unzip
4. Place "AdhocAble.apk" into the sdk's "tool" folder (where adb.exe is)
5. Open the command prompt and get to the folder where your adb.exe is
cd c:/where_your_sdk_is/tools
6. enter: " adb push wpa_supplicant.conf /data/misc/wifi "
7. enter: " adb push wpa_supplicant.conf.adhoc /data/misc/wifi "
8. enter: enter: " adb push wpa_supplicant.conf.normal /data/misc/wifi "
9. check to see the files are there by entering " adb shell ls /data/misc/wifi "
10. install the apk, you can use my batch file to do this if you'd like here
11. unzip the file manager batch script and place it in the sdk's "tools" folder (where adb.exe is)
12. open the batch file (it should open a new cmd window)
13. select 2
14. select 1 (install an app)
15. it'll ask for the name of the apk. Enter " AdhocAble.apk " exactly, its case sensitive.
16. reboot the PDN
17. Start your cell phone tether and set the SSID to whatever you set in the .conf.adhoc file at the begining
18. Open up the AdhocAble app and select "backup your normal settings", this should save all of the remembered infrastructure network's SSIDs and passphrases
18.1 select Enable Adhoc, it will prompt you to make sure to turn your wifi connection off and back on.
19. Do so.
20. You should see your cell phone's SSID in the connection list (remember the SSID is hardcoded into the .conf.adhoc file so you have to set it to the same thing in the tether program or vice-versa.
21. If you don't see the tether connection enter it manually

To get back to infrastructure - simply open the app and select enable normal mode and turn the wifi off then back on again - after a short bit you should see the networks as usual. It might take a bit longer to obtain an IP, but it should work...if not reboot the PDN and try it again.

Mod edit: Links are broken brcent has provided an alternate source in post #100 of this thread.
http://slickdeals.net/forums/showthread.php?t=2543997&page=54
 

·
Registered
Joined
·
142 Posts
Discussion Starter · #3 ·
i want to make sure it was actually working before i posted up instructions. My first go this morning, I some how got the PDN ready to transmit wifi instead of receive...don't ask me.
 

·
Registered
Joined
·
142 Posts
the only issue I've run into is that when you stop the adhoc and try to go back to infrastructure you will most likely have to reenter the passphrase because it seems to forget it..small price to pay I guess.edit: check step 18 for a solution to this problem.
 

·
Registered
Joined
·
5 Posts
This looks like a fantastic fix! Two quick questions: 1) What phone are you using/which tethering program? 2) Is there a way to get this up and running successfully with write permissions without using Droid Explorer? ADB, I can do. Droid Explorer, on the other hand, doesn't seem to want to see any of my Novel's directories...
 

·
Registered
Joined
·
142 Posts
Discussion Starter · #10 ·
[quote name='daro22;34431]Please post detailed instructions' date=' drodexplorer does not recognze my device for some reasn. Thanks![/QUOTE'] done, it seems long but its easy.
 

·
Registered
Joined
·
38 Posts
Thanks oneglory for sharing and for your detailed instructions.When I wrote the AdhocAble app for my APAD, I'd never thought that it would be used and liked by users of other devices too, in fact I hadn't even heard of the PDN then. Getting emails from various countries now.BTW, the PDN forums look much more active than the APAD forums to me. Feel like getting a PDN too after reading about all the exciting things you'll are doing with it.
 

·
Registered
Joined
·
142 Posts
Discussion Starter · #13 ·
[quote name='YasinSiddiqui;34479]Thanks oneglory for sharing and for your detailed instructions.When I wrote the AdhocAble app for my APAD' date=' I'd never thought that it would be used and liked by users of other devices too, in fact I hadn't even heard of the PDN then. Getting emails from various countries now.BTW, the PDN forums look much more active than the APAD forums to me. Feel like getting a PDN too after reading about all the exciting things you'll are doing with it.[/QUOTE']this wouldn't have worked without your app! thanks!!
 

·
Registered
Joined
·
666 Posts
Works as indicated. I made a .bat file to push the 3 files and install the apk. The app seems to be 3rd party, but definately a good find
I am very happy now as I can connect to the MyWi app I use on my iPhone which only does adhoc mode.
 

·
Registered
Joined
·
666 Posts
I can put my Novel to sleep, wake it, within 3 sec the WiFi powers up, inside 15 sec it has automatically reconnected to my adhoc network.
 

·
Registered
Joined
·
83 Posts
I am so sad I have been wanting to do this for so long but the instructions are very confusing to me yet it seems simple I have gotten this far so I know I can do this but I got adb to work but I cannot get sdk to work I dont even know where to start, it is late and Im tired. Please dont leave us slow people out
I will get some sleep and try this tomorrow, if any one can think of an easier way to explain this process I would be very grateful, this is definitely a donate situation. Thanks to any who can help me and others like me.
 

·
Registered
Joined
·
38 Posts
[quote name='oneglory;34379]the only issue I've run into is that when you stop the adhoc and try to go back to infrastructure you will most likely have to reenter the passphrase because it seems to forget it..small price to pay I guess.[/QUOTE] I'm surprised that you're facing this problem. I coded the Backup normal settings specifically for this situation and it works pretty well on the APAD.Have you used the Backup button? This will save your Infrastructure wifi passwords for use next time you switch back from adhoc mode.Plz refer to the extract from my original instructions below:[QUOTE]3. Backup Normal Settings: Overwrite wpa_supplicant.conf.normal with wpa_supplicant.confThis allows you to avoid having to type the normal wifi passwords every time. But' date=' remember not to use this button when you are in ad-hoc mode, otherwise you'll lose all your saved wifi passwords.[/QUOTE']Guys, Plz also use the 4th button to let me know by email that you use this app. It goes a long way in encouraging us to make more of our code available to the community.
 

·
Registered
Joined
·
142 Posts
Discussion Starter · #20 ·
[quote name='YasinSiddiqui;35072]I'm surprised that you're facing this problem. I coded the Backup normal settings specifically for this situation and it works pretty well on the APAD.Have you used the Backup button? This will save your Infrastructure wifi passwords for use next time you switch back from adhoc mode.Plz refer to the extract from my original instructions [URL=below:Guys']below:Guys'[/URL] date=' Plz also use the 4th button to let me know by email that you use this app. It goes a long way in encouraging us to make more of our code available to the community.[/QUOTE']You know, I totally forgot about that. The first time i tried your app it didn't work so I was worried about the backup button overwriting the good supplicant again with the incorrect info. Now that the supplicant has the right info from the start the backup should technically save the proper info from the get-go.I'll add that step to the instructions.
 
1 - 20 of 120 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top