# [How-To] adhoc tethering fix for webos/cm7/cm9



## minhur (Nov 6, 2011)

This works with webos/cms7/cm9

*WebOS ad hoc tethering*

credit: bedrock - [Patch Request] Connecting to ad-hoc wi-fi
Download bedrock's tethering app, install the ipk. (google how to install ipk on touchpad, you can either use preware or webOS quick install)
delete all saved wifi from webos
start the ad hoc network on your phone
run bedrock's tethering app
set the ssid to what you've set on your phone
set dns to 8.8.8.8, and 8.8.4.4
start tethering from the app
*CM ad hoc tethering*
enter usb mode
create gscript folder, copy contents of gscript.zip to the gscript folder
open the file /gscript/wpa_supplicant.conf.adhoc, edit the ssid to match your phone's ssid
exit usb mode
install GScript from market
run GScript, open menu (2nd button from status bar)
Add script > Load file > select wifi_xxx.sh file (repeat for all 4) > make sure Needs SU is checked
select wifi_backup
this will copy /data/misc/wifi/wpa_supplicant.conf to /sdcard/gscript/wpa_supplicant.conf.normal
*Switch to ad hoc mode*
turn off wifi
run GScript
select wifi_adhoc
this will replace /data/misc/wifi/wpa_supplicant.conf with /sdcard/gscript/wpa_supplicant.conf.adhoc
go to wifi settings and turn on wifi
you should see tp connected to ad hoc network immediately without having to select anything
*Switch to normal mode*
turn off wifi
run GScript
select wifi_normal
this will replace /data/misc/wifi/wpa_supplicant.conf with /sdcard/gscript/wpa_supplicant.conf.normal
go to wifi settings and turn on wifi
things are back to normal state
*Troubleshoot if something weird happens*
turn off wifi
run GScript
select wifi_flush
this will delete /data/misc/wifi/wpa_supplicant.conf, and bring things back to default state.
reboot
turn on wifi
you're in default normal mode now, you can go back to switching between normal and adhoc mode at this point.
so far I haven't seen any weirdness, if you have wifi issues, it's your build having wifi issues, not these scripts (since these are merely configuration files).
verified working with 3gs pdanet and cm7
verified working with 3gs pdanet and cm9


----------



## was240 (Oct 12, 2011)

I created an adhock with my og droid and didn't have to do anything but start the app on my phone.


----------



## uisge (Dec 23, 2011)

Works perfectly CM7 Alpha 3.5 tethered to Moto Backflip CM7 Nightly 56


----------



## brandycmc (Oct 8, 2011)

minhur said:


> I've finally managed to get ad hoc tethering working.
> I'm able to connect to my iphone 3GS with my TP on both webOS and cm7 any version, including xron roms
> xron 2.6 is the best in my opinion.
> 
> ...


Thanks for this.
But it didnt work for me.

I have a TP on Alpha 3 (Xron) and an iPhone 3G using PDAnet. The instructions above worked for about 10 seconds (transferring 57KB to be precise) before the connection hung. Disconnecting and reconnecting didn't help.

I appreciate all the work so far on this though. Thanks.


----------



## halcyonproject (Dec 19, 2011)

Ad Hoc works great with iphone 4 + PDANet until I attempt to launch a remote desktop application (splashtop for example). As soon as I launch splashtop and try to use the internet discovery method the ad hoc connection dies and I must perform a wipe and reboot to restore normal function. Seems to be the best we're going to get until CM9 or an official fix is released. Thanks for the help.


----------



## Crocadile (Aug 21, 2011)

I struggled to get my HP TouchPad with CM7.1 Alpha 3.5 to wireless tether with my Droid 2 Global with CM7.1 rev 10-19-11; yet meanwhile my wife's iPad2 had no trouble connecting. In the end I found a combination that actually works, I hope this helps others.

Steps I know fixed the issue:
Installed "Wireless Tether for Root Users" (Note to Verizon users, you will need to download the APK on your computer, transfer the APK to your phone, and then install the APK on the phone) - http://code.google.com/p/android-wifi-tether/
Enabled WPA encryption (this is important, originally I was trying WEP encryption and the TP refused to connect to it)
Disabled Access Control feature (I don't know why this doesn't work, but I'm not worried about it since the network still needs a password, you get notifications anyway on client connects)

Other steps that may have helped, but unconfirmed if required:
Ran ClockSync on TP - https://market.android.com/details?id=ru.org.amip.ClockSync&hl=en
Set Wireless tether app to channel 4


----------



## john510 (Dec 30, 2011)

Hope this gets fixed in the new release, this way we can not have to run the scripts..


----------



## minhur (Nov 6, 2011)

btw, I've tried this on cms9 and it works there too.
gscript crashes after running a script but it's still possible to connect to ad hoc wifi with cm9


----------



## Dark09 (Sep 21, 2011)

I tried this method of connecting touchpad to my Infuse, and it would fail >.< , but I found this post here: http://androidforums.com/hp-touchpad/478099-wifi-ad-hoc-tethering-issues-a3-0-a3-5-a.html from AS23 today and his method works flawless for me.


> For those of you unfortunate enough to also be experiencing this issue, I found a fix that may also work for you as it did for me. Go to the market and download "ZT 180 Ad Hoc Tethering Switch" after installing it on the TP make sure your wifi is on, all networks forgotten, and run the program. Make sure your SSID is "AndroidTether" on your phone and switch it on, then select to connect via ad hoc tethering in the app and it should work.


----------



## corona (Sep 4, 2011)

@Dark09 - Your external link to what helped you fix wifi and adhoc doesn't go anywhere.. Wanna give us another link to check out?

PS - I know you already posted the relevant info from his post, I'm just being a link Nazi.. sorry


----------



## ab-ster (Nov 24, 2011)

Dark09 said:


> I tried this method of connecting touchpad to my Infuse, and it would fail >.< , but I found this post Here from AS23 today and his method works flawless for me.
> [/font][/color]


wow! that app really works (zt 180 adhoc switcher from the market). i'm using wep too. cm9+brick kernel.


----------



## Dark09 (Sep 21, 2011)

corona said:


> @Dark09 - Your external link to what helped you fix wifi and adhoc doesn't go anywhere.. Wanna give us another link to check out?
> 
> PS - I know you already posted the relevant info from his post, I'm just being a link Nazi.. sorry


lol, np I didn't notice the link was auto-summarized >.<.
I updated the my last post and here's the link: http://androidforums.com/hp-touchpad/478099-wifi-ad-hoc-tethering-issues-a3-0-a3-5-a.html


----------



## anewday (Jan 8, 2012)

Thanks a lot, just what I was looking for. Going to give it a try later this weekend.


----------



## ratix0 (Feb 22, 2012)

Actually I can't seem to get this to work, on CM9, it managed to detect my adhoc network broadcasted by my laptop, but it can't connect. It gets stuck at "Obtaining IP Address". Any help? And yes I want to connect my touchpad to an adhoc network broadcasted by my laptop for various other reasons.


----------



## whome (Jan 25, 2012)

ratix0 said:


> Actually I can't seem to get this to work, on CM9. And yes I want to connect my touchpad to an adhoc network broadcasted by my laptop for various other reasons.


Is it you don't know how to create infra hotspot with a laptop, do you have Windows7 OS in use? I have NokiaC7 Symbian^3 and JoikuSpot tether app, due to a S^3 limitations it can only create adhoc hotspot. At the business trip this is how I use Win7+NokiaC7+Nokia Suite PC App+Touchpad CM9 gears.

Instructions may look weird and extensive but its really simple once you do it few times. Create simple .bat helper scripts to automate task.
Connect NokiaC7 or any S^3 phone to Windows7, use bluetooth or usb cable
Run Nokia Suite PC app and open 3g network connection through a cell phone
go to dos console using admin privileges, Start/Run... cmd.exe and press CTRL+SHIFT+ENTER for admin elevated access
Check if your laptop has _Hosted Network Supported=Yes_ capable wlan driver, run command
c:> netsh wlan show drivers
Create wlan hotspot settings, you may not need to run this every time
c:> netsh wlan set hostednetwork mode=allow ssid=mywifi key=mypwd keyUsage=temporary
Start hotspot wlan share
c:> netsh wlan start hostednetwork
Print wlan hotspot status
c:> netsh wlan show hostednetwork
c:> netsh wlan show hostednetwork setting=security
Stop wlan hotspot share when no longer need it
c:> netsh wlan stop hostednetwork
Sometimes you must tell which network adapter is being used by NokiaC7 and activate network sharing option. Active adapter usually is _MS Virtual Wifi Miniport Adapter_.
Click Network Settings tray icon, or use Control Panel, to list network adapters
Change Adapter Settings
Select an active network setting being used by Nokia phone.
If you connected to internet through wired local area network then choose it.
Enable options Properties/Sharing/[x]Allow other network user to connect and [x]Allow other network user to control
Windows7 even can create wifi hotspot even if connected to the internet through same wlan adapter. One rare usecase is you have access to an adhoc hotspot, use Win7 to connect it, create Win7 infra hotspot, other devices can use Win7 infra tethering pipe.


----------



## whome (Jan 25, 2012)

I was finally able to use Nokia C7 symbian^3 (_Nokia Belle Refresh 11.040.1511)_ and HPTouchPad (_CM9-20120615-nightly-tenderloin 4.0.4__) _tethering but not wifi one. Network connection is tethered through a bluetooth dialup profile. No longer I need to use Win7 laptop to create an infrastructure wifi hotspot.
install BlueVPN for ics bluetooth dialup application
enable bluetooth on C7 and HPTouchPad
bluetooth pair and trust devices
switch tablet to an airplane mode, for some reason I must do this
start BlueVPN android app, make sure bluetooth is started
go to settings/access point and type in the appropriate access point name. This name is taken from the phone's apn connection settings. Phone menu/Settings/Connections/Settings/Access Points/drill down to 3g apn, take note _access point name_ field value. My case value is _internet.saunalahti_
click on your phone's name in a device list and BlueVPN submits AT modem commands
If everything is fine network connection is now opened, you should see a big switch icon on a tablet screen. Some android applications may not see a network, its not wifi or internal 3g network. My test goes browser, email, google reader, play store works fine.


----------



## autobulb (Oct 25, 2011)

Has anyone gotten this to work with the CM10 preview? I'm not sure if the script is compatible since I haven't tried this on CM9, but I can't get it to work on CM10.

I followed the instructions exactly, and when I switch it over to adhoc, reenable wifi it just gives me a blank wifi symbol. The hotspot that I have selected to connect to shows up in the list as "not in range" even though the phone is a foot away.

The phone in question is a rooted iPhone 3Gs with PDAnet 5.36.
Does it have to be on a specific channel? I left it at the default channel 2.
I tested the hotspot on my laptop and it connects and works fine, but the Touchpad cannot detect it/connect to it.


----------



## erdbeerbrot (Oct 7, 2013)

Hallo,

i did exactly what was written down here but my Touchpad running CM9 still says ''Obtaining IP adress'' but doesnt get one.

I dont know how to fix it, so maybe one of you can help me?

I was trying to establish a connection between my notebook and the touchpad via adhoc because i can not create any hotspot with my wifi chip (doesnt support that).

I have a core2duo T7200 ICH7 chipset.

Hope someone can help, greets from Germany


----------

