From: Marc Kleine-Budde <mkl@pengutronix.de>
To: max <max.jacob@alternalab.it>, linux-can@vger.kernel.org
Subject: Re: kvaser leaf and SocketCAN
Date: Wed, 22 Apr 2015 10:03:52 +0200 [thread overview]
Message-ID: <553755E8.20704@pengutronix.de> (raw)
In-Reply-To: <loom.20150422T090300-352@post.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2825 bytes --]
On 04/22/2015 09:31 AM, max wrote:
> I'm trying to connect to a Kvaser Leaf Light V2 (product_id=15) adapter on
> linux from python3.4, and for that purpose I've planned to use SocketCAN.
>
> I have downloaded and compiled the kvaser drivers v.5.9, my kernel is a
> 3.13.0-49-generic, and according to the information I've fund so far, the
> system requirements should all be met.
Where do you download the driver from? I suggest to use a recent
mainline kernel. Support for the Kvaser Leaf v2 was added in v3.16 and a
_lot_ of bugfixes were added in later versions. Switching to a recent
ubuntu kernel (v3.19) is probably a good idea.
> And in fact, when I connect the adapter, the leaf kernel module is
> correctly loaded (I see it in lsmod) and the /usr/sbin/leaf.sh is started
> (I desume this from the fact that if I try to start it manually it tells me
> it has already been started), and also the /dev/leaf0 device is created.
A /dev/leaf0 is not created by the mainline driver...
> So far so good. But what's next? What I have understood is that at this
> point there should be the kvaser_usb module that comes into play for
> mapping the device to a network interface that can be brought up and used
> by SocketCAN.
>
> But the kvaser_usb module is not loaded automatically, and if I modprobe it
> manually, nothing seems to happen.
>
> Here is what goes on in the kernel log when connecting the adapter:
>
> [46464.671385] usb 3-2: new high-speed USB device number 4 using xhci_hcd
> [46464.689616] usb 3-2: New USB device found, idVendor=0bfd, idProduct=0120
> [46464.689627] usb 3-2: New USB device strings: Mfr=0, Product=2,
> SerialNumber=0
> [46464.689633] usb 3-2: Product: Kvaser Leaf Light v2
> [46467.738639] usbcore: registered new interface driver leaf
>
> And this when I modprobe the kvaser_usb module:
>
> [46545.271520] usbcore: registered new interface driver kvaser_usb
>
> If I invert the order of the two operations, it is exactly the same. I've
> also tryed with and without an actual can device connected to the other end
> of the adapter, but this doesn't change anything either.
>
> So, it looks I am still missing something... Can anyone tell me what
> further steps are necessary to finally get a can0 interface to show up?
>
> Thank's a lot for any hint pointing me to the right direction...
Use a recent mainline kernel, then everything should work out of the
box, without any external drivers and manual module loading.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2015-04-22 8:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 7:31 kvaser leaf and SocketCAN max
2015-04-22 8:03 ` Marc Kleine-Budde [this message]
2015-04-29 2:01 ` Leo Stan
2015-04-29 3:50 ` Austin Schuh
2015-04-29 4:39 ` Leo Stan
2015-04-29 5:20 ` Marc Kleine-Budde
2015-04-29 6:15 ` Leo Stan
2015-04-29 6:33 ` Alexander Stein
2015-04-29 6:34 ` Marc Kleine-Budde
2015-04-29 10:45 ` Ahmed S. Darwish
2015-04-30 3:11 ` Leo Stan
2015-04-30 6:04 ` Marc Kleine-Budde
2015-04-30 6:14 ` Leo Stan
2015-04-30 6:25 ` Leo Stan
2015-04-30 6:48 ` Marc Kleine-Budde
2015-04-30 7:27 ` Oliver Hartkopp
2015-05-04 1:52 ` Leo Stan
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=553755E8.20704@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=max.jacob@alternalab.it \
/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