On 05/04/11 03:05, Stuart Henderson wrote:
On 2011-05-03, Markus Bergkvist<markus.bergkv...@telia.com>  wrote:
On 05/03/11 22:13, Stuart Henderson wrote:
vovka<net.vlad<at>   gmail.com>   writes:
On Sat, Apr 30, 2011 at 18:08, Erik Mugele<ejm<at>   teuton.org>   wrote:
The following patch against -current enables the Samsung Galaxy S
Android device (Samsung Captivate with AT&T) to be be used for USB
tethering.
       Erik, great work and great patch... I, too, have a Samsung Galaxy S.
Your patch did not apply correctly, so here is my version of it.I've also
attached a diff of "usbdevs.h" .

Please pkg_add usbutil, then identify the relevant /dev/usbX controller
device (from "usbdevs -v" output), run "usbctl -f /dev/usbX", and include
the output. If other people with different Android phones that support
this mode of tethering could do the same, we may be able to identify
a suitable class id we can match on instead.



Is this sufficient?

hmm, not sure.. from what I was reading there should be some
communications device class interface showing up and here's there's
just mass-storage. is there some different mode you need to select
on the phone to use tethering? (I haven't used any android phone).


Yes, of course. Not paying attention.
Here is a "usbctl -a 4 -f /dev/usb0" output with USB tethering enabled on the phone.

$ usbctl -a 4 -f /dev/usb0
DEVICE addr 4
DEVICE descriptor:
bLength=18 bDescriptorType=device(1) bcdUSB=2.00 bDeviceClass=2 bDeviceSubClass=0 bDeviceProtocol=0 bMaxPacketSize=64 idVendor=0x04e8 idProduct=0x6881 bcdDevice=400 iManufacturer=1(SAMSUNG) iProduct=2(SAMSUNG_Android) iSerialNumber=3(3534EF18B9C900EC) bNumConfigurations=1

CONFIGURATION descriptor 0:
bLength=9 bDescriptorType=config(2) wTotalLength=75 bNumInterface=2
bConfigurationValue=1 iConfiguration=0() bmAttributes=c0 bMaxPower=96 mA

Unknown descriptor (class 2/0):
bLength=8 bDescriptorType=11 ...

INTERFACE descriptor 0:
bLength=9 bDescriptorType=interface(4) bInterfaceNumber=0 bAlternateSetting=0
bNumEndpoints=1 bInterfaceClass=2 bInterfaceSubClass=2
bInterfaceProtocol=255 iInterface=8(RNDIS Communications Control)

CDC INTERFACE descriptor:
bLength=5 bDescriptorType=cs_interface(36) bDescriptorSubtype=header
bcdCDC=1.10

CDC INTERFACE descriptor:
bLength=5 bDescriptorType=cs_interface(36) bDescriptorSubtype=Call_Management
bmCapabilities=0x0 bDataInterface=1

CDC INTERFACE descriptor:
bLength=4 bDescriptorType=cs_interface(36) bDescriptorSubtype=Abstract_Control_Model
bmCapabilities=0x0

CDC INTERFACE descriptor:
bLength=5 bDescriptorType=cs_interface(36) bDescriptorSubtype=union
bMasterInterface=4 bSlaveInterface0=5

ENDPOINT descriptor:
bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=6-in
bmAttributes=interrupt wMaxPacketSize=8 bInterval=9

INTERFACE descriptor 1:
bLength=9 bDescriptorType=interface(4) bInterfaceNumber=1 bAlternateSetting=0
bNumEndpoints=2 bInterfaceClass=10 bInterfaceSubClass=0
bInterfaceProtocol=0 iInterface=9(RNDIS Ethernet Data)

ENDPOINT descriptor:
bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=11-in
bmAttributes=bulk wMaxPacketSize=512 bInterval=0

ENDPOINT descriptor:
bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=10-out
bmAttributes=bulk wMaxPacketSize=512 bInterval=0

current configuration 1

----------

Reply via email to