Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP mkasick

22nd February 2011, 09:54 PM   |  #1  
OP Recognized Developer
Thanks Meter: 830
 
470 posts
Join Date:Joined: Aug 2009
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
Last edited by mkasick; 3rd March 2011 at 11:38 PM. Reason: Added RNDIS/ADB kernel bug fix patch.
The Following 14 Users Say Thank You to mkasick For This Useful Post: [ View ]
23rd February 2011, 01:44 AM   |  #2  
k0nane's Avatar
Recognized Developer
Flag 127.0.0.1
Thanks Meter: 3,768
 
3,981 posts
Join Date:Joined: Feb 2008
More
EXCELLENT. Thank you!

ACS's kernel team will be working on a fix for the bug.
23rd February 2011, 03:57 AM   |  #3  
Senior Member
Thanks Meter: 5
 
178 posts
Join Date:Joined: Jul 2010
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
23rd February 2011, 05:56 AM   |  #4  
OP Recognized Developer
Thanks Meter: 830
 
470 posts
Join Date:Joined: Aug 2009
Quote:
Originally Posted by tommi_han

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?
23rd February 2011, 02:18 PM   |  #5  
Senior Member
Atlanta
Thanks Meter: 5
 
149 posts
Join Date:Joined: May 2007
Thanks so much for making this! Works beautifully for me on stock deodexed eb13.

Sent from my SPH-D700 using XDA App
23rd February 2011, 04:02 PM   |  #6  
Senior Member
Thanks Meter: 70
 
175 posts
Join Date:Joined: Nov 2008
More
Quote:
Originally Posted by mkasick

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
23rd February 2011, 06:01 PM   |  #7  
Senior Member
Thanks Meter: 5
 
178 posts
Join Date:Joined: Jul 2010
Looks like got to go to eb13
23rd February 2011, 08:15 PM   |  #8  
Senior Member
Thanks Meter: 172
 
1,609 posts
Join Date:Joined: Aug 2010
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
23rd February 2011, 08:18 PM   |  #9  
Senior Member
Thanks Meter: 172
 
1,609 posts
Join Date:Joined: Aug 2010
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
23rd February 2011, 08:25 PM   |  #10  
Senior Member
Thanks Meter: 71
 
228 posts
Join Date:Joined: Sep 2010
Quote:
Originally Posted by A_Flying_Fox

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.

Quote:
Originally Posted by A_Flying_Fox

Also stock eb13 should be good right?

Yes, it works fine with stock EB13

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

Advanced Search
Display Modes