0. WSL2 in Windows10

  가. 22H2(OS Build 19045/3693)

  나. WSL2(Ubuntu20.04)

  다. 참고자료

    1) https://learn.microsoft.com/en-us/windows/wsl/connect-usb

 

1. USB/IP 설치

  가. Windows10에서

    1) https://github.com/dorssel/usbipd-win/releases/download/v3.2.0/usbipd-win_3.2.0.msi

    2) msi 설치

  나. WSL2에서

    1) $ sudo apt install linux-tools-generic hwdata

    2) $ sudo update-alternatives --install /usr/local/bin/usbip usbip /usr/lib/linux-tools/*-generic/usbip 20

 

2. USB/IP 활용

  가. Windws10에서 시리얼장치 검색

    1) PowerShell 실행(관리자권한)

      가) > usbipd wsl list

      나) 사용하려는 장치의 BUSID를 확인해 둘 것

      다) > usbipd wsl attach --busid <busid>

        (1) 장치가 WSL2로 연결됨

        (2) > usbipd wsl detach --busid <busid>

          (가) 장치 분리

  나. WSL2에서 시리얼장치 확인

    1) Terminal

      가) $ lsusb

AND