Python and RPi n00b here. Trying to get CANopen working on my RPI, and think I'm 8/10s of the way to communicating.
Target device is an RPi 3+ with fairly pedestrian install of Raspbian Buster and 5.4.51-v7+ linux kernel, attached to Kvaser Leaf USB CANopen adapter. CANopen adapter hardware is known to be good, works well with Windows software.
Relevant info:
-Installed can-utils
-Installed python-can 4.0.0
-Appear to have installed Kvaser drivers successfully (finally got make to complete without errors)
-vcan appears to work fine - have successfully transmitted and received test packets with this handy virtual can adapter using can-utils
I can set up the can socket initially:
sudo modprobe can
but when I try to initialize actual hardware, it fails and gets the following error:
sudo ip link add dev can0 type can
RTNETLINK answers:Operation not supported
Obviously I'm missing something, but cannot figure out what. I notice that others have had similar issues (though different hardware). Please advise of solutions and TIA.
You'll need to uninstall CANlib and then reboot for socketcan to work.
Follow this procedure:
Download the linuxcan tarball again if you no longer have it: http://www.kvaser.com/downloads
Extract linuxcan: tar -xf linuxcan.tar.gz
Inside of the linuxcan directory, run make to build everything which is required before you can uninstall
Now uninstall CANlib with sudo make uninstall
You should see something like the following:
Uninstalling pciefd
Remove SocketCAN Kvaser PCI driver from blacklist.
Uninstalling pcican2
Remove SocketCAN Kvaser PCI driver from blacklist.
Uninstalling pcican
Remove SocketCAN Kvaser PCI driver from blacklist.
Uninstalling virtualcan
Uninstalling usbcanII
Remove SocketCAN Kvaser USB driver from blacklist.
Uninstalling mhydra
Uninstalling leaf
Remove SocketCAN Kvaser USB driver from blacklist.
Uninstalling common
Now you can reboot and the ip link commands should work.
You need to uninstall "Kvaser Linux Drivers and SDK" and install "Kvaser SocketCAN device driver".
Related
I have installed Motioneyeos on a Pi Zero and on a Pi2, and it works like a charm in both of them. The control of the 2 systems can be unified on the web server of any one of them. The web interface is clear and allows to customize hundreds aspects of the program. Anything perfect so far.
Trying to understand a little bit how does it work, I have logged to one of the 2 Pis through ssh and I have checked that the OS is kept to a bare minimum. uname -r returns 4.19.65.
On the web interface of the app it is possible to check if the last version of the program is the one running. I have checked, and yes, I have the last version.
My question is: does it make sense to upgrade the OS components used by the program (apt update, apt dist-upgrade) even if the last version of the program is the one running in my Pis? Apt is not even installed, so the first thing would be to bring it there and install it, but I am afraid that if I update the OS, the program may stop to work...
I answer myself thanks to the feedback received in another forum. Motioneyeos is an embedded software based on Buildroot and as such it is not possible to install any package on it. To be able to install a package on Motioneyeos, Motioneyeos has to be installed on an full OS as Raspbian following the instructions in Motioneyeos web ==>>
We are trying to install a CentOS-based Openfiler distribution on Dell R630 server with PERC H330 mini RAID controller but unfortunately, the installation can't find a hard disk to install the OS.
Any ideas on how to solve that?
The Linux distribution doesn't contain the necessary driver packages. It might be possible to create an an device driver media, like an USB stick, which does contain the RPM installation packages. More information you will find in the Driver Installation section of the handbook.
I bought a RPI Zero for some projects. The problem is that this version of RPI does not have WIFI and only USB is used for keyboard.
Is it possible to install software like pip3 / guizero / ... via SD card?
You can use qemu static along with chroot on the root file system of your SD card as a preparation phase.
Here is a small script to do it:
cp /usr/bin/qemu-arm-static <sdcard>/usr/bin/
chroot <sdcard> bash -c "apt-get install ..."
rm <sdcard>/usr/bin/qemu-aarch64-static
You can also have a look at: https://wiki.debian.org/RaspberryPi/qemu-user-static
Yes, but I don't recommend it. You can download the .deb files, copy them to the sd card, and install them using
dpkg -i <package name>
But this has several disadvantages. You cannot use apt package manager without internet connection. You need to install all the dependencies as well, thus can be 10 packages or even much more. And you would need to update manually as well ... a nightmare.
Your options apart from this, you need an USB hub:
1) Get a cheap wifi stick (about $5)
2) If you have your mobile phone, you can enable USB Tethering. This will share your phones internet connection with the RPi.
Comment if you need my help to configure this. But it's easy.
I've filled up my Intel Edison 100% and have no room for anything more. I've emptied all logs and am still at 100%. I decided I want to factory reset and reorganize next time with the SD card better. Unfortunately I cannot find out how to reinstall completely the OS.
I've tried downloding the Yocto linux image off the intel downloads page, and uploading that to the Edison. However, it still is running the same as before...
For some reason I distinctly remember (pretty sure anyway...) reading a command to 'reset' everything. I just can't find any documentation now that I need it. Does anyone know how to do this?
Found the command, it's reboot ota
This is my checklist
Install dfu-util (on Linux: sudo apt-get install dfu-util)
Download Release 3.0 Yocto* complete image and unzip it
Connect the module using both USB connectors.
Run sudo ./flashall.sh --recovery
Wait for the script to finish and then a few extra minutes for the module to boot.
I've found one USB hub that didn't work, I had to connect directly to the USB port on the computer.
I'm not sure if you need both usb connectors but at least the one for main power is needed.
flashall.sh is found in the unzipped directory.
Is there a way to programmatically install device driver silently without cat file and without connecting the device on Windows Xp?
I'm using DriverPackageInstall function from Windows Driver Kit. And I can install driver only if device is attached. In other case I get an error: ERROR_NO_SUCH_DEVINST. But that method works fine with Windows Vista.
Another problem is warning dialog that asks user to continue or stop installation because cat file is missing . It shows on both OSes.
Any ideas?
You're not going to get past the signing prompt, as this is baked pretty far into windows, but there is a tool in the DDK called devinst that works well for device installations.
There's Source Code included with it.
The only way to avoid any UI interaction caused by your driver being unsigned is to hackishly preinstall the driver by modifying the registry directly.
Yes, it can be done. You'd have to modify the ACLs on the HKLM\System\CurrentControlSet\Enum registry key run as SYSTEM (by installing yourself as a service or using Sysinternals psexec -s), and add all the registry keys which Windows device installation would usually add - on your own. This will only work if you can predict precisely what your device's Device Instance ID would be -- e.g. in case of a USB device, the precise port it'd be connected to etc.
This is hacky, but the result would be the device being essentially "preinstalled". It'll be a lot of work, and it'll break on Windows Vista.
Microsoft really wants you to go the WHQL way on Windows XP, sorry :(