Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: USB networking (cdce) with Linux host (g_ether)



Hi,

From: Christof Meerwald <cmeerw%cmeerw.org@localhost>, Date: Sat, 4 Apr 2015 08:42:23 +0200

> On Sat, Apr 04, 2015 at 08:50:01AM +0900, Ryo ONODERA wrote:
>> Please remove cdce(4) and umodem(4) entries from your kernel configuration
>> file (your device should be recognized as ugen(4)) and run
>> $ gcc -o probe_usb probe_usb.c
>> # ./probe_usb /dev/ugen0.00
> 
> # ./probe_usb /dev/ugen0.00
> length: 9
> descriptor type: 2
> total length: 2147470578
> num interface: 2
> config value: 2
> configuration: 0
> Attributes: (0xc0) Self powered 
> max power: 500 mA
> 
> Interface 0:
>   Length: 9
>   Descriptor Type: 4
>   Interface No: 0
>   Alt Setting: 0
>   Num Endpoints: 1
>   Interface Class: 2
>   Interface SubClass: 2

Your cdce(4) has Interface Class Subclass = 2.
According to table 16 of
http://cscott.net/usb_dev/data/devclass/usbcdc11.pdf
Universal Serial Bus Class Definitions for Communication Devices Version 1.1,
02h is assigned to Abstract Control Model.
As far as I understand correctly, Abstract Control Model is used for
RS-232C emulation devices, for example USB modem.

Adding vendor ID/product ID to cdce_devs[] in if_cdce.c
may help you.

>   Interface Protocol: 255
>   Interface: 4
>   Endpoint 0:
>     Length: 7
>     Length: 5
>     Length: (0x82) 2 (in)
>     Attributes: (0x3) interrupt 
>     Max Packet Size: 2147470544
>     Interval: 9
> 
> Interface 1:
>   Length: 9
>   Descriptor Type: 4
>   Interface No: 1
>   Alt Setting: 0
>   Num Endpoints: 2
>   Interface Class: 10
>   Interface SubClass: 0
>   Interface Protocol: 0
>   Interface: 5
>   Endpoint 0:
>     Length: 7
>     Length: 5
>     Length: (0x81) 1 (in)
>     Attributes: (0x2) bulk 
>     Max Packet Size: 2147470544
>     Interval: 0
>   Endpoint 1:
>     Length: 7
>     Length: 5
>     Length: (0x1) 1 (out)
>     Attributes: (0x2) bulk 
>     Max Packet Size: 2147470544
>     Interval: 0
> 
> 
> Christof
> 
> -- 
> 
> http://cmeerw.org                              sip:cmeerw at cmeerw.org
> mailto:cmeerw at cmeerw.org                   xmpp:cmeerw at cmeerw.org

--
Ryo ONODERA // ryo_on%yk.rim.or.jp@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Home | Main Index | Thread Index | Old Index