Running 3G and WiFi connections simultaneously - Android Q&A, Help & Troubleshooting

Hello to all.
I was trying to start this thread in Android Software and Hacking General, but got a warning about not having enough posts to submit a thread there, so I'm going to try here.
I have a Samsung Galaxy S II phone with the newest Android version. My goal is to modify the system so that 3G and WiFi are able to run together, side-by-side, simultaneously without 3G being turned off. Now, every time I connect to a WLAN, 3G cuts.
[OK, the spam police won't let me post outside links; Google Mobisocial 3G Wifi Stanford to find the article I'm talking about.]
MobiSocial News wrote about a hack that modifies ConnectivityService.java in a rather crude way, but according to the author of that article, it works on a 2.x Android system. There's not much info about the hack, but it's at least something and sounds plausible.
I tried to follow the instructions; I downloaded newest Android source codes, modified ConnectivityService.java and built the kernel by following these instructions: [a link to source.android.com "Building the System"]. But unfortunately, make didn't produce a services.jar mentioned in the article.
---
Does anyone know anything about using 3G and WiFi at the same time? Is it even possible?
Every piece of information is valuable, so don't be afraid to post. Thanks!

Anyone?
If I was misunderstood in my previous post; I'm not looking to have simultaneous connections, I just want the mobile network device to be online while I'm doing something with WiFi. And when WiFi cuts off, for example in a train tunnel or something, 3G takes its place.

I want to do the same with you
Cherilee said:
Anyone?
If I was misunderstood in my previous post; I'm not looking to have simultaneous connections, I just want the mobile network device to be online while I'm doing something with WiFi. And when WiFi cuts off, for example in a train tunnel or something, 3G takes its place.
Click to expand...
Click to collapse
Hello from me. I done the same job with you! And the Service.jar was created and i pushed to my mobile phone. But still the same default use of the connectivity. You managed to do something?

No it is not possible.
"NEVER CALL YOURSELF NOOB BE A NEWBIE"
PM me if u need help
Sent from MOON......

Moonguy75 said:
No it is not possible.
"NEVER CALL YOURSELF NOOB BE A NEWBIE"
PM me if u need help
Sent from MOON......
Click to expand...
Click to collapse
And why they say that it works?

Cherilee said:
Does anyone know anything about using 3G and WiFi at the same time? Is it even possible?
Click to expand...
Click to collapse
It's possible with a rooted phone.
cboursinos said:
Hello from me. I done the same job with you! And the Service.jar was created and i pushed to my mobile phone. But still the same default use of the connectivity. You managed to do something?
Click to expand...
Click to collapse
Read here:
http://forum.xda-developers.com/showthread.php?t=2197776
Moonguy75 said:
No it is not possible.
Click to expand...
Click to collapse
Actually it is, I found this thread that describes how to do it on an optimus G phone, and based on that I was able to do in on vanilla android 4.3 as well (my rooted nexus 4).
You need to put a couple of scripts together, since you need a series of shell commands for turning this on and off, I recommend the wonderful SH Script Runner for this.
Here is what I did on my Nexus 4. It works perfectly but note that you don't actually see the wifi icon turning on, but if you run "netcfg | grep UP" you will see that the wlan0 interface is up and running (as well as the rmnet_usb0 mobile data interface, both of them will be up and will have the expected IP addresses) and you can access your local LAN while your mobile data 3g/4g whatever provides your default route to the outside world.
Code:
# enable dual-networking:
pkill dhcpcd
svc wifi disable
svc data enable
netcfg wlan0 up
cd /data/misc/wifi/.
wpa_supplicant -B -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
dhcpcd wlan0
ip route add x.x.x.x via x.x.x.y # add any desired local route
# disable dual-networking:
ip route del x.x.x.x/x via x.x.x.y
pkill dhcpcd
pkill wpa_supplicant
rm -rf /data/misc/wifi/wlan0
netcfg wlan0 down
svc wifi disable
svc data disable

Hi guys. I am trying to do the same on my Xiaomi m2. Can someone point me to the correct direction. Much much much appreciated.
Sent from my MI 2 using Tapatalk

wlh03212 said:
Hi guys. I am trying to do the same on my Xiaomi m2. Can someone point me to the correct direction. Much much much appreciated.
Click to expand...
Click to collapse
What's your Android version? Is the phone rooted? Did you try running the above commands I posted, and what was the output?
You could also try the similar commands that worked on another and post the output here.

sordna said:
What's your Android version? Is the phone rooted? Did you try running the above commands I posted, and what was the output?
You could also try the similar commands that worked on another and post the output here.
Click to expand...
Click to collapse
Hi I'm running on Miui v5 4.1.1
I did try the above commands. But I'm not sure about the ip route you mentioned in the coding x. X. X. X via y. Y. Y. Y.
The response of the script was permission denied. I am definitely rooted and I gave permission to SH script runner.
Sent from my MI 2 using Tapatalk

First try the commands on the terminal (adb shell, or terminal app) and make sure to type "su" first, so that all commands get executed with root permissions. After you get things working without errors on the terminal, you can put these commands in script runner.
The x.x.x stuff needs to be replaced with the subnet/netmask of your home LAN, such as 10.0.0.0/24 or whatever and the default gateway (your wireless router) to reach it via.The route stuff assumes a basic understanding of networking... Actually you can remove the route statements, they are only needed if your home LAN is on a different subnet than your WiFi subnet... most home routers put everything on the same subnet.
What is the end goal you are trying to achieve by connecting to 2 networks?

sordna said:
First try the commands on the terminal (adb shell, or terminal app) and make sure to type "su" first, so that all commands get executed with root permissions. After you get things working without errors on the terminal, you can put these commands in script runner.
The x.x.x stuff needs to be replaced with the subnet/netmask of your home LAN, such as 10.0.0.0/24 or whatever and the default gateway (your wireless router) to reach it via.The route stuff assumes a basic understanding of networking... Actually you can remove the route statements, they are only needed if your home LAN is on a different subnet than your WiFi subnet... most home routers put everything on the same subnet.
What is the end goal you are trying to achieve by connecting to 2 networks?
Click to expand...
Click to collapse
Thanks you for your reply. First of all my understanding of networking isn't anywhere basic . What i did with the xxx was replacing it with the internal ip assigned to me, aka 192.x.x.x
For the yyy, I replaced it with the ip of 3g connection. Not sure what I am doing here. Please guide me here (I know the su part which I an required to do in terminal)
And finally my goal. I have Seagate wireless plus and itself is a portable wifi hotspot to its own content. I am able to stream pictures music and video from the battery operated hardisk. I can bridge the connection of the portable hotspot to my home wifi gaining xs to the Internet.
However while I am connected to the Seagate wireless plus, I cannot connect to my 3g. That meaning I can't have Internet on the go which is a very big limitation.
Sent from my MI 2 using Tapatalk
Sent from my MI 2 using Tapatalk

OK. You don't need the "ip route" command, since your WiFi interface will give you access to the Seagate as soon as you connect to it. And the 3G interface, at least in my case, provided default gateway to the internet.
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well.

sordna said:
OK. You don't need the "ip route" command, since your WiFi interface will give you access to the Seagate as soon as you connect to it. And the 3G interface, at least in my case, provided default gateway to the internet.
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well.
Click to expand...
Click to collapse
# enable dual-networking:
............
............
.............
..........
...........
..............
..........
ip route add x.x.x.x via x.x.x.y # add any desired local route -------->( do i remove this row of code entirely? What do i do with this row of coding? Provide my default gateway? I'm not sure what's my default gateway or how i do find out my default gateway or how should i edit this coding to my default gateway.)
Anyway, try the other commands one by one and see which of them, if any, give you any errors. The netcfg command should show you that 2 interfaces (apart from the lo - 127.0.0.1) are UP and with expected IP addresses if everything goes well (In short if the i execute the above commands correctly with the correct default gateway of my 3G, the netcfg command should show my default gateway correctly? is my understanding correct?)

As I said before, you don't need the ip route command, remove that line entirely!
When all is working, netcfg | grep UP should show you your wlan interface with the IP address given to it by the Seagate, and your mobile data interface with the IP address given to it by your cellular provider.

sordna said:
As I said before, you don't need the ip route command, remove that line entirely!
When all is working, netcfg | grep UP should show you your wlan interface with the IP address given to it by the Seagate, and your mobile data interface with the IP address given to it by your cellular provider.
Click to expand...
Click to collapse
Thanks you much! Going to try out when I get home.
Sent from my MI 2 using Tapatalk

OK. Please hit the thanks buttons

sordna said:
OK. Please hit the thanks buttons
Click to expand...
Click to collapse
When i run the code line by line in terminal, i get an error message wlan0: interface not found or invalid
Do I run the code when connected to my hardisk hotspot? When exactly do I run the code.

wlh03212 said:
When i run the code line by line in terminal, i get an error message wlan0: interface not found or invalid
Do I run the code when connected to my hardisk hotspot? When exactly do I run the code.
Click to expand...
Click to collapse
If you try to understand the code you will notice it turns off your Wi-Fi and then turns it on. So actually you don't need to connect to the hotspot first.
Regarding the interface name, here is where you need to do your own investigation and figure the WiFi interface name for your own phone.
The netcfg command without any arguments displays all interfaces, and whenever you are on Wi-Fi, the relevant interface will be UP and will have your assigned IP address next to it.
Look at how much stuff I changed compared to the things posted by the other guy for the optimus phone. Look at his solution and be prepared to investigate and come up with similar amount of changes for your phone. I spent several hours trying different stuff for my Nexus 4, with my only info being the other guy's post. I read about netcfg and everything else googling various websites. You need to do the same and learn a bit about that stuff.
For all I know, the Optimus phone method could be closer to your phone than my method, perhaps. You have to do your own research and figure out the differences, then post them here to help other owners with the same device as yours.

sordna said:
If you try to understand the code you will notice it turns off your Wi-Fi and then turns it on. So actually you don't need to connect to the hotspot first.
Regarding the interface name, here is where you need to do your own investigation and figure the WiFi interface name for your own phone.
The netcfg command without any arguments displays all interfaces, and whenever you are on Wi-Fi, the relevant interface will be UP and will have your assigned IP address next to it.
Look at how much stuff I changed compared to the things posted by the other guy for the optimus phone. Look at his solution and be prepared to investigate and come up with similar amount of changes for your phone. I spent several hours trying different stuff for my Nexus 4, with my only info being the other guy's post. I read about netcfg and everything else googling various websites. You need to do the same and learn a bit about that stuff.
For all I know, the Optimus phone method could be closer to your phone than my method, perhaps. You have to do your own research and figure out the differences, then post them here to help other owners with the same device as yours.
Click to expand...
Click to collapse
Yes. I notice that the wifi switched off and then turns on again. Alright I do some research on my own! Thanks again.
Hope that I will get some breakthrough soon
Sent from my MI 2 using Tapatalk

Hi
I finally got it working. When I am connected to seagate wireless, I have to fiddle with the connection settings inside wifi settings. I assigned a static ip and assigned the gateway to 0.0.0.0
As for the ip, I set a different internal ip with the last digit increased by one. Example 172.25.0.2
Now I am connected to both 3G and LAN.
Sent from my iPhone using Tapatalk

Related

[Q] Anyone been able to ssh remotely (not with wifi) to their Thunderbolt?

ssh from your computer over wifi is easy, but doing it over LTE seems to be problematic if not impossible (with the phone acting as the server). It doesn't look like we're given a public ipv4 address and they're just doing an NAT magic to translate it into an ipv4 addy on their end, but it doesnt necessarily link back to you always (if you check your ip over a browser).
With my home connection being SOL as far as having ipv6 thanks to craptactular att "we dont need no ipv6 for our customers," I don't see any possible method to reach the phone.
Blackberries had a static ipv4 (when I had one) but I know that's a dying thing for new phones with ipv4's days numbered.
I know there's other solutions (like vpn), but obviously that's not the same.
i have not had any luck either and that makes sense now cuz i remember having issues with trying to run a server on my phone . damn this is annoying.
I cant get ANY data to work with the exception of once and that was only searching google.com but no other website would work... any ideas anyone?
ddarvish said:
i have not had any luck either and that makes sense now cuz i remember having issues with trying to run a server on my phone . damn this is annoying.
I cant get ANY data to work with the exception of once and that was only searching google.com but no other website would work... any ideas anyone?
Click to expand...
Click to collapse
Nope, not really. Probably could set up a vpn server on my VPS server and and vpn into that to get around the NAT though and do some work in iptables for routing. That was the only thing I could come up with.
Hi,
I know that it was stated that "ssh from your computer over wifi is easy," but this process is not immediately obviously to me. I have succeeded in sshing with the phone, but not into it. Can someone explain how to ssh into the phone (from a computer with wifi that the phone is also connected into)?
Thank you,
Michael
mcoughlin said:
Hi,
I know that it was stated that "ssh from your computer over wifi is easy," but this process is not immediately obviously to me. I have succeeded in sshing with the phone, but not into it. Can someone explain how to ssh into the phone (from a computer with wifi that the phone is also connected into)?
Thank you,
Michael
Click to expand...
Click to collapse
You need an ssh server on your phone. You can either use something like dropbear, which comes by default on most AOSP ROMs and you can figure out how to set it up by reading this or you can use something like sshdroid, which is a GUI app.
I'd be willing to bet that verizion simply blocking ports and not giving you a real ip
Sent from my ADR6400L using XDA App
movielover76 said:
I'd be willing to bet that verizion simply blocking ports and not giving you a real ip
Sent from my ADR6400L using XDA App
Click to expand...
Click to collapse
Unless you're roaming, you're always behind NAT and an IP within verizon's network. No one is going to give you a real and static ipv4 address nowadays regardless of the mobile network, there just arent enough left. IPv6 however I do not know if it routes out or not, haven't tested yet and the only place that I have an ipv6 address is my remote server so it doesn't do that much good usability wise to me.
Thank you for the really helpful comment! Now for another silly question: imagine the case where you have your phone connected by USB to your computer. Is it still possible to "ssh" into it using one of the methods described above?
mcoughlin said:
Thank you for the really helpful comment! Now for another silly question: imagine the case where you have your phone connected by USB to your computer. Is it still possible to "ssh" into it using one of the methods described above?
Click to expand...
Click to collapse
if you have the usb cable connected, you could just use adb and type "adb shell"
Otherwise, I don't think so because you aren't registering a network address via usb.
So once you are into your phone with adb, is it possible to run a program like ConnectBot to ssh out from the phone through your computer's adb shell?
mcoughlin said:
So once you are into your phone with adb, is it possible to run a program like ConnectBot to ssh out from the phone through your computer's adb shell?
Click to expand...
Click to collapse
Yes, if you mean ssh into your computer's sshd (ssh server).
ssh client (phone) → ssh server (computer)
or you can go the other way as well if you have an ssh server on your phone.

[Q] Ad Hoc WiFi

Has anyone gotten their Tablet S to connect to WiFi via an ad hoc connection? I found this in the Market ZT-180 Adhoc Switcher but don't know if it works with our Murata WiFi module.
I did try the wpa_supplicant hack, but afterward I was only able to see ad hoc connections. Actually connecting to them failed each time.
I tried wifiAdHocEnabler from the market, same result, i can see the adhoc networks now but it keeps on obtaining IP address on Sony tab S when I try to connect
I tried it on my desire hd, it worked (connected to the adhoc) but no internet, I am still trying to figure out how to solve it
Hi,
This was already discuss here:
http://forum.xda-developers.com/showthread.php?t=1290313&highlight=ad+hoc
I was able to connect my tablet to my android phone internet
Thanks rimsilva for pointing out that post
the issue is still there, I can see the adhoc and the tab keeps trying to obtain IP address
I can use my iphone hotspot to connect my tablet to internet, simple and easy
SudaDreamS said:
Thanks rimsilva for pointing out that post
the issue is still there, I can see the adhoc and the tab keeps trying to obtain IP address
Click to expand...
Click to collapse
Have you tried busibox and wifiadhocenabler in the tablet.
I had the same issue with a specific rom in my android phone, the wifi tether was running but my laptop was always obtaining IP address.
In your phone you are using native tether or external application? Please try wireless tether or wifi tether beta (look in Google)
I am using htc P3600 WM6 (Trinity) as wifi hotspot with WMWifiRouter
I can detect it using other windows mobile 6 device and I can surf internet on other WM6 easily. This is why I guess the issue is in android (Sony S & htc Desire HD 2.3.3 Leedroid)
& yes I tried the wifiadhoc enabler and after trying it only i was able to detect the hotspot but I couldn't connect (obtaining IP)
I tried the adb method, root explorer method, Xoom files, Nook files all are giving same result (obtaining IP)
Sorry guys, I'm confused as to why it sounds so complicated.
I have no problem connecting my new unrooted tablet s to wifi using my iphone hotspot or connecting to wifi at Mcdonald, Starbuck or other government building or libraries.
I don't need any app at all.
Kermit33 said:
Sorry guys, I'm confused as to why it sounds so complicated.
I have no problem connecting my new unrooted tablet s to wifi using my iphone hotspot or connecting to wifi at Mcdonald, Starbuck or other government building or libraries.
I don't need any app at all.
Click to expand...
Click to collapse
Look that we're talking about different things, that may cause the connection problem.
My experience is with Android --> Android connection. I had no success with MIUI .35 Kernel in my Ideos, but with CM7 and now Aurora ICS works perfect.
I thought SudaDreamS was trying the same but no, he is on WM6 and maybe is limitation between both systems.
Now you are talking about iOS and routers....
SudaDreamS look at this thread:
http://forum.xda-developers.com/showthread.php?t=1192961
http://android.stackexchange.com/questions/17190/tethering-hc3-2-with-windows-mobile
PS: your tablet is rooted right?
rimsilva said:
Look that we're talking about different things, that may cause the connection problem.
My experience is with Android --> Android connection. I had no success with MIUI .35 Kernel in my Ideos, but with CM7 and now Aurora ICS works perfect.
I thought SudaDreamS was trying the same but no, he is on WM6 and maybe is limitation between both systems.
Now you are talking about iOS and routers....
SudaDreamS look at this thread:
http://forum.xda-developers.com/showthread.php?t=1192961
http://android.stackexchange.com/questions/17190/tethering-hc3-2-with-windows-mobile
PS: your tablet is rooted right?
Click to expand...
Click to collapse
My tablet is not rooted.
Thanks again rimsilva,
well both links didn't help much
I tried to use a static IP to overcome (obtaining IP address issue)
The great news is .. I was able to connect but no internet surfing on the tab yet and on the other wm6 as well, there was no surfing
anyhow, I'm still trying
hope some1 will suggest some solution or help by thinking with me
---------- Post added at 05:08 PM ---------- Previous post was at 05:05 PM ----------
Kermit33 said:
My tablet is not rooted.
Click to expand...
Click to collapse
You can't tether to ad-hoc then, anyhow you might tether to access points
I managed to connect by removing the security of the network, speed is fine, it works perfectly now, since I'll be using it on the go, I wont need the security that much + the WMWifirouter shows how many devices are connected, so it's gives partial sense of security
Thanks to rimsilva for trying to help
SudaDreamS said:
I managed to connect by removing the security of the network, speed is fine, it works perfectly now, since I'll be using it on the go, I wont need the security that much + the WMWifirouter shows how many devices are connected, so it's gives partial sense of security
Thanks to rimsilva for trying to help
Click to expand...
Click to collapse
Holy crap! I did the same thing and it worked. Can't believe I didn't try that before. I'm using Connectify-Lite on my laptop in Afghanistan and it was driving me nuts to not be able to connect my Tablet S.
hi all
i hit a wierd issue with adhoc p2p on my tablet S. my tablet is rooted and i have reference to all the available HC adhoc wpa_supplicant binary available out there..
scenario with adhoc connections setup on Win7 works fine(static IP setup). im able to ping the wifi ip of my Win7 from tablet S.
However, it failed to talk to talk to my adhoc device "OBDKey WLAN". It(tablet S) will see the adhoc ssid and connects to it(static ip setup). but it will goes into connect/disconnect loops. I ran a terminal to constantly ping my device adhoc IP but its always 'host unreachable'. Im constantly seeing errors :
I/wpa_supplicant( 2932): CTRL-EVENT-DRIVER-STATE HANGED
V/WifiMonitor( 155): Event [CTRL-EVENT-DRIVER-STATE HANGED]
ip route shows the correct network routing for network 192.168.0.0/16
netcfg shows my wlan0 is up and running with the static IP.
wpa logs that its able to connect to the adhoc ssid too.
(attached is the log of the occurance describe above.)
I did make sure its not the adhoc device faulty by testing with my HTC phoen. I was able to connect to my adhoc device using my HTC DHD (rooted with LeeDroid) and ping both ways.
Is there any kind souls who can point me to the right direction to solve this? am running out of ideas.
/etc/wifi/wpa_supplicant.conf contents:
$ cat /etc/wifi/wpa_supplicant.conf
cat /etc/wifi/wpa_supplicant.conf
update_config=1
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
eapol_version=1
ap_scan=1
fast_reauth=1
wpa_supplicant refs:
http://forum.xda-developers.com/showthread.php?t=1083182&page=2
http://forum.xda-developers.com/showthread.php?t=1069569&page=2
http://forum.xda-developers.com/showthread.php?t=1033314&page=14
http://androidtablethacks.com/android-tablet-hacks/how-to-enable-adhoc-wifi-on-android-tablets/
solved my issue with adhoc wifi keep d/c
zerod78 said:
hi all
i hit a wierd issue with adhoc p2p on my tablet S. my tablet is rooted and i have reference to all the available HC adhoc wpa_supplicant binary available out there..
scenario with adhoc connections setup on Win7 works fine(static IP setup). im able to ping the wifi ip of my Win7 from tablet S.
However, it failed to talk to talk to my adhoc device "OBDKey WLAN". It(tablet S) will see the adhoc ssid and connects to it(static ip setup). but it will goes into connect/disconnect loops. I ran a terminal to constantly ping my device adhoc IP but its always 'host unreachable'. Im constantly seeing errors :
I/wpa_supplicant( 2932): CTRL-EVENT-DRIVER-STATE HANGED
V/WifiMonitor( 155): Event [CTRL-EVENT-DRIVER-STATE HANGED]
ip route shows the correct network routing for network 192.168.0.0/16
netcfg shows my wlan0 is up and running with the static IP.
wpa logs that its able to connect to the adhoc ssid too.
(attached is the log of the occurance describe above.)
I did make sure its not the adhoc device faulty by testing with my HTC phoen. I was able to connect to my adhoc device using my HTC DHD (rooted with LeeDroid) and ping both ways.
Is there any kind souls who can point me to the right direction to solve this? am running out of ideas.
/etc/wifi/wpa_supplicant.conf contents:
$ cat /etc/wifi/wpa_supplicant.conf
cat /etc/wifi/wpa_supplicant.conf
update_config=1
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
eapol_version=1
ap_scan=1
fast_reauth=1
wpa_supplicant refs:
http://forum.xda-developers.com/showthread.php?t=1083182&page=2
http://forum.xda-developers.com/showthread.php?t=1069569&page=2
http://forum.xda-developers.com/showthread.php?t=1033314&page=14
http://androidtablethacks.com/android-tablet-hacks/how-to-enable-adhoc-wifi-on-android-tablets/
Click to expand...
Click to collapse
Ok, i have resolved my issue above. Even thou i was using a adhoc enabled wpa_supplicant, my adhoc wifi device is have constant disconnecting upon connecting and with Xoom adhoc HC built wpa_supplicant adhoc enabled, i get the above wifi errors (hung state) from wpa_supplicant.
After spending much time on it, i discover that my tablet S is doing wireless b,g,N. Looking further it seems my device only does a,b,g. Digged the whole /system for wifi related things and managed to find out some info in wmiconfig and wlan_tool.
So in wlan_tool, there is a commented line :
#WMODE="bg"
uncomment the above line will make your wifi to only communicate in b or g mode. And viola... problem solved. Connections remains strong and i do not face any d/c on my adhoc wifi connection to my device.
how to add ad hoc wifi capability to S
O.k., big newb here. I just read up on lots of threads on how to make the tablet S work with ad hoc wifi (I have a verizon thunderbolt). but, everything is way over my head.
Question, does the tablet S have to be rooted to enable it to work on ad hoc wifi?
I think all the forums and threads that I have read indicate that to be true. Obvious next question would be how...
Thanks in advance.
Yes, you have to have your tablet rooted to try any of the ad hoc solutions.
Hellomofo said:
I think all the forums and threads that I have read indicate that to be true. Obvious next question would be how...
Thanks in advance.
Click to expand...
Click to collapse
Here is where to begin...Tablet S root solution
Thanks. I'll start there.
No need to modify wpa_supplicant binary
I changed data/misc/wifi/wpa_supplicant.conf instead of wpa_supplicant.
Step1:First i scanned my adhoc network using Wifi Manager. It shows adhoc networks. I ignored it's warning and tried to connect. It'll fail.No problem! We now have the adhoc network listed in wpa_supplicant.conf.
Note: you can skip this step if you know how to edit wpa_supplicant.conf manually or if your device already lists adhoc networks on scanning.
Step2: You'll need to root your device if you're doing this through your device itself. If you use adb you may not need to root your device.(I had root access by default through adb. So rooting the device wasn't necessary for me). If you're using pc(windows or linux), i recommend Android Commander.
Pull and/or edit data/misc/wifi/wpa_supplicant.conf. Add the following line
ap_scan=2
Find line like
network={
ssid="your adhoc name"
bssid=*some value*
.
.
}
Delete bssid line.
Add/Change the following
scan_ssid=1
priority=1
mode=1
Push back/save the modified file.
chown ownership back to system.wifi. Type the following in adb
#chown system.wifi data/misc/wifi/wpa_supplicant.conf
Advantage: Safer than modifying system/etc/wifi/wpa_supplicant binary. Saves you the trouble of compiling modified wpa_supplicant or finding a compiled one for your platform.
Drawback: This is just a temporary solution.You'll have to repeat this process for every new adhoc network as it doesn't enable adhoc forever. It is good for connecting to your home network or other know networks, but if you want to connect to any adhoc network you scan,then this is not your method. Because, wpa_supplicant.conf will be overwritten every time you scan a new network.

[Q] reverse tether? is it possible?

I'm basically on a per-MB data plan, and my Fascinate's wifi receiver is horrible, even compared to my iPod Touch 4.
Right now I am getting wifi through a high-gain directional usb adapter. I can share the connection to my iPod through an AdHoc network, and Firestarter's internet sharing feature [on Ubuntu].
But since the Fascinate doesn't recognize AdHoc, I cannot find a way to reverse tether my phone, that is, use my Laptop's connection on my phone.
Is it possible?
I tried making a Hotspot with my fascinate, connecting to it with my laptop, so my laptop was something [I forget the exact numbers] like 10.42.43.114, and my phone was 10.42.43.120. I tried Proxy Droid, telling it to use 10.42.43.120 SOCKS5 proxy (I used ssh localhost -D1111 on my laptop for socks5 proxy), and tried loading a page. I got nothing. Then I tried setting up a SQUID http proxy, and this time I got a "Squid access denied" message, so it was loading from my laptop.
but I tried this again later, and could not even get squid to load anything after that.
Is there a way to do this easily?
Maybe you can try couple possible solutions from here?
Hyper_Warp said:
Maybe you can try couple possible solutions from here?
Click to expand...
Click to collapse
I can't get the connections bridged in linux. I tried following some steps someone posted somewhere, but it gave me an error, saying my wifi [wlan1] couldn't be added to the bridge [br0]
You can try this: http://www.maryfi.com/
Saw it on lifehacker
nufan said:
You can try this: http://www.maryfi.com/
Saw it on lifehacker
Click to expand...
Click to collapse
Looks fine.. except I can't be rebooting into Windows 7 all the time..
I have Ubuntu, as I stated in my original post
There is a new app called ReverseTether that allows you to do just that and it doesn't require any additional software or tech savviness, and it's very straight forward and simple to use.
Check this out:
Benn awhile since I used bridge utils but I seem to recall similar errors when I had an IP assigned to all the interfaces. I had to have the two interfaces without ips and assign the ip to br0 instead. If I remember correctly.

Cannot connect to wifi

Hi,
i cannot connect to any wifi, with password or not, it just saying obtaining ip adress, and then the network disapeare or it just write saved under the network, sometimes i cannot even see any networks, i tried many roms, on all its the same.
currently i am using aokp mix rom, faux kernel 1.45.
please help, thank you
aspico said:
Hi,
i cannot connect to any wifi, with password or not, it just saying obtaining ip adress, and then the network disapeare or it just write saved under the network, sometimes i cannot even see any networks, i tried many roms, on all its the same.
currently i am using aokp mix rom, faux kernel 1.45.
please help, thank you
Click to expand...
Click to collapse
Logcat will help you.
If you are on linux:
Code:
adb logcat -d > /tmp/logcat.txt
grep -i 'wifi\|wpa' /tmp/logcat.txt
On windows, use "adb logcat" saving the output to a text file, like my example above. Try to find strings containing wifi and wpa (or wpa_supplicant).
This way you will know what is really happening.
epinter said:
Logcat will help you.
If you are on linux:
Code:
adb logcat -d > /tmp/logcat.txt
grep -i 'wifi\|wpa' /tmp/logcat.txt
On windows, use "adb logcat" saving the output to a text file, like my example above. Try to find strings containing wifi and wpa (or wpa_supplicant).
This way you will know what is really happening.
Click to expand...
Click to collapse
huh can you explain it a little more better, where i have to write this above? i am on windows...on my atrix i have terminal emuluator, have i there to write this?
There have been several reports over the months of people having trouble connecting to one manufacturers routers..........may be Belkin, but a cannot remember for sure. Also, if you are trying to connect to wireless N at 5GHz, try wireless G instead. I believe the Atrix will not connect at 5GHz, and the symptoms of trying to do so are exactly what you describe. If I try to connect to my router on the 5GHz wireless N band I get the same results as you. One other possibility is the password length. I have read that you should keep it under 8 characters with the Atrix, so maybe try shortening the password, or try connecting unsecured to test this theory out. I am using an Asus RT-N66U right now, but have previously used 2 Netgear routers without issue also. My work uses Cisco repeaters and routers and I have no issues there either.
CaelanT said:
There have been several reports over the months of people having trouble connecting to one manufacturers routers..........may be Belkin, but a cannot remember for sure. Also, if you are trying to connect to wireless N at 5GHz, try wireless G instead. I believe the Atrix will not connect at 5GHz, and the symptoms of trying to do so are exactly what you describe. If I try to connect to my router on the 5GHz wireless N band I get the same results as you. One other possibility is the password length. I have read that you should keep it under 8 characters with the Atrix, so maybe try shortening the password, or try connecting unsecured to test this theory out. I am using an Asus RT-N66U right now, but have previously used 2 Netgear routers without issue also. My work uses Cisco repeaters and routers and I have no issues there either.
Click to expand...
Click to collapse
I cannot connect to any network, 2.4 5 ghz.... secured or not secured, it finds networks, but i cannot connect to them.
CaelanT said:
Also, if you are trying to connect to wireless N at 5GHz, try wireless G instead. I believe the Atrix will not connect at 5GHz, and the symptoms of trying to do so are exactly what you describe. If I try to connect to my router on the 5GHz wireless N band I get the same results as you.
Click to expand...
Click to collapse
Just a heads up, but I can connect to my 5Ghz WiFi at home just fine. What kind of encryption are you using?
Inspiredwire said:
Just a heads up, but I can connect to my 5Ghz WiFi at home just fine. What kind of encryption are you using?
Click to expand...
Click to collapse
it has no matter with encription, i cannot connect at home, cannot connect at the city, cannot connect anywhere. its just showing up the network i try to connect it says saved and nothing happens, later the phone just turn off, i have to pull the battery to turn it on again,
logcat says this when i turn on the wifi:
E/Wifistatemachine (1553): Unable to change interface settings: java.lang.illegalstateexeption: Unable to communicate with native daemon to interface setcfg - com. android.server.NativeDaemonConnectorExeption: Cmd interface setcfg eth0 0.0.0.0 0 down broadcast running multicast failed with code 501: Flag unsupported
EWifiConfigStore (1552) : Missing id while pharsing configuration
Just installed CM7 nightly, everything works fine for now

enable wireless and 4g at the same time

Is there any way to do this? It seems that when I enable wifi, the rmnet_usb0 interface becomes inaccessible (no ipv4 address). When I disable wifi, even the wlan and cfg80211 modules get unloaded. I can't seem to find the way to load them (with wifi set as disabled) to try to ifconfig the interface up. Maybe I am just going about it in the completely wrong way!
All I really want is to have both interfaces up and running at the same time, with the default gateway pointing out the rmnet_usb0 interface so that I can access the internet via 4g, but still being able to route to my local wireless lan.
I think your best bet is going to be setting up a vpn
My laptop has wifi and bluetooth on the same assembly, and only 1 is accessible at once. Maybe its like that.
Sent from my LG-E970 using xda app-developers app
I know they can physically be enabled at the same time, because the phone can be a hotspot. That doesn't really help me though if I want to connect wired devices to it. I want it to remain a wifi client.
There's an app called SuperDownload or something that uses wifi and mobile data simultaneously for downloading. It seems to bring the mobile data up in some special mode where the app can use it but it's not otherwise generally routable. That's what the author says, at least, but I'm not sure that makes sense. Normally when data is in use it basically looks like any other network interface.
A more general way of asking my question might be "what happens behind the scenes when you enable wifi?" if there's a script being run I can see what's going on (loading the module and so on) and maybe adapt it to my needs.
http://forum.xda-developers.com/showthread.php?t=1667025
This app uses them both simultaneously, maybe you can get some info there..
SUCCESS I think: enable wireless and 4g at the same time
bigworm50 said:
http://forum.xda-developers.com/showthread.php?t=1667025
This app uses them both simultaneously, maybe you can get some info there..
Click to expand...
Click to collapse
Yep that's the one I mentioned. Doesn't seem to be much help.
I think I've gotten somewhere. I can't test this fully because I don't have access to any other machines on the current wireless lan, but I can get a dhcp address from it and ping its gateway, while meanwhile traceroutes to the internet are going through the mobile network.
1. Turn off wifi in the normal way (from the phone's user interface) if it's not already off.
All the following steps done in a root shell:
2. load the drivers
busybox insmod /system/lib/modules/cfg80211.ko
busybox insmod /system/lib/modules/wlan.ko
3. start wpa_supplicant to connect to the first available wireless network. The wpa_supplicant.conf file I list below is the one maintained automatically by the phone as you join new networks. If you want more control (e.g. connect to only a specific network), copy the wpa_supplicant.conf file somewhere, modify it as needed, and specify it on the command line.
wpa_supplicant -B -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
4. dhcpcd
busybox pkill dhcpcd
rm /data/misc/dhcp/*
dhcpcd wlan0
5. verify route
busybox route
For me this is showing the original default first on the list (goes through rmnet_usb0) followed by the new one configured for the wireless lan wlan0. Traceroute shows the traffic going out the first one.
Now, at this point if you try to enable wifi normally from the phone it will not work. To make it work:
ifconfig wlan0 down
ifconfig wlan0 unplumb
rmmod wlan
rmmod cfg80211
And you can turn on wireless again.
I was able to test at home, and it is definitely working.
As for what this buys us, there are two things. First, I have crappy satellite internet at home, so I want to be able to transfer files back and forth, and sometimes even use the LG OSP, without my phone having to use that instead of 4G (which is marginal but still better).
More usefully, it allows non-tethered proxying. I can run a socks or http proxy on my phone and point my non-wireless devices at it, letting me browse the web without routing all my internet traffic through the phone.
I'm still a little bit away from non-wireless tethering (i.e. being able to set my pc's default gateway to my phone and have it route all internet traffic through the mobile data connection), but that would be nice as well. I will need to set up some iptables NAT stuff the way wifi tether does, and I haven't gotten the right combination yet since I don't get much opportunity to test it.
works on nexus4 too
Thank you so much for this info, I was able to change things a bit and make it work on my stock / rooted Nexus 4:
Code:
# enable dual-networking:
pkill dhcpcd
svc wifi disable
svc data enable
netcfg wlan0 up
cd /data/misc/wifi/.
wpa_supplicant -B -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
dhcpcd wlan0
ip route add x.x.x.x via x.x.x.y # add any desired local route
# disable dual-networking:
ip route del x.x.x.x/x via x.x.x.y
pkill dhcpcd
pkill wpa_supplicant
rm -rf /data/misc/wifi/wlan0
netcfg wlan0 down
svc wifi disable
svc data disable
I use SH Script runner to create and run the 2 above scripts easily.
I am a newbie... Do I have to just run the script in Sh script runner? And I don't know what IP route to use.
Sent from my GT-I9300 using XDA Premium 4 mobile app
---------- Post added at 12:25 PM ---------- Previous post was at 11:26 AM ----------
I am not able to load the drivers.. It's showing not found.. Even though I have installed busy box using busy box installer pro
Sent from my GT-I9300 using XDA Premium 4 mobile app
---------- Post added at 12:30 PM ---------- Previous post was at 12:25 PM ----------
I checked the directory using root Explorer and I can't find cfg80211.ko and wlan.ko
Sent from my GT-I9300 using XDA Premium 4 mobile app
Whether you have any kernel modules to install with insmod, depends on your phone model, ROM, kernel.
For my nexus 4 with franco.kernel I don't have the modules either, but got it to work fine. So maybe its a similar situation with your phone .
SH script runner is not required, you can run the script in any terminal app after doing su.
EDIT: Some other interesting threads related to this topic are here:
http://forum.xda-developers.com/showthread.php?t=1640472
http://forum.xda-developers.com/showpost.php?p=13758490&postcount=1
http://forum.xda-developers.com/showthread.php?t=1667025

Categories

Resources