Uwe
Uwe
CCoder.com
Created by Uwe on 11/20/2024 in #help
USBIP Dev Kit Tunnel for Embedded SW Dev
I'm evaluating if I can use a CDE for embedded SW dev. For this, I want to forward a locally connected dev kit into a Coder workspace. Testing with standard STM32F4 eval board connected via USB. So far so good, but right now I'm stuck because I don't know if this is a Coder/USBIP/PICNIC error usbip: error: import device. Does anybody know? Locally installed and run Coder in WSL2 on Windows. USBIP kernel space drivers are included in WSL2 kernel, corresponding user space tools are alternatives:
<username>@STM32exp:~$ uname -r
5.15.167.4-microsoft-standard-WSL2
<username>@STM32exp:~$ sudo apt install linux-tools-virtual hwdata
<username>@STM32exp:~$ sudo update-alternatives --install /usr/local/bin/usbip usbip $(command -v ls /usr/lib/linux-tools/*/usbip | tail -n1) 20
update-alternatives: using /usr/lib/linux-tools/6.8.0-49-generic/usbip to provide /usr/local/bin/usbip (usbip) in auto mode
<username>@STM32exp:~$ uname -r
5.15.167.4-microsoft-standard-WSL2
<username>@STM32exp:~$ sudo apt install linux-tools-virtual hwdata
<username>@STM32exp:~$ sudo update-alternatives --install /usr/local/bin/usbip usbip $(command -v ls /usr/lib/linux-tools/*/usbip | tail -n1) 20
update-alternatives: using /usr/lib/linux-tools/6.8.0-49-generic/usbip to provide /usr/local/bin/usbip (usbip) in auto mode
I'm trying to tunnel USBIP port via ssh.
PS C:\Users\<user>> usbipd.exe list
Connected:
BUSID VID:PID DEVICE STATE
2-1 0483:374b ST-Link Debug, USB Mass Storage Device, USB Serial Device... Shared
PS C:\Program Files\Coder\bin> ssh -R 2001:localhost:3240 coder.STM32exp
<username>@STM32exp:~$ sudo /usr/local/bin/usbip --tcp-port 2001 attach -r localhost -b 2-1
usbip: info: using port 2001 ("2001")
usbip: error: import device
PS C:\Users\<user>> usbipd.exe list
Connected:
BUSID VID:PID DEVICE STATE
2-1 0483:374b ST-Link Debug, USB Mass Storage Device, USB Serial Device... Shared
PS C:\Program Files\Coder\bin> ssh -R 2001:localhost:3240 coder.STM32exp
<username>@STM32exp:~$ sudo /usr/local/bin/usbip --tcp-port 2001 attach -r localhost -b 2-1
usbip: info: using port 2001 ("2001")
usbip: error: import device
Windows activated USBIP debugging:
PS C:\Users\<user>> usbipd.exe server
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\<users>
info: Usbipd.ConnectedClient[1]
Client ::1 claimed device at 2-1 (USB\VID_0483&PID_374B\0669FF3537394E3457251423).
info: Usbipd.ConnectedClient[2]
Client ::1 released device at 2-1 (USB\VID_0483&PID_374B\0669FF3537394E3457251423).
PS C:\Users\<user>> usbipd.exe server
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\<users>
info: Usbipd.ConnectedClient[1]
Client ::1 claimed device at 2-1 (USB\VID_0483&PID_374B\0669FF3537394E3457251423).
info: Usbipd.ConnectedClient[2]
Client ::1 released device at 2-1 (USB\VID_0483&PID_374B\0669FF3537394E3457251423).
3 replies