installing an USB peripheral
Hi,
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. Code:
#!/bin/sh Code:
[root@raspberrypi ~]# dmesg | tail Code:
Bus 001 Device 006: ID 0bfd:0004 Kvaser AB USBcan II |
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?
--- rod. |
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 Code:
[root@raspberrypi usbcanII]# ./installscript.sh |
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. |
Quote:
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?
--- rod. |
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. --- rod. |
Quote:
|
Quote:
--- rod. |
what about this dmesg --->
Code:
usbcanII: disagrees about version of symbol module_layout |
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.
--- rod. |
All times are GMT -5. The time now is 04:02 PM. |