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
Related
So far, I have not found a way to turn off power management.. Usually it goes like this -
iwconfig eth0 power off
I did notice wmiconfig and thus tried wmiconfig --getpower which gave me:
eth1
Power mode is rec
Power mode can be rec or maxperf..
If any of you have used the broadcom drivers in Linux, you'll know that they slow down big time when power management is set to 'All Packets Received'. On my laptop with a 300mb/sec 5ghz 802.11n connection, I get 2MB/sec with PM on.. 19MB/sec with PM off. It matters..
I haven't been able to find much on wmiconfig due to MS having an identical name for one of its utilities. I'm going to try the iwmulticall binary from my g2 now.... ok.. got errors. it listed lo, tunl0, and gre0.. then it died.. heh.
Has anyone turned off the PM or been able to interface with the bcm wifi chip? It'd be even cooler if we could turn up the tx-power a little.
Nothing? Do you guys think the bottleneck for wifi transfer speed is the emmc?!
Any progress?
I have an Adam, which uses same wmiconfig and BCM4329 wifi.
wmiconfig have options like --power maxperf , but when I use it and try --getpower it reports back rec mode and not maxperf
Also there is option --txoptbursting 1 but not sure if it worked or at lease I don't know how to check if it has changed.
Yes. I can get 4-5MB/second (receive via ubuntu ncftp as client, gtab server) with power management turned off. CIFS has slightly lower speeds - but that's normal. SFTP is also decent (allows me to access / in its entirety as if it were mounted locally).
Anyways... put this in /system/xbin/
http://home.comcast.net/~ibladesi/iwmulticall
and start symlinking to it... like so
# cd /system/xbin/
/system/xbin # ln -s /system/xbin/iwmulticall iwconfig
Here are the symlinks you can create in addition to iwconfig:
iwgetid iwlist iwpriv iwspy
My normal use for it is-
iwconfig wlan0 power off
So I made a script and named it fstwan so its quick to type.
Don't try to set the txpower, that seems to be broken with all android devices.
And yeah, wmiconfig seems to be complete horse****.. that's even worse than bs. I don't think that this will change the tame nature of the wifi radio's power output.. I think it has more to do with system utilization.. its such strange default behavior. For example, using a ssh client to connect to the device is brutal in terms of responsiveness, turn pm off and viola, its like you're using adb.
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.
I have write a script that simpliefies a bluetooth pan connection on the devices in topic.
I have spend a lot of time doing this. Not for writing the script but to find out whats going wrong when connect those devices.
You need ics on phone or wireless tether on honeycomb or others. If you use wireless tether you have to set it to use bluetooth.
So on now copy this script somewhere on your device save it under initpan.sh.
In console chmod 755 initpan.sh
Execute it and yes thats it so easy but so so heavy.
Here is the script:
#!/system/bin/sh
# Setup Handy Network
/system/bin/pand --connect F8B:7F:099:66
/system/bin/ifconfig bnep0 down
dhcpcd bnep0
setprop net.dns1 8.8.8.8
Sent from my Sony Tablet S using XDA Premium HD app
Your sensemilla
I'm not certain on this (haven't used PAN on Android much), but I'm pretty sure that script would need to be changed by whoever wants to use it, since it seems to be hardcoded to the Bluetooth interfaces MAC address which is device-unique.
Also, what are you actually trying to do? In the script, you bring the virtual interface down, then configure it for DHCP, then manually set the Google DNS, then don't bring it back up again? What's actually meant to be going on?
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
I'm using a Samsung Fascinate with AOKP Milestone 5 by Stephen.k.spear.
My second device is an Asus Transformer TF-101 running Megatron CM9 based ROM by ricardopvz.
I use WiFi Tether for Root that is no longer beta and available on the market so I have the newest version. My WiFi tether set up options that are pertinent to this post are as follows:
1. Change Device Profile
a. Samsung Galaxy Nexus (CDMA/LTE)
2. Change Setup Method
a. Netd (master)
3. Change LAN
a. 192.168.1.0/24
4. Routing Fix
a. Routing fix is NOT enabled
5. Default DNS settings
I have no issues tethering, it works very well, very fast. I can ping by hostname from each device while tethered. I have set both device name entries in the host file.
My issue while tethering: When I run netstat on the Transformer, I can see that wlan0 is listening on port 139(NetBIOS) and 445(SMB). However, when I netstat on the Fascinate, it is NOT listening to either of these ports. I use the Samba app available from the market and have configured all the appropriate settings for both devices.
Using the ip route command, I can see that both devices show appropriate routing on 192.168.1.x to the appropriate adapter (wlan0).
Why won't the Fascinate listen for the two ports when the adapter (wlan0) appears to be working fine, routing is good, pinging by NetBIOS name from the hosts file, and Samba is broadcasting NetBIOS and SMB?
My purpose for this post and the questions is to be able to perform wireless syncing between the two devices and a computer for various directories like Pictures and Documents. I want all three devices to be the same. If I go home and connect to WiFi the IP addresses will change and I will constantly have to adjust settings. I'm looking for a seamless option because I use tether almost as much as I use home WiFi.
I figured it out. WiFi Tether app creates a rule with iptables called wireless-tether. It's regenerated each time the app starts by using the tether.edify file in the app's data directory. If you edit the firewall rule it will default back after the app starts again. I have emailed the dev to see if they can allow some user options so the traffic can pass internally such as netbios and samba.
The default linux rules allow all traffic which is why netstat on the tablet passes netbios and smb. The tablet is connecting wirelessly with no changes to iptables.
Also, standard home wifi on the phone would also pass the traffic because no additional rules to the iptables are being made.