Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Android 2.2 USB Tethering Tips
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
comprookie2000
Retired Dev
Retired Dev


Joined: 25 Jul 2004
Posts: 925
Location: Sun City Center, Florida

PostPosted: Sun Aug 07, 2011 7:07 pm    Post subject: Reply with quote

EXPERIMENTAL - Prompt for development and/or incomplete code/drivers


grep CONFIG_EXPERIMENTAL .config
_________________
http://dev.gentoo.org/~dabbott/
Back to top
View user's profile Send private message
Martux
Veteran
Veteran


Joined: 04 Feb 2005
Posts: 1917

PostPosted: Mon Aug 08, 2011 10:25 pm    Post subject: Reply with quote

Wow, great! That was it. After activating it also the RNDIS_HOST option showed up.
Thanks a lot!
_________________
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Back to top
View user's profile Send private message
Dave Nielsen
n00b
n00b


Joined: 20 Aug 2011
Posts: 1

PostPosted: Sat Aug 20, 2011 4:01 am    Post subject: Reply with quote

Thanks a lot,... interesting!
Back to top
View user's profile Send private message
hujuice
Guru
Guru


Joined: 16 Oct 2007
Posts: 318
Location: Rome, Italy

PostPosted: Mon Oct 31, 2011 12:06 pm    Post subject: Reply with quote

For my experience (Android 2.2.1), it is possible to clean up a bit the needed kernel modules.

Code:
Device Drivers --->
    [*] Network device support --->
        USB Network Adapters --->
            [*] Multi-purpose USB Networking Framework
                <*> CDC Ethernet support
                <*> CDC EEM support
                <*> Simple USB Network Links (CDC Ethernet subset)
            [*] Embedded ARM Linux links

is enough for me.

As already said, CONFIG_USB_ACM and CONFIG_USB_WDM are NOT necessary.

Also, I DON'T need CONFIG_USB_NET_RNDIS_HOST.

Try yourself, but...
kernel comment to CONFIG_USB_NET_RNDIS_HOST wrote:
This option enables hosting "Remote NDIS" USB networking links,
as encouraged by Microsoft (instead of CDC Ethernet!) for use in
various devices that may only support this protocol. A variant
of this protocol (with even less public documentation) seems to
be at the root of Microsoft's "ActiveSync" too.

Avoid using this protocol unless you have no better options.
The protocol specification is incomplete, and is controlled by
(and for) Microsoft; it isn't an "Open" ecosystem or market.

http://en.wikipedia.org/wiki/USB_communications_device_class

I wonder if a Linux-to-Android system needs this.

Regards,
HUjuice
_________________
Who hasn't a spine, should have a method.
Chi non ha carattere, deve pur avere un metodo.
Back to top
View user's profile Send private message
comprookie2000
Retired Dev
Retired Dev


Joined: 25 Jul 2004
Posts: 925
Location: Sun City Center, Florida

PostPosted: Sun Nov 27, 2011 5:04 pm    Post subject: Reply with quote

I just tried it and for my Nexus One I needed "CONFIG_USB_NET_RNDIS_HOST"
We should put together a wiki entry;
http://wiki.gentoo.org/wiki/Main_Page
_________________
http://dev.gentoo.org/~dabbott/
Back to top
View user's profile Send private message
comprookie2000
Retired Dev
Retired Dev


Joined: 25 Jul 2004
Posts: 925
Location: Sun City Center, Florida

PostPosted: Sun Nov 27, 2011 10:37 pm    Post subject: Reply with quote

OK started the page.
https://wiki.gentoo.org/wiki/Android_USB_Tethering
_________________
http://dev.gentoo.org/~dabbott/
Back to top
View user's profile Send private message
hujuice
Guru
Guru


Joined: 16 Oct 2007
Posts: 318
Location: Rome, Italy

PostPosted: Mon Nov 28, 2011 2:20 pm    Post subject: Reply with quote

Ok, I added some more verbose informations to the wiki.
I mess it! I like it... 8)

Please, fix my English! :oops:

Since I use tethering to skip my evil work firewall, I added some trick to fine tuning the DHCP behaviour, to have mixed network configurations.

Regards,
HUjuice
_________________
Who hasn't a spine, should have a method.
Chi non ha carattere, deve pur avere un metodo.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Mon Nov 28, 2011 4:03 pm    Post subject: Reply with quote

i suppose i should set up a wiki account since i plan on adding stuff at some point

I'll be getting a Galaxy Nexus today, assuming the FedEx truck doesn't get lost. I assume the Nexus One steps should work for it too; I'll update the wiki if it works, unless of course I get lazy, then ill just post it here :lol:

I'm sure the wifi hotspot will work, but ive never tried via USB since wifi always worked.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
hujuice
Guru
Guru


Joined: 16 Oct 2007
Posts: 318
Location: Rome, Italy

PostPosted: Mon Nov 28, 2011 4:22 pm    Post subject: Reply with quote

For a laptop usage, I agree, the wifi solution is preferable.
More than one device can be connected while your mobile phone is lodging in your pocket.

As said, I find useful the wired (USB) solution when I need some extra configuration and/or on a desktop device (with no wifi).

Yes, you'll need an account for the wiki :)
Signing in is really quick.

Enjoy it :)
Hujuice
_________________
Who hasn't a spine, should have a method.
Chi non ha carattere, deve pur avere un metodo.
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Tue Nov 29, 2011 2:36 am    Post subject: Reply with quote

works just fine on the Galaxy Nexus

posting via USB tether

Code:

[10576.230731] usb 2-1: USB disconnect, device number 5
[10576.545706] usb 2-1: new high speed USB device number 6 using ehci_hcd
[10576.675388] usbcore: registered new interface driver cdc_ether
[10576.678039] rndis_host 2-1:1.0: usb0: register 'rndis_host' at usb-0000:00:1d.7-1, RNDIS device, 6e:ca:59:b7:5d:00
[10576.678204] usbcore: registered new interface driver rndis_host


Code:

usb0      Link encap:Ethernet  HWaddr 6e:ca:59:b7:5d:00 
          inet addr:192.168.42.201  Bcast:192.168.42.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:766 errors:4 dropped:6 overruns:0 frame:4
          TX packets:1161 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:126278 (123.3 KiB)  TX bytes:231561 (226.1 KiB)


was easy. modprobe usbnet, enable usb tether on the phone, dhcpcd usb0, and that's all she wrote.

EDIT: ok, I stopped being lazy, set up a wiki account, and updated it on the wiki. Works on ITL41D (Android 4.0.1), Samsung Galaxy Nexus.
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
kwispy
Tux's lil' helper
Tux's lil' helper


Joined: 10 Mar 2003
Posts: 82

PostPosted: Mon Feb 06, 2012 4:28 pm    Post subject: Reply with quote

stelth wrote:
Martux wrote:
Very nice, thanks. I also compiled everything into the kernel but usb0 isn't showing up.
Dmesg is not showing any switch when tethering is enabled.
Android 2.3.4 CM7 and gentoo-sources-2.6.39-r2 ~amd64 here.
Anything missing?


I had enabled all of the modules in the original post and couldn't get usb0 to show up either. I slimmed it down to just:
Code:
CONFIG_USB_USBNET=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_RNDIS_HOST=m

and it came right up.

They're the options under:
Code:
│     -> Device Drivers                                                           
│       -> Network device support (NETDEVICES [=y])
│         -> USB Network Adapters


EDIT:
If you get the choice on the phone for either Mac OSX or Windows tethering, choose Windows tethering.


This worked for me, after the original (first post) kernel config failed to bring up usb0. Didn't have to autoload modules.
Using: HTC Sensation (pyramid) with Android 2.3.4 rooted (Gingerbread)
Kernel: 2.6.30-gentoo-r7

If you use wicd like I do, just change the wired interface to usb0 instead of lan0.
Back to top
View user's profile Send private message
snakeo2
Veteran
Veteran


Joined: 01 Jan 2006
Posts: 1237

PostPosted: Wed Feb 22, 2012 1:21 pm    Post subject: Reply with quote

Hello,

I'm trying to get my htc evo 4g to work and also compiled "usbnet, cdcether & rndis_host" as modules but during boot up i get errors that modules cant be loaded. I added the modules to my /etc/conf.d/modules....did I miss something? Thanks in advance.
_________________
Gigabyte MA790X-UD4P Motherboard
AMD Phenom II X4 940 Black Edition
MSI ATI R4650 PCIe2
250GB SATA Drive
4GB Corsair DDR2
Back to top
View user's profile Send private message
Rolmo
n00b
n00b


Joined: 17 Mar 2012
Posts: 32
Location: Poland

PostPosted: Sun Jun 09, 2013 10:31 pm    Post subject: Reply with quote

stelth wrote:

I had enabled all of the modules in the original post and couldn't get usb0 to show up either. I slimmed it down to just:
Code:
CONFIG_USB_USBNET=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_RNDIS_HOST=m

and it came right up.


I had to set the same like you. Options from original post and Gentoo Wiki didn't work for me.
Back to top
View user's profile Send private message
logistiker
n00b
n00b


Joined: 16 Jun 2008
Posts: 41

PostPosted: Fri Jul 12, 2013 1:43 pm    Post subject: Did you enable usb gadget support with RNDIS support? Reply with quote

You might want to enable usb gadget support and related configs because these are the drivers that actually create the usb0 device.

CONFIG_USB_ETH
CONFIG_USB_ETH_RNDIS
CONFIG_USB_ETH_EEM
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum