linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Bernd Krumboeck <krumboeck@universalnet.at>,
	Kurt Van Dijck <kurt.van.dijck@eia.be>,
	Stephane Grosjean <s.grosjean@peak-system.com>
Cc: linux-can@vger.kernel.org
Subject: USB CAN Scripts - was Re: usb_8dev: USB Protocoll available?
Date: Sun, 16 Dec 2012 17:54:00 +0100	[thread overview]
Message-ID: <50CDFCA8.6000409@hartkopp.net> (raw)
In-Reply-To: <50CC2226.10107@universalnet.at>

Hello Bernd,

thanks for sending the [v9] version of the 8devices USB2CAN.

I'm looking forward to get my own devices (hopefully) the next days to test
your driver too. When it's applied to Daves net-next we have additional two
month to test ;-)

Btw. you mentioned the need for some scripting support ...

To me the problem is when attaching some USB CAN adapter the enumeration of
these adapters is arbitrarily.

E.g. if i wanted to set the bitrate according to the specific adapter, i need
some kind of reference, let's say a unique device identifier.

When i would be able to identify the USB CAN adapters device ID i could add
some udev scripts to set the bitrate - even if i change the plug-in order.

The PEAK USB adapters have this info:

peak_usb 2-1.3:1.0: PEAK-System PCAN-USB adapter hwrev 28 serial FFFFFFFF (1 channel)
peak_usb 2-1.3:1.0 can2: attached to PCAN-USB channel 0 (device 67)

This device number "67" can be set by the user to identify the adapter.

In your mail ...

On 15.12.2012 08:09, Bernd Krumboeck wrote:
> Maybe this will help you (lsusb -v):

> 
> Bus 006 Device 006: ID 0483:1234 SGS Thomson Microelectronics
> Device Descriptor:


(..)

>   iManufacturer           1 edevices
>   iProduct                2 USB2CAN converter
>   iSerial                 3 ED000202


(..)

... there's a serial number "ED000202" available.

Maybe we should discuss about having that kind of unique identifier available
in the sysfs (as we do not have a MAC address like USB ethernet adapters) for
udev scripts as discussed above.

I wonder if we could/should re-use the already existing

	/sys/class/net/canX/addr
	/sys/class/net/canX/addr_len

for this purpose ?!?

Regards,
Oliver

  reply	other threads:[~2012-12-16 16:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14 16:52 usb_8dev: USB Protocoll available? Uwe Bonnes
2012-12-14 18:33 ` Marc Kleine-Budde
2012-12-14 19:25 ` Bernd Krumboeck
2012-12-15  6:31 ` Bernd Krumboeck
2012-12-15  7:09 ` Bernd Krumboeck
2012-12-16 16:54   ` Oliver Hartkopp [this message]
2012-12-16 17:17     ` USB CAN Scripts - was " Uwe Bonnes
2012-12-17  8:06     ` Bernd Krumboeck

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=50CDFCA8.6000409@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=krumboeck@universalnet.at \
    --cc=kurt.van.dijck@eia.be \
    --cc=linux-can@vger.kernel.org \
    --cc=s.grosjean@peak-system.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).