Open GoogleCodeExporter opened 9 years ago
It is working for me.
I would encourage you to look at the script I attached. If other vendors change
the interface and routing table in the future I think the script I submitted
will be easier for you to maintain for those changes. It uses a case statement
which determines the up mobile interface and sets a variable for the routing
table and a variable for the interface base name. The rest of the ip commands
then use those variables.
Original comment by sedlme...@gmail.com
on 19 Aug 2011 at 9:38
Not suggesting you modify it without testing. After all it has only been tested
on one phone right now. Just trying to provide something which I thought might
be helpful.
I used the /system/bin/sh shell when doing my testing to make sure I wasn't
using any features provided by the busybox shell. Of course the Android shell
could have been updated in later release than you have to support. This is the
first and only android phone I have.
Original comment by sedlme...@gmail.com
on 19 Aug 2011 at 9:46
@sedlme: I would love to use your script - It's of course much nicer than the
original one. The script comes from old "HTC hero"-times and I know that the
"redirect of output" was needed for some shell-implementations. I don't want to
break it on other phones ... no idea if I should take the risk (more than 200
device/android-combinations out there). Thanks for the excellent help.
Something else to test. What happens if you deactivate 4G during tethering?
Does it still work on 3G? What if you active 4G again?
Original comment by harald....@gmail.com
on 19 Aug 2011 at 9:59
Using the latest beta4 on an Evo 3D running 2.3.4: I tried activating and
deactivating 4G multiple times while tethering (thus switching between 4G and
3G), and my computer kept its connection to the internet through the whole
process (of course with changing connection speeds). I also tried and
successfully connected a Macbook Pro and an iPod Touch. So beta4 appears to be
working great on an Evo 3D with the latest 2.3.4 update. Thanks again...
Original comment by gageorga...@gmail.com
on 20 Aug 2011 at 6:01
Ok. Like sedlme suggested I've updated the script. (Thanks again).
Could you guys test this script? I think sedlme would know how to do that - so
it would be great if you could give it a shot. (Please also check if switching
between 4G and 3G works).
Thanks!
Original comment by harald....@gmail.com
on 20 Aug 2011 at 8:29
Attachments:
I put the script in place and 3G is working for me. Unfortunately I'm not in an
area where I can get 4G signal at the moment and probably won't be until
tomorrow. From looking at the script it certainly looks like it should work
going between the two.
I wonder if there is a way to use netfilter to redirect the packets to fix this
instead of applying routes to the routing table. This would make the whole
script and possibly the need for a separate fix routing option unnecessary. I'm
going to look into this. It may go nowhere but it is worth looking into.
Original comment by sedlme...@gmail.com
on 20 Aug 2011 at 9:11
I tried putting the fixroute.sh and tether.edify files into the
/data/data/com.googlecode.android.wifi.tether/conf/ folder with the beta4 on my
Evo 3D with the newest software. I do not have 4G service here, but I am
unable to access to any internet sites, not even google owned ones. I tried
changing my DNS gateways. I am rooted on a slightly customized ROM. I am on
Android 2.3.4 and when I connect my PC, I get "No Internet Access".
Original comment by james.wa...@gmail.com
on 20 Aug 2011 at 11:34
When you copied the files did you change their permissions and ownership to
match the old files?
Original comment by sedlme...@gmail.com
on 20 Aug 2011 at 11:51
Also fixroute.sh should go in the bin and not conf directory.
Original comment by sedlme...@gmail.com
on 20 Aug 2011 at 11:53
I just did a chmod 777 to both files and put the fixroute.sh into the bin
folder, now it is telling me it can't change permissions of the file when I go
to start my tether. What permissions does it need?
Original comment by james.wa...@gmail.com
on 21 Aug 2011 at 12:03
fixroute.sh should be 755 and teether.edify is 600 but you also need to change
the owner to the same as the rest of the files. The owner name will be app_xxx.
With the xxx being specific to your phone.
Original comment by sedlme...@gmail.com
on 21 Aug 2011 at 12:08
Well, interestingly enough, I went to uninstall the app to have a fresh install
to work with and to see owners and such, and when I re-installed it, it worked
like a champ! Thanks for the help and quick replies!
Original comment by james.wa...@gmail.com
on 21 Aug 2011 at 12:19
Ok, I figured out how to implement the routing fix without needing to run the
fixroute.sh script. Attached is a copy of tether.edify with my changes.
Instead of using the script it the "/system/ip" command to add a route rule. A
route rule controls the order in which the differing routing tables are
evaluated to make a routing decision. The ip rule put in place has a lower
priority value (which means it runs sooner) than the rule for the gprs or wimax
table. In fact I don't specify a priority which means the kernel will assign a
priority to the rule. The kernel does this by assigning it to the priority
lower than any of the existing routing rules, so it will always be lower than
any routing table assigned to the mobile interface.
The rule put in place directs traffic destined to the LAN network to the main
routing table. Since the main routing table has a route to the network we are
golden. During shutdown the ip rule is removed.
With this solution it doesn't matter what routing table or interface name the
mobile interface uses. In the tether.edify I kept this as only being
implemented if Routing fix is select but this is vendor independent, uses
standard linux kernel features, and should should be able to be impacted on any
platform without detrimental impact. After enough testing you may be able to
make this a standard part of the tether startup process and get ride of the
Routing fix option.
Original comment by sedlme...@gmail.com
on 21 Aug 2011 at 12:29
Attachments:
@sedlme: Oh yeah. This is nice! I will put something together for testing ...
Original comment by harald....@gmail.com
on 21 Aug 2011 at 10:35
FYI My 3G and 4G tether didn't work until I loaded beta4 and then replaced the
tether.edify.
I got the file from Comment 63
Original comment by NiPs...@gmail.com
on 22 Aug 2011 at 12:56
Out of curiosity I fired up the sprint hotspot software to see how they handle
the routing issue. Turns out they add a route rule.
Original comment by sedlme...@gmail.com
on 22 Aug 2011 at 1:26
Ok. Here we go ... beta5. Includes now the modified tether.edify. Thanks to
sedlme.
http://android-wifi-tether.googlecode.com/files/wifi_tether_v3_1-beta5.apk
Original comment by harald....@gmail.com
on 22 Aug 2011 at 7:56
Routing Fix doesn't work on Evo 4g on Sense Rom on beta5. Although I know that
isn't the target audience. It works fine without it so not a big deal but needs
more work before it can become mainstream. Error message just says Failed when
trying to enable the routing fix. I have MSS clamping checked. Seems like I'm
still NOT getting full speed though. Here to hoping the routing fix from what I
understand can also fix this problem. Some have found the solution to running a
proxy on your phone. So it seems like a routing issue if we can get the packets
to be treated just like the ones coming from the phone naturally. It will go a
long way to fixing this problem.
Original comment by NickDoll...@gmail.com
on 23 Aug 2011 at 12:12
If you can launch Wifi Tether and then go into a terminal emulater or adb shell
to your phone and run the following commands and provide the output where
indicated.
su
/system/bin/ip rule list (provide the output)
/system/bin/ip rule add to 192.168.2.0/24 lookup main (should complete with no
output)
/system/bin/ip rule list (provide the output)
/system/bin/ip rule del to 192.168.2.0/24 lookup main (should complete with no
output)
Original comment by sedlme...@gmail.com
on 23 Aug 2011 at 3:27
[deleted comment]
[deleted comment]
[deleted comment]
I suspect the issue has something to do with this line:
getcfg("tether.fix.route") == "true" && (
log(run_program("/system/bin/ip rule add to "+ getcfg("ip.network") +"/24 lookup main"), "Enabling Routing fix");
);
I tried running it manually in terminal (ip rule add to 192.168.2.0/24 lookup
main) and I'm getting a RTNETLINK answers: Address family not supported by
protocol
Gonna tinker with it a bit more.
Here you go:
export PATH=/data/local/bin:$PATH
# export PATH=/data/local/bin:$PATH
# ip rule list
# ip rule add to 192.168.2.0/24 lookup main
RTNETLINK answers: Address family not supported by protocol
# ip rule list
# ip rule del to 192.168.2.0/24 lookup main
RTNETLINK answers: Address family not supported by protocol
#
only ip command that is giving me any useful input is "ip route list"
# ip route list
10.42.29.46 dev wimax0 scope link src 107.58.250.65
192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.254
default via 10.42.29.46 dev wimax0
Gonna try flashing a few different rom see if it that may be the problem.
Original comment by NickDoll...@gmail.com
on 23 Aug 2011 at 4:21
Are you running a stock kernel? If not, please try with a stock kernel.
Original comment by sedlme...@gmail.com
on 23 Aug 2011 at 4:26
That was my first question as well. I flashed the HTC stock kernel(4.24.651.1)
as well and made no difference. I'm gonna test it for AOSP next.
Original comment by NickDoll...@gmail.com
on 23 Aug 2011 at 4:30
I found a minor issue while using Beta5.
regarding 3G - 4G switching...
If I am on 3g, with the 4g radio off. I turn on 4g, as soon as the 4g connects
the connected PC no longer gets to the internet. I can then turn off 4g and
once my 3g is active the PC can surf. It's repeatable.
However if I start with 4G on and connected, then turn the tether on. My PC can
connect normally no what I do. Meaning I can turn 4g off and use 3g on the PC.
As long as the 4G is started first before the tether I can turn 4g off and
switch back to 3g and surf without restarting the tether. If I want 4g again, I
can just turn it on with no change to tether and the PC gets the 4g internet.
I was able to reproduce these consistently over a few tests. I believe this to
mean that the 4g radio adds a route rule when it's turned on. It might be
possible to force a rule with a different priority to always work.
Anyway just food for thought. Great work on this tool.
Original comment by NiPs...@gmail.com
on 25 Aug 2011 at 10:09
Ok, here is an updated tether.edify. It sets a fixed priority for the rule. I
have used priority 50. Also this version calls "/system/ip route flush cache"
after setting and deleting the rule. This is required to ensure the rule change
takes affect immediately.
Original comment by sedlme...@gmail.com
on 25 Aug 2011 at 9:15
Attachments:
Thanks for giving out that update. I am having trouble with it (tether not
starting, errors on start and stop). I didn't get much time to test. I will do
more testing after I sleep.
Original comment by NiPs...@gmail.com
on 26 Aug 2011 at 1:20
Everyone, so I just wanted to share one experience for me regarding this issue.
First off I have two devices, one Droid Pro Froyo and a Droid X I had just
recently brought up to Gingerbread 4.5.602.
While I was in Wisconsin both my devices (Droid X prior to OTA upgrade) wifi
tether worked perfect. I got on a plane, hopped a state and while in Minnesota
on a lay over BOTH devices wouldn't let me onto the regular web. Droid Pro
wouldn't let me touch anything but google sites and the Droid X took me
straight to a verizon site which told me about how much it would cost to enable
wifi tethering.
Alas, I am back home this morning in SF California and low and behold BOTH
devices Wifi tethering is back to working as expected.
WTH? I am 15 years professional in Networks and Systems and this just plain
doesn't computer for me at all. NONE of the fixes in this list applied while I
was in MN and were all removed prior from trying this morning back at home.
Thank everyone for your input though, I am glad I was able to find this thread
because it at least was on google and gave me something to do while on layover.
Original comment by dycro...@gmail.com
on 26 Aug 2011 at 3:30
@dycrp...: The droidx is complete different story. Check:
https://groups.google.com/group/android-wifi-tether/browse_thread/thread/94da912
189d6b427
Ok. Will put a new beta together now with sedme's changes.
Original comment by harald....@gmail.com
on 26 Aug 2011 at 9:20
Beta6 is here:
http://android-wifi-tether.googlecode.com/files/wifi_tether_v3_1-beta6.apk
Original comment by harald....@gmail.com
on 26 Aug 2011 at 9:28
I'm getting errors starting tethering on b6. When I go to open the log it is
empty.
Original comment by sedlme...@gmail.com
on 26 Aug 2011 at 9:42
Mmmh. Let me check.
Original comment by harald....@gmail.com
on 26 Aug 2011 at 9:47
Ok. Hopefully now:
http://android-wifi-tether.googlecode.com/files/wifi_tether_v3_1-beta6.apk
Original comment by harald....@gmail.com
on 26 Aug 2011 at 10:10
The last one still has problems but it is my fault. Left out a couple of ")"
and miss typed the path to the ip command used during startup. Got it right on
shutdown. Anyways here is a new tether.edify that should actually work. It
works for me with this one.
Original comment by sedlme...@gmail.com
on 26 Aug 2011 at 10:20
Oops attached wrong file. Here is the correct one.
Original comment by sedlme...@gmail.com
on 26 Aug 2011 at 10:25
Attachments:
I just downloaded beta 6 and test I see no 3g /4g transition issues. I did a
complete uninstall and installed only beta 6. So I assume sedlme's changes have
been updated into this beta. If not idk what's going on, lol.
Original comment by NiPs...@gmail.com
on 27 Aug 2011 at 12:23
Yes, I've re-uploaded beta6 yesterday. Should be fixed.
Original comment by harald....@gmail.com
on 27 Aug 2011 at 8:05
Just wanted to add that I rooted EVO 3d, downloaded the beta 6 and clicked on
MSS and routing fix and was able to surf different sites. Currently works like
a charm. Continue the good work.
Original comment by Bni...@gmail.com
on 1 Sep 2011 at 2:01
Hello
Hoping you guys are still checking this "thread". I, like many others I
suppose, cannot get full 4g speeds while tethering. I can get anywhere from 1.5
- 9mbps using my phone's "speedtest.net" app. On my laptop I get 300KBs on
average. I really think the answer lies in the "fix routing" option. Alas
whenever I check that box I get an error message that points me to the log,
which just say routing fix has failed.
I have tried putting tether.edify from comment 86 in the conf folder, changing
owners to match, and setting perms to 600 to no avail. Still same speeds.
If anyone has any insight on this, please do chime in, much appreciated, will
donate for all the hard work during your off time!
Original comment by fgonzale...@gmail.com
on 8 Nov 2011 at 9:11
If you needed fix routing you would know it because your throughput would be
zero. 300KBs is 2.4mbs which is not bad. Depending on your phone you may be
reaching the limit of the routing ability of your phone without tuning the
system specifically for routing and sacrificing performance as a general
platform.
Original comment by sedlme...@gmail.com
on 8 Nov 2011 at 11:39
I can actually confirm that on my Evo3D I also see about a speed drop of at
least 50% from wired tether. I was just so thrilled to have WiFi tether working
when you released Beta5 that I didn't bother mentioning it.
Original comment by zee...@gmail.com
on 9 Nov 2011 at 1:04
First of all, thank you for the reply, I really appreciate it. I must of used
the wrong capitalization. I'm sorry for any confusion I caused. Using
speedtest.net, earlier today at home, and now at work, my 4g speeds using my
phone are very fast. 2mbps and more. If I tether on my laptop, using
speedtest.net, they range anywhere from .35mbps to .70mbps (download). I've
heard of other people having similar issues over on XDA and they suggest a few
different things. I tried deleting a file they suggested (the name escapes me
now). I also tried using filterproxy, but nothing worked. A while back I've
managed to get full speeds using PDAnet and a USB cable but I really like WiFi
Tether and feel like sticking to it.
Any suggestions or recommendations? Perhaps I'll try the pre100 that was just
released.
EVO 4G / 003
Fresh Rom (4.54.651.1)
PS. Should I start another issue on this?
Original comment by fgonzale...@gmail.com
on 9 Nov 2011 at 6:00
Wireless Tether doesn't actually forward any traffic. It just configures the
builtin routing and nat capabilities of the Android linux kernel. This is
similar to how the Sprint Hotspot works. In fact at least on the Evo3D, Wifi
tether configures both to the same settings that the Sprint Hotspot application
does.
Because of this performance can be affected by any custom kernel or network
settings which are configured. It is possible a ROM developer implements tweaks
in either which helps general performance but which would be detrimental to
routing performance. Which ROM and/or kernel are you using?
Original comment by sedlme...@gmail.com
on 9 Nov 2011 at 11:32
Performance over with Wifi tether is likely to always be less than when using
usb tethering. Both the 4g radio and the Wifi device push a lot of complicated
functionality down to the kernel drivers. This puts a much heavier load on the
phone than when using the usb tethering solutions.
This is why you will notice the phone getting hot when using wifi tether versus
using usb tethering. That being said I will double check that everything is
running properly on Evo3D devices.
By the way this is not my software and I have no status on the project besides
being a user. I just helped address the issues on the Evo3D because I have one,
it originally didn't work on the platform and I have a network engineering
background which gives me the skills to help.
Original comment by sedlme...@gmail.com
on 9 Nov 2011 at 11:44
Well, you've done a fantastic job so far :) Thanks for your hard work.
As far as what you said about it always being slower, this is kind of what I
assumed and why I didn't bring it up myself. Anyway, my Evo3D is running Myn's
Warm TwoPointTwo at the moment, and I think that ROM uses a stock kernel but
I'm not sure. I was using Synergy before, and ViperRom before that. I've never
bothered changing the kernel and I've seen pretty much the same speeds on WiFi
Tether on all three ROMs.
Original comment by zee...@gmail.com
on 10 Nov 2011 at 2:01
I absolutely agree with the above poster. I've read your posts throughout and
you are always helpful.
Unfortunately I have an EVO 4G, not the 3D. I know of other EVO 4G owners (from
xda) who are getting full speeds, this is why I'm intrigued. I do have a custom
kernel, I'll try different one to see if it addresses the problem. I understand
now a bit more about how the program works, thanks to your explanation. I'll be
moving on now as I try different ROMs / Kernel combinations.
Original comment by fgonzale...@gmail.com
on 10 Nov 2011 at 2:22
I had the same problem as the original poster on my Sprint Evo 3D when
connected to 3G (not a problem on 4G). It was only fixed by enabling "MSS
clamping" and "Routing fix" after upgrading to beta 9.
Original comment by novasou...@gmail.com
on 27 Dec 2011 at 9:48
Original issue reported on code.google.com by
juanserg...@gmail.com
on 19 Jul 2011 at 10:25