On my iMAC:
Retina 5K, 27-inch, Late 2015
4 GHz Quad-Core Intel Core i7
16 GB 1867 MHz DDR3
AMD Radeon R9 M395X 4 GB
I am running VirtualBox:
Version 7.0.14 r161095 (Qt5.15.2)
I have a Linux virtual machine:
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
I connect to a Raspberry Pi 0 W which has an IP on my network of 192.168.5.185, I have enabled root and ssh, connected to the Raspberry Pi I have a CAN-BUS USB device, from ssh terminal:
root@RPi0:~# lsusb
Bus 001 Device 003: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Using ssh I have enable the USB device:
root@RPi0:~# usbip list
- busid 1-1 (1d50:606f)
OpenMoko, Inc. : Geschwister Schneider CAN Adapter (1d50:606f)
The goal is to map the remote CAN BUS adapter to Ubuntu, which I have done before only a week ago, for another reason I had to start over and now I'm having a problem, when I try to list the remote usb devices from a Ubuntu terminal:
usbip list -r 192.168.5.185
usbip: info no exportable devices found on 192.168.5.185
I rebooted the Pi 0 and then in my Ubuntu terminal:
sy@Linux:~$ usbip list -r 192.168.5.185
Exportable USB devices
======================
- 192.168.5.185
1-1: OpenMoko, Inc. : Geschwister Schneider CAN adapter (1d50:606f)
: /sys/devices/platform/soc/20980000.usb/usb1/1-1
: (Defined at Interface level) (00/00/00)
sy@Linux:~$ sudo usbip attach -r 192.168.5.185 -b 1-1
[sudo] password for sy:
libqsbip: error: udev_device_new_from_subsystem_sysname failed
usbip: error: open vhci_driver (is vhci_hcd loaded?)
I found this: usbip error open vhci driver
I've checked the versions in ubuntu terminal and on remote:
sy@Linux: ~$ usbip version
usbip (usbip-utils 2.0)
sy@Linux: ~$ sudo ssh [email protected]
root:192.168.5.185's password:
Linux RPi0 6.1.21+ #1642 Mon Apr 3 17:19:14 BST 2023 armv6l
The programs included with Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last Login Sun Feb 25 11:26:32 2024 from 192.168.5.220
root@RPi0:~# usbip version
usbip (usbip-utils 2.0)
So both versions match, it isn't anything to do with the other stack-overflow reported message.
Interestingly if I kill the power on the Raspberry Pi, so the CAN Bus module comes up without being set-up and then I execute from Ubuntu as soon as I can ping the device:
usbip list -r 192.168.5.185
Exportable USB devices
======================
- 192.168.5.185
3-1: OpenMoko, Inc. : Geschwister Schneider CAN adapter (1d50:606f)
: /sys/devices/platform/soc/20980000.usb/usb1/1-1
: (Defined at Interface level) (00/00/00)
Still get the same result:
sy@Linux:~$ sudo usbip attach -r 192.168.5.185 -b 3-1
[sudo] password for sy:
libqsbip: error: udev_device_new_from_subsystem_sysname failed
usbip: error: open vhci_driver (is vhci_hcd loaded?)
I then edited on the Pi /etc/modules and removed vhci_driver, the module is now back at 1-1, but same reported message:
sy@Linux:~$ sudo usbip attach -r 192.168.5.185 -b 1-1
[sudo] password for sy:
libqsbip: error: udev_device_new_from_subsystem_sysname failed
usbip: error: open vhci_driver (is vhci_hcd loaded?)
I think vhci_hcd should be loaded perhaps by Ubuntu? How ?
On the Raspberry Pi 0 W I added:
sudo usbip bind —busid=X
Where X is the bus id assign to the USB device, which can be shown with:
usbip list -p -l
In my case it came up with:
busid=1-1#usbid=1d50:606f#
So X would be replaced with 1-1. The only problem I have now is that with everything connected if I perform:
sudo reboot
The can0 device does not show up when I use:
ip link
I then have to disconnect the device by pulling the cable and reconnecting which is not acceptable.
Some information from dmesg:
[46.529564] IPv6 ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[53.136367] usbip-host 1-1: usbip-host: register new device (bus 1 dev 2)
Can anyone help with this problem?