# Android tether and wpa_supplicant [workaround]

## Sedrik

Hi guys

I'm trying to connect my laptop to my HTC Hero using wpa_supplicant, has anyone done this?

this is what I see in wpa_cli when I do scan_result

#bssid / frequency / signal level / flags / ssid

#02:23:76:81:26:67      2412    240     [IBSS]  G1

And according to the example wpa_supplicant.conf this should allow me to connect to a IBSS network.

network={

       ssid="G1"

       mode=1

       frequency=2412

       proto=WPA

       key_mgmt=NONE

       pairwise=NONE

       group=TKIP

       #psk="abcdefghijklm"

}

I have tried the connection in Windows and that works, so the phone is working.

Any help is greatly appreciated  :Smile: 

----------

## el_Salmon

I suppose you're trying to connect your mobile in an ad-hoc mode. I'm tried to do the same thing some days ago with my HTC Magic. It worked the first time I rebooted the Android system but then I didn't work.

I found a good solution upgrading the ROM. The new CyanogenMod ROMs are able to connect to ad-hoc wireless networks by default so maybe you can try searching an alternative ROM for your mobile: http://forum.xda-developers.com/forumdisplay.php?f=512

----------

## chithanh

For HTC Hero, you need to enable the proper USB networking driver and connect with the supplied USB cable. Then enable Internet Sharing in the wireless settings. You will get a "usb0" network device which can be handled by Gentoo net scripts (or wicd or NetworkManager or ...).

AFAIK, other methods of tethering require gaining root access to the device.

----------

## Sedrik

I have root access to the phone (currently running VillainRom 5.4) and as stated before I can connect through windows so the phones tethering works, I think it is just a matter of configuration to get it working in linux but I have been unable to do it correctly  :Sad: 

----------

## keet

The information at http://forum.xda-developers.com/archive/index.php/t-579930.html helped me get an Internet connection using a Nexus One connected to my laptop with U.S.B.

I just enabled these options in the kernel:

USB_USBNET=y

USB_NET_CDCETHER=y

USB_NET_RNDIS_HOST=y

I'm not sure if these are necessary, but they might also be related:

USB_SERIAL=y

USB_SERIAL_GENERIC=y

I also needed to enable U.S.B. tethering in my Android device's network settings.  After recompiling and copying my kernel and rebooting, I could run:

```
ifconfig usb0 up && dhcpcd usb0
```

----------

## igotitiscool

i have a APad and a HTC  EVO thats rooted and works with my laptop and net book.  the apad app thats built in does not find the wireless tethering but i download a app  from market and it finds it but saids it encryption is   IBSS and ask for network  password, but there is no password for the rooted wirelwss , any ideas?

----------

## Sedrik

I have no idea, never got the wireless to work with linux, works perfectly in windows. Got the USB tethering working yesterday so will mark this thread with a workaround.

----------

## Munin

Hi ppl!

I have an HTC Wildfire and I can't get internet access sharing to work.

Some googleing revealed that I lacked some kernel modules, so I rebuilt my kernel and enabled cdc_ether, rndis_host and phonet as modules.

I now get a device called usb0, dhcpcd does get an IP address and a gateway (192.168.100.100 and 192.168.100.254 respectively, if I remember correctly). However I still can't access the internet.

Did I miss something?

Any help would be greatly appreciated

(if its any important, "nmap -PN" says that all scanned ports on the phone are filtered)

----------

