Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[JB] wpa_supplicant for adhoc wifi networks

OP timduru

31st July 2012, 03:46 PM   |  #1  
timduru's Avatar
OP Senior Member
Thanks Meter: 10,306
 
1,896 posts
Join Date:Joined: Apr 2011
Donate to Me
More
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, 3671 views)
Last edited by timduru; 31st July 2012 at 03:55 PM.
The Following 12 Users Say Thank You to timduru For This Useful Post: [ View ]
31st July 2012, 11:53 PM   |  #2  
jenda.69's Avatar
Member
Thanks Meter: 13
 
77 posts
Join Date:Joined: Nov 2007
More
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
1st August 2012, 01:14 AM   |  #3  
archcantor's Avatar
Senior Member
Flag Bristol CT USA
Thanks Meter: 54
 
162 posts
Join Date:Joined: Feb 2012
More
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.
Last edited by archcantor; 1st August 2012 at 01:17 AM.
1st August 2012, 08:49 AM   |  #4  
timduru's Avatar
OP Senior Member
Thanks Meter: 10,306
 
1,896 posts
Join Date:Joined: Apr 2011
Donate to Me
More
Quote:
Originally Posted by jenda.69

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

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: [ View ]
2nd September 2012, 02:40 PM   |  #5  
MarkInDaPark's Avatar
Member
Flag ...are you hitting on me?
Thanks Meter: 4
 
94 posts
Join Date:Joined: Feb 2012
More
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
9th September 2012, 03:28 AM   |  #6  
haxin's Avatar
Senior Member
Flag las vegas
Thanks Meter: 48
 
258 posts
Join Date:Joined: Nov 2011
More
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.
9th September 2012, 12:10 PM   |  #7  
timduru's Avatar
OP Senior Member
Thanks Meter: 10,306
 
1,896 posts
Join Date:Joined: Apr 2011
Donate to Me
More
Quote:
Originally Posted by haxin

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: [ View ]
28th September 2012, 01:21 AM   |  #8  
Member
Flag Mexico City
Thanks Meter: 3
 
37 posts
Join Date:Joined: Jul 2010
Donate to Me
More
Quote:
Originally Posted by timduru

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.
13th October 2012, 05:47 PM   |  #9  
Seferi's Avatar
Senior Member
Thanks Meter: 27
 
196 posts
Join Date:Joined: 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
14th October 2012, 07:33 AM   |  #10  
Senior Member
Flag Mermaid Beach QLD
Thanks Meter: 171
 
800 posts
Join Date:Joined: Nov 2010
More
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
Last edited by dgcruzing; 14th October 2012 at 07:41 AM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes