Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

I'm trying to install an USB peripheral http://www.kvaser.com/en/products/can/usb.html.
This is what i did i download the linux driver i compiled it with my arm-linux- compiler and set the KERNEL_SOURCE_DIR to my kernel source as it asks for.
After compilation i sent the file to my raspberryPI and i installed USBCAN II driver thanks to the setup shell provided with the driver.

I'll hazard a guess that the USB-CANbus dongle is pulling the power supply down briefly when connecting. What happens if you boot the RPi with the USB-CANbus dongle already connected? Does the device work correctly after hot-plugging?

Thank you for your answer but hot-plugging does not resolve the problem. The PWR led is still flashing and i have the same message.
I forgot to mention that the install.sh didn't work pretty fine in fact when i run it i have

Well, it looks like your Rpi doesn't have a standard installation of udev. The CANbus dongle probably requires the USB subsytem udev rules to load a driver for the dongle when it is hot-plugged. Since the installation of the udev rules failed, no such rule gets invoked. If udev is installed, then you should either manually install the kvaser udev rules, or add the udev components to your $PATH before running the installation script. If udev isn't installed, then you should probably install it.

Well, it looks like your Rpi doesn't have a standard installation of udev. The CANbus dongle probably requires the USB subsytem udev rules to load a driver for the dongle when it is hot-plugged. Since the installation of the udev rules failed, no such rule gets invoked. If udev is installed, then you should either manually install the kvaser udev rules, or add the udev components to your $PATH before running the installation script. If udev isn't installed, then you should probably install it.

--- rod.

Thanks for your reply.

Well, if i remember well i had problems with udev when i build the rootfs, but here i added the path for udev and i executed ./installscript.sh successfully but i still can't run the device

Does the device driver load (look for evidence in /var/log/messages)? Is there a device node created ( eg /dev/can0 )? What do you mean by 'had problems with udev'? Is it installed, or not? If no, then you should install it. Are your udev rules for the device now installed according to the installation script? What exactly do you mean by 'can't run the device'? Do you have some test software that is known to be good? If the device node is present, does it have permissions suitable to the UID of the code you're trying use to test it? What rules are in the vendor supplied udev config file? Is there evidence that they are being applied?

i really appreciate your help. I'll try to answer the quetions that i understood
/for udev i had errors when i built the rootfs
/for the driver i think it's loaded for the node in /dev how can i guess that a device is for my usbcan ?
/what i mean with 'can't run it' there's a PWR led in the device that flashes instead of being steady (normal status like with my pc)
Now what's new is that a friend of mine (more qualified) made an update for the firmware and now i don't have this messages
usb 1-1.2.4: no configuration chosen from 0 choices
usb 1-1.2.4: No support over 500mA
and the led is steady now but as i understand the device is turned with a generic module (i'm not really understanding what i say) in an other way lsmod doesn't show usbcanII driver like before. But the problem that the examples provided with th driver (that we test with pc and worked) doesn't work with Raspberry Pi.
Another question if u don't mind i want to use another kernel with my old root file system what should i change only the image.ko ?
Hope that you can help me.

Okay, it looks like the driver is not loading. Monitor /var/log/messages (tail -f) as root when you plug the USB CANbus dongle into the Rpi. Do you see anything related to your device? If no, then no driver is loading, or the driver is not recognizing the presence of the device. Since the driver is no longer showing up in the output of lsmod, it sounds like the device is not being recognized. Did the firmware update complete successfully? Use lsusb to list devices attached to the USB. Does your device show up? Can you manually load the driver with insmod or modprobe? Can you roll back to the older firmware to see if the old behavior is restored?

When you built the root filesystem, and you saw errors related to udev, did you correct those errors? It is impossible to know what to expect from udev without knowing whether it is fully present.

Usually, the device node name is recognizable by its name. I would expect the device node name to suggest something about CANbus; something like /dev/can0.

For questions about kernel upgrades, you should start a new thread, or ask on a RPi forum. Do note that you will need to rebuild your CANbus driver against the sources for your new kernel.

I'll hazard a guess that the USB-CANbus dongle is pulling the power supply down briefly when connecting. What happens if you boot the RPi with the USB-CANbus dongle already connected? Does the device work correctly after hot-plugging?

Looks bad. More context needed. I've asked you a lot of questions. Diagnosis of the problem depends on the answers to those questions. Before a remedy can be effected, the cause of the problem must first be determined.