Originally posted by abcd567
View Post
The problem of using usbipd-win is that WSL2 must be booted and the network must be running in order to attach a USB device. This requires the network-online.target to have been reached by systemd. As soon as this target has been reached, systemd starts other services, including dump1090-XX, which require the USB to be attached, so the window of opportunity to execut the attach command is very short.
I'm working on a service that starts after network-online.target and completes before dump1090-fa starts. My intention is for the service to support start (attach), stop (detach) and restart (detach, attach). I'm testing it and I will post the files as soon as possible. This service will require manual installation and manual configuration.
This has taken a while because I'm busy, when I started, I didn't know anything about systemd and the last shell script I wrote was a tcsh script on a Digital AlphaStation running Digital UNIX. Now I know enough about systemd to be dangerous.
I noticed you used hardware-id. I used busid. I just did a test and verified that hardware-id doesn't change, even if you change the port. That's better than busid, so I will put it on the to-do list to change to hardware-id.
There doesn't seem to be a version of linux-tools for the version of linux being used by WSL2, so I'm executing the usbipd commands on Windows from inside WSL2.
More later...
Comment