[APP] Wired Tether v1.4-epic-4 (EB13 Froyo) (3/3/11)

Search This thread

mkasick

Retired Recognized Developer
Aug 10, 2009
470
830
3/3/11 Update: Added an optional kernel patch against EB13 to fix the RNDIS/ADB bug mentioned below. It's not necessary for the use of this app, it still works fine on EB13 stock.

Attached is a build of Wired Tether v1.4 modified to support RNDIS (USB tethering) on (EB13) Froyo Epics. Also attached are the source patches against the v1.4 sources.

This is an update of the previous Eclair version of Wired Tether, but since the kernel patch is no longer necessary in Froyo I've split this into a new thread.

And yes, Froyo does come with USB tethering out of the box. However, in EB13 many folks may find that with the built-in tethering they can only tether to wifi, and attempts to tether to 3G (and possibly 4G) results in error. This Wired Tether client avoids said "errors."

Directions:
  • (Windows only) Install the Samsung USB drivers. No other drivers are needed for Windows 7, and I think Windows XP SP3.
  • Make sure the USB cable is unplugged before starting the tether client.
  • Start "Wired Tether" and "Press to start tethering."
  • Grant the Superuser Request (if your su requires it).
  • Make sure tethering has started, you should see green/red "Down/Up" numbers at the bottom of the screen.
  • Attach the USB cable.
  • Select "Charging" mode from the "Select USB mode" menu.
  • Tether!

When finished:
  • Detach the USB cable.
  • "Press to stop tethering."
  • Grant the Superuser Request (if your su requires it).
  • Exit the "Wired Tether" program.
  • Reattach the USB cable if you want to use mass-storage.

Note, tethering should be used with "USB debugging" disabled. This is due to a bug in the Froyo (including EB13) kernel's USB gadget driver whereby if RNDIS is enabled "on top of" ADB mode (and subsequently disabled), when "USB debugging" is later turned off it reverts back to RNDIS mode instead of mass storage, whoops! If you get stuck in RNDIS mode, cycling Wired Tether once should fix it. Alternatively, if you always run with "USB debugging" enabled, this bug shouldn't matter. Keep in mind, neither mass-storage support nor ADB will be availble while actively tethering.

Troubleshooting:

If the client force closes on you and you're using a ROM with android-wifi-tether preinstalled, then there is a library conflict. Remove android-wifi-tether from /system, and most importantly, delete (or rename) /system/lib/libnativetask.so, then android-wired-tether should work. If you want both wifi & wired tether, reinstall android-wifi-tether from the market. This will make each application use its own library so there's no more conflicts. See this post for more details.

Technical details:

The Froyo kernel provides RNDIS support via a sysfs switch, much like the previous Eclair kernel patch. Samsung just happens to use a different name ("tethering" instead of "rndis_enable"). Oh, and they introduced a silly bug that results in weird behavior if you tether with "USB debugging" enabled--see above.

You may toggle this variable manually, for example, if you wanted to use the RNDIS interface for other purposes. Just be sure to toggle when the USB cable is unplugged:
Code:
su
echo -n 1 > /sys/devices/virtual/sec/switch/tethering # Enable RNDIS.
echo -n 0 > /sys/devices/virtual/sec/switch/tethering # Disable RNDIS, reenable UMS (or ADB).
The Wired Tether patch simply toggles the sysfs varible upon starting and stopping tethering.

Mirror links (does not require forum login):
wired-tether-1.4-epic-4.apk
wired-tether_use_stable_api.diff
wired-tether_clamp_mss.diff
wired-tether_rndis_enable.diff
epic_adb_vtp_fix-EB13.diff
 

Attachments

  • wired-tether-1.4-epic-4.apk
    269.3 KB · Views: 1,046
  • wired-tether_use_stable_api.diff.txt
    1.5 KB · Views: 121
  • wired-tether_clamp_mss.diff.txt
    2.4 KB · Views: 37
  • wired-tether_rndis_enable.diff.txt
    2.2 KB · Views: 73
  • epic_adb_vtp_fix-EB13.diff.txt
    2.4 KB · Views: 54
Last edited:

tommi_han

Senior Member
Jul 8, 2010
215
14
I couldn't get it to work. Said nor the right kernel for wired tether... using bosai 2.0. Usb debugging is off and no libnative.so conflict
 

mkasick

Retired Recognized Developer
Aug 10, 2009
470
830
I couldn't get it to work. Said nor the right kernel for wired tether... using bosai 2.0.
That uses the DK28 kernel right? Can you check if the file "/sys/devices/virtual/sec/switch/tethering" exists?

Hmm, I assumed EB13's tethering support was the same as DK28. But I see now the relevant source file was last modified on 11/27, perhaps some changes didn't make it into DK28. I never ran it myself, since it's useless to me without source.

Otherwise, try again when ROMs update to EB13 kernels?
 

MojoSwag

Senior Member
May 13, 2007
149
5
Atlanta
Thanks so much for making this! Works beautifully for me on stock deodexed eb13.

Sent from my SPH-D700 using XDA App
 

jaronow

Senior Member
Nov 14, 2008
175
69
That uses the DK28 kernel right? Can you check if the file "/sys/devices/virtual/sec/switch/tethering" exists?

Hmm, I assumed EB13's tethering support was the same as DK28. But I see now the relevant source file was last modified on 11/27, perhaps some changes didn't make it into DK28. I never ran it myself, since it's useless to me without source.

Otherwise, try again when ROMs update to EB13 kernels?

Yes, Bonsai 2.0 and 2.01 are both DK28 based so they probably wouldn't work with this unfortunately, but just wait a day or so and you should be seeing some bomb bonsai action :D
 

A_Flying_Fox

Senior Member
Aug 10, 2010
1,610
170
Ok so just to clarify...

I should uninstall wifitether and then install this and then reinstall wifi tether and they'll both work when I need em? Ofcourse I mean alternately...

And usb debugging should be off to avoid conflicts with adb

Got it

Sent from my SPH-D700 using XDA App
 

A_Flying_Fox

Senior Member
Aug 10, 2010
1,610
170
Also stock eb13 should be good right?

Sorry...I just feel like a giddy schoolgirl right now. I've been waiting for nexus one style tethering for a minute....everytime tethering was here there was always a catch...

Sent from my SPH-D700 using XDA App
 

Isira

Senior Member
Sep 27, 2010
304
106
Ok so just to clarify...

I should uninstall wifitether and then install this and then reinstall wifi tether and they'll both work when I need em? Ofcourse I mean alternately...
Huh? I had Wifi Tether installed first and tested it, then installed Wired Tether and tested it, and then tested Wifi tethering again and it works just fine.

Also stock eb13 should be good right?

Yes, it works fine with stock EB13
 

mkasick

Retired Recognized Developer
Aug 10, 2009
470
830
I should uninstall wifitether and then install this and then reinstall wifi tether and they'll both work when I need em?
There's no problem if you installed WiFi tether from the market or by downloading the apk. In either case, the libraries for the respecitve applications are segregated in their own /data/data subfolder and there will be no conflict.

The conflict issue might, and only, would arise if WiFi tether comes with the ROM you're using. At least, that was the case in Eclair days.

I should mention, if you have a previous version of Wired Tether installed, it must be removed completely before this version is installed, otherwise the helper binaries won't get updated. That's probably not an issue for most folks since previous versions didn't work in Froyo.
 

A_Flying_Fox

Senior Member
Aug 10, 2010
1,610
170
Thanks :D

I can't wait to test it out tomorrow on the laptop while on the road just to see if it'll work

Sent from my SPH-D700 using XDA App
 

Kryxx

New member
Feb 24, 2011
2
0
Registered just to thank you!

Thank you so much! I scoured the nets for a usb tether app. Google's didn't work, but your fix for epic worked perfectly. Wifi doesn't work with my work comp, so this is wonderful!

Installed on a EB13 fresh install. I just browsed to the url of the apk.


Thank you so much!
 

formula84

Senior Member
Aug 17, 2007
2,194
390
Philadelphia - HTC One (m7)
Just installed on a fresh EB13 flashed using EXE method... Works great, I am rooted. Tested on 4g and getting great speeds 3-5 down .5-1 up... tested on 3g and cant get speed test to run but it works okay.
 

smeyerhuky

Senior Member
Jan 26, 2009
115
11
Thank you, this was the only thing keeping me from dk28. And I have been too busy with school to do my own fix for eb13.

Sent from my SPH-D700 using XDA App
 

DeeODoubleD

Senior Member
Jan 17, 2011
261
15
mkasick, thank you so much!!! You are my hero. Mine kept randomly dropping and this seems to be more solid. It's working great!!!
 

DeeODoubleD

Senior Member
Jan 17, 2011
261
15
I cannot say enough about this... I can make/receive calls/texts without any connectivity problems. It's extremely fast!

I'm running Midnight ROM 4.0 EB13 with 0.2a Genocide (horrible name) and Nova's glass theme with AOSP lock and for the first time since I've had this phone I'm having no issues (only one minor thing gives me an FC, but it still works so it's a moot point)

I get a steady 1700+ on quadrant and can download up to 1.2 megs per second on 4G if the server allows it.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    3/3/11 Update: Added an optional kernel patch against EB13 to fix the RNDIS/ADB bug mentioned below. It's not necessary for the use of this app, it still works fine on EB13 stock.

    Attached is a build of Wired Tether v1.4 modified to support RNDIS (USB tethering) on (EB13) Froyo Epics. Also attached are the source patches against the v1.4 sources.

    This is an update of the previous Eclair version of Wired Tether, but since the kernel patch is no longer necessary in Froyo I've split this into a new thread.

    And yes, Froyo does come with USB tethering out of the box. However, in EB13 many folks may find that with the built-in tethering they can only tether to wifi, and attempts to tether to 3G (and possibly 4G) results in error. This Wired Tether client avoids said "errors."

    Directions:
    • (Windows only) Install the Samsung USB drivers. No other drivers are needed for Windows 7, and I think Windows XP SP3.
    • Make sure the USB cable is unplugged before starting the tether client.
    • Start "Wired Tether" and "Press to start tethering."
    • Grant the Superuser Request (if your su requires it).
    • Make sure tethering has started, you should see green/red "Down/Up" numbers at the bottom of the screen.
    • Attach the USB cable.
    • Select "Charging" mode from the "Select USB mode" menu.
    • Tether!

    When finished:
    • Detach the USB cable.
    • "Press to stop tethering."
    • Grant the Superuser Request (if your su requires it).
    • Exit the "Wired Tether" program.
    • Reattach the USB cable if you want to use mass-storage.

    Note, tethering should be used with "USB debugging" disabled. This is due to a bug in the Froyo (including EB13) kernel's USB gadget driver whereby if RNDIS is enabled "on top of" ADB mode (and subsequently disabled), when "USB debugging" is later turned off it reverts back to RNDIS mode instead of mass storage, whoops! If you get stuck in RNDIS mode, cycling Wired Tether once should fix it. Alternatively, if you always run with "USB debugging" enabled, this bug shouldn't matter. Keep in mind, neither mass-storage support nor ADB will be availble while actively tethering.

    Troubleshooting:

    If the client force closes on you and you're using a ROM with android-wifi-tether preinstalled, then there is a library conflict. Remove android-wifi-tether from /system, and most importantly, delete (or rename) /system/lib/libnativetask.so, then android-wired-tether should work. If you want both wifi & wired tether, reinstall android-wifi-tether from the market. This will make each application use its own library so there's no more conflicts. See this post for more details.

    Technical details:

    The Froyo kernel provides RNDIS support via a sysfs switch, much like the previous Eclair kernel patch. Samsung just happens to use a different name ("tethering" instead of "rndis_enable"). Oh, and they introduced a silly bug that results in weird behavior if you tether with "USB debugging" enabled--see above.

    You may toggle this variable manually, for example, if you wanted to use the RNDIS interface for other purposes. Just be sure to toggle when the USB cable is unplugged:
    Code:
    su
    echo -n 1 > /sys/devices/virtual/sec/switch/tethering # Enable RNDIS.
    echo -n 0 > /sys/devices/virtual/sec/switch/tethering # Disable RNDIS, reenable UMS (or ADB).
    The Wired Tether patch simply toggles the sysfs varible upon starting and stopping tethering.

    Mirror links (does not require forum login):
    wired-tether-1.4-epic-4.apk
    wired-tether_use_stable_api.diff
    wired-tether_clamp_mss.diff
    wired-tether_rndis_enable.diff
    epic_adb_vtp_fix-EB13.diff