From: Oliver Hartkopp <socketcan@hartkopp.net>
To: "Max S." <max@schneidersoft.net>, Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: usb-can device
Date: Wed, 29 Aug 2012 12:55:02 +0200 [thread overview]
Message-ID: <503DF506.5060204@hartkopp.net> (raw)
In-Reply-To: <1346164259.2466.7.camel@slaptop>
On 28.08.2012 16:30, Max S. wrote:
> I've been reading the USB CDC specification, but i have to admit, its
> all rather dry material.
>
Hm - yes. You are right ... i've looked myself. It's not very intuitive %-)
> I'm feeling a little lost developing on both sides of the puzzle. Can
> you provide me with a kind of lsusb printout of what the usb device is
> supposed to look like?
>
> what I've got right now is a CDC virtual com example, figured i could
> modify it.
Better try to follow examples from cdc_ether, like this one:
https://bbs.archlinux.org/viewtopic.php?id=144056
Btw. a cdc_can driver would be located in linux/drivers/net/usb.
I would suggest to look into cdc-phonet.c and cdc_ncm.c which are doing
similar things as we need, e.g. PF_PHONET -> cdc-phonet => PF_CAN -> cdc_can
Regards,
Oliver
>
> Device Descriptor:
> bLength 18
> bDescriptorType 1
> bcdUSB 2.00
> bDeviceClass 2 Communications
> bDeviceSubClass 0
> bDeviceProtocol 0
> bMaxPacketSize0 64
> idVendor 0x03eb Atmel Corp.
> idProduct 0x2404
> bcdDevice 1.00
> iManufacturer 1 ATMEL ASF
> iProduct 2 CDC Virtual Com
> iSerial 0
> bNumConfigurations 1
> Configuration Descriptor:
> bLength 9
> bDescriptorType 2
> wTotalLength 67
> bNumInterfaces 2
> bConfigurationValue 1
> iConfiguration 0
> bmAttributes 0xc0
> Self Powered
> MaxPower 100mA
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 0
> bAlternateSetting 0
> bNumEndpoints 1
> bInterfaceClass 2 Communications
> bInterfaceSubClass 2 Abstract (modem)
> bInterfaceProtocol 1 AT-commands (v.25ter)
> iInterface 0
> CDC Header:
> bcdCDC 1.10
> CDC ACM:
> bmCapabilities 0x02
> line coding and serial state
> CDC Union:
> bMasterInterface 0
> bSlaveInterface 1
> CDC Call Management:
> bmCapabilities 0x03
> call management
> use DataInterface
> bDataInterface 1
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x83 EP 3 IN
> bmAttributes 3
> Transfer Type Interrupt
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 16
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 1
> bAlternateSetting 0
> bNumEndpoints 2
> bInterfaceClass 10 CDC Data
> bInterfaceSubClass 0 Unused
> bInterfaceProtocol 0
> iInterface 0
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x81 EP 1 IN
> bmAttributes 2
> Transfer Type Bulk
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 0
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x02 EP 2 OUT
> bmAttributes 2
> Transfer Type Bulk
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 0
> Device Status: 0x0001
> Self Powered
>
> Max S.
>
next prev parent reply other threads:[~2012-08-29 10:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-26 15:52 usb-can device Max S.
2012-08-26 16:28 ` Marc Kleine-Budde
2012-08-27 6:20 ` Oliver Hartkopp
[not found] ` <20120827081028.GA417@vandijck-laurijssen.be>
2012-08-27 9:05 ` Marc Kleine-Budde
[not found] ` <1346071259.3928.33.camel@slaptop>
2012-08-28 11:58 ` Oliver Hartkopp
2012-08-28 12:13 ` Marc Kleine-Budde
2012-08-28 12:18 ` Oliver Hartkopp
2012-08-28 12:20 ` Marc Kleine-Budde
2012-08-28 14:30 ` Max S.
2012-08-29 10:55 ` Oliver Hartkopp [this message]
2012-08-28 23:34 ` Fabio Baltieri
2012-08-29 11:02 ` Oliver Hartkopp
2012-09-09 13:41 ` Pavel Pisa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=503DF506.5060204@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=max@schneidersoft.net \
--cc=mkl@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.