Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,804,760 Members 47,873 Now Online
XDA Developers Android and Mobile Development Forum

[JB] wpa_supplicant for adhoc wifi networks

Tip us?
 
timduru
Old
(Last edited by timduru; 31st July 2012 at 02:55 PM.)
#1  
timduru's Avatar
Senior Member - OP
Thanks Meter 8,679
Posts: 1,596
Join Date: Apr 2011

 
DONATE TO ME
Default [JB] wpa_supplicant for adhoc wifi networks

I've been trying a few JellyBean roms and they work quite smoothly I must say
but one feature that is still missing for me is the hability to connect to adhoc networks just like in old modded ICS roms.

I've patched and recompiled Team EOS3 wpa_supplicant that allows to see adhoc networks.
(although it should be the same source for other JB roms most likely too)

Unfortunately using Roach's default kernel it still doesn't list adhoc networks,
by using Guevor's kernel V23-JB-EOS it is able to list them.
However it is timing-out while trying to connect to it. :\


I'm not sure, but it might be related to the wifi module that comes with the rom / kernels.
If anyone knows what else should be changed in order to get it to work, feel free to contribute
It'd be nice to get it working on JB again


If you want to give it a try and report what works or doesn't work with each rom / kernel combination of your choice, I've attached the modified wpa_supplicant.

Quote:
To test:
- turn off wifi
- su and remount /system rw
- mv /system/bin/wpa_supplicant /system/bin/wpa_supplicant.ori

- gunzip the file
- cp wpa_supplicant /system/bin/
- chmod 755 /system/bin/wpa_supplicant
- turn wifi back on.


If you want to switch back to the previous wpa_supplicant:

- turn off wifi
- mv /system/bin/wpa_supplicant.ori /system/bin/wpa_supplicant
- turn on wifi
Credits:
- jl7854 for the wpa_supplicant ICS patch.
- Team EOS for the original wpa_supplicant and EOS3 JellyBean rom sources.
Attached Files
File Type: gz wpa_supplicant_JB_Tim.gz - [Click for QR Code] (325.0 KB, 3601 views)
The Following 12 Users Say Thank You to timduru For This Useful Post: [ Click to Expand ]
 
jenda.69
Old
#2  
jenda.69's Avatar
Member
Thanks Meter 13
Posts: 77
Join Date: Nov 2007
I know this is for Transformer so my post is pretty off topic, but this actually is the first modified wpa_supp that allows me to turn on wifi again on Nexus S with stock JB. Unfortunately it doesn't show me ad hoc network either
Google Nexus S (i9023), SlimKat (4.4.4)
 
archcantor
Old
(Last edited by archcantor; 1st August 2012 at 12:17 AM.)
#3  
archcantor's Avatar
Senior Member
Thanks Meter 52
Posts: 156
Join Date: Feb 2012
Location: Bristol CT USA
The only ICS ROM that works in adhoc mode for me is Revolver. I have tried Guevor and Harmnony kernels and they both work. I wish I knew more to help the cause. Ricardopvz started to work with me to fix this in Megatron but he got sidetracked and never continued. I suppose someone could look at the driver in Revolver to see how that one works and see if the changes can be ported to JB.

Adhoc tethering is important to me because my old Droid-1 can't tether to my tablet in infrastructure mode. Bluetooth tethering is slow and inconvenient. Thanks for carrying the flag on this. I will try to help with the testing.
Tablet: Asus TF101 1600 Mhz
ROM: KatKISS (4.4.4 by Tim Duru)

Tablet: Samsung Galaxy Tab 2 7" 1200 Mhz
ROM: PAC-Rom (4.4.4 by Nick0703)

Phone: Droid RazrMaxx HD XT926 1512 Mhz
ROM:
Stock (4.1.2)
 
timduru
Old
#4  
timduru's Avatar
Senior Member - OP
Thanks Meter 8,679
Posts: 1,596
Join Date: Apr 2011

 
DONATE TO ME
Quote:
Originally Posted by jenda.69 View Post
I know this is for Transformer so my post is pretty off topic, but this actually is the first modified wpa_supp that allows me to turn on wifi again on Nexus S with stock JB. Unfortunately it doesn't show me ad hoc network either
Ah yeah, glad it could help still
I don't think wpa_supplicant is much different from rom to rom, so good to know that one works on Nexus S too.
Next is to figure out what might be missing either in the rom or in the wifi module or such...


Quote:
Originally Posted by archcantor View Post
The only ICS ROM that works in adhoc mode for me is Revolver. I have tried Guevor and Harmnony kernels and they both work. I wish I knew more to help the cause. Ricardopvz started to work with me to fix this in Megatron but he got sidetracked and never continued. I suppose someone could look at the driver in Revolver to see how that one works and see if the changes can be ported to JB.

Adhoc tethering is important to me because my old Droid-1 can't tether to my tablet in infrastructure mode. Bluetooth tethering is slow and inconvenient. Thanks for carrying the flag on this. I will try to help with the testing.
Thanks

I have the same problem with my Nokia phone, it can only do adhoc network for sharing its 3G connection.
I can connect fine through it with bluetooth from a PC too, but android is not able to see the modem through bluetooth unfortunately.
So I definitely need adhoc to work

Maybe Ricardopvz or someone could participate for the JB roms if they have an idea what to modify next, I can have a look too.
I'll have a look in what could be changed in the BCM wifi driver in the meantime.
The Following User Says Thank You to timduru For This Useful Post: [ Click to Expand ]
 
MarkInDaPark
Old
#5  
MarkInDaPark's Avatar
Member
Thanks Meter 4
Posts: 94
Join Date: Feb 2012
Location: ...are you hitting on me?
This makes the RaymanFX CM10 ROM see ad-hoc's but timeout on connect. Hope someone will fix this as ad-hoc is kind of necessary for me
Note 2 && Transformer TF101.

Sometimes I use my old Legend as a tether slave for the tablet.
 
haxin
Old
#6  
haxin's Avatar
Senior Member
Thanks Meter 48
Posts: 258
Join Date: Nov 2011
Location: las vegas
theres a few things that have to in place for ad-hoc connections to work. just modifying the wpa_supplicant is not the answer. first the linux kernel on your device has to have CONFIG_NETFILTER, CONFIG_IP_NF_IPTABLES, and CONFIG_NETFILTER_XT_MATCH_MAC features. These are required for tethering (ad-hoc) to work in linux/android. also binaries like iwconfig will need to be included. ad hoc connections from droid to droid are sketchy and flaky because there are so many different kernels, wireless cards, and third party apps on so many different devices. I see why so many people dont like to use bluetooth tethering. typical cellular data service data transfer rates are much slower than the theoretical limits of Bluetooth, making the potential higher bandwidth of WiFi irrelevant.

these are the theoretical maximum speeds for various Bluetooth versions

Bluetooth Basic Rate (BR) 1Mbit/s
Bluetooth 2 Enhanced Data Rate (EDR) 2-3Mbit/s
Bluetooth 3 + HS (high Speed) 24MBit/s

So on the face of it, Wifi will normally give you a faster connection however the limitation is probably going to be the speed of your phone's data connection.
I'm pretty fly for a wifi
BREAK ME OFF A PIECE OF THAT KITKAT.TAR
irc.420excess.com #420

 
timduru
Old
#7  
timduru's Avatar
Senior Member - OP
Thanks Meter 8,679
Posts: 1,596
Join Date: Apr 2011

 
DONATE TO ME
Quote:
Originally Posted by haxin View Post
theres a few things that have to in place for ad-hoc connections to work. just modifying the wpa_supplicant is not the answer. first the linux kernel on your device has to have CONFIG_NETFILTER, CONFIG_IP_NF_IPTABLES, and CONFIG_NETFILTER_XT_MATCH_MAC features. These are required for tethering (ad-hoc) to work in linux/android. also binaries like iwconfig will need to be included. ad hoc connections from droid to droid are sketchy and flaky because there are so many different kernels, wireless cards, and third party apps on so many different devices.
Well, what I'm trying to achieve here is connect to an existing adhoc network which would already be doing the NAT, so you wouldn't need any of that on the client tablet.
Android doesn't use iwconfig by default.
Netfilter/iptables support would be in cases you'd in addition want to share your internet connection through the tablet.

For connecting to an existing adhoc network, it mostly boils down to wpa_supplicant and the kernel wifi driver, and maybe some android-space process
But seeing that it times-out while trying to connect even by using directly wpa_cli commands, that should eliminate the android space process from the loop.
That should leave only wpa_supplicant and the wifi driver.
The Following User Says Thank You to timduru For This Useful Post: [ Click to Expand ]
 
suquet.paul
Old
#8  
Member
Thanks Meter 3
Posts: 37
Join Date: Jul 2010
Location: Mexico City

 
DONATE TO ME
Quote:
Originally Posted by timduru View Post
I've been trying a few JellyBean roms and they work quite smoothly I must say
but one feature that is still missing for me is the hability to connect to adhoc networks just like in old modded ICS roms.

I've patched and recompiled Team EOS3 wpa_supplicant that allows to see adhoc networks.
(although it should be the same source for other JB roms most likely too)

Unfortunately using Roach's default kernel it still doesn't list adhoc networks,
by using Guevor's kernel V23-JB-EOS it is able to list them.
However it is timing-out while trying to connect to it. :\


I'm not sure, but it might be related to the wifi module that comes with the rom / kernels.
If anyone knows what else should be changed in order to get it to work, feel free to contribute
It'd be nice to get it working on JB again


If you want to give it a try and report what works or doesn't work with each rom / kernel combination of your choice, I've attached the modified wpa_supplicant.



Credits:
- jl7854 for the wpa_supplicant ICS patch.
- Team EOS for the original wpa_supplicant and EOS3 JellyBean rom sources.

Didnt break the wifi card, but everything acted like the original file. No ad-hoc.
 
Seferi
Old
#9  
Seferi's Avatar
Senior Member
Thanks Meter 27
Posts: 196
Join Date: Sep 2011
With the file i can see the ad-hoc networks around but can not connect them...

Sent from my HTC Sensation using xda premium
 
dgcruzing
Old
(Last edited by dgcruzing; 14th October 2012 at 06:41 AM.)
#10  
Senior Member
Thanks Meter 166
Posts: 774
Join Date: Nov 2010
Location: Suzhou China
little off topic..but might help for those wanting a quick fix..

http://forum.xda-developers.com/show...php?p=32719405
Quote:
confirmed working for me..
Foxfi running on papasmuffs CM9 HTC EVO build..
using 'Pdanet Tablet' on the Asus Transformer stock rooted .27
Thanks for the thread as was going nuts playing with the old tether program..
Search is your friend

Sent from my Transformer TF101 using Tapatalk 2
Nexus 10
Galaxy S III
Asus TF101 - KatKiss JB 4.3
Geniatech Media box ATV1200-dualcore JB4.1.2
ATV3000 - Pivos ICS -XAF XBMC

Retired devices: Plenty of them laying around now

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes