4
4

More than 1 year has passed since last update.

USBIPを利用してRaspberryPiからWindows10へのUSBデバイス共有

Last updated at Posted at 2022-02-18

USBIPとは

ネットワーク(IP)を経由してUSBデバイスを共有するソフトウェア(ライブラリ)です。

サーバ側設定(RaspberryPi)

1、USBIPライブラリをインストール

sudo apt-get install usbip

2、モジュールロード

sudo modprobe usbip-core
sudo modprobe usbip-host

3、デーモンスタート

sudo usbipd -D

4、USBデバイスをリスト

usbip list -l

結果:

 - busid 1-1.1 (0424:ec00)
   Standard Microsystems Corp. : SMSC9512/9514 Fast Ethernet Adapter (0424:ec00)

 - busid 1-1.2 (045e:07b2)
   Microsoft Corp. : 2.4GHz Transceiver v8.0 used by mouse Wireless Desktop 900 (045e:07b2)

 - busid 1-1.4 (1c1f:c18a)
   Goldvish S.A. : unknown product (1c1f:c18a)

5、デバイスのバンド

usbip --debug --log bind --busid=1-1.4  #(上記usbip list -lのID)

クライエント側設定(Windows10)

1、ソフトウェアをダウンロード
usbip-win

2、usbip_test.pfxをインストール
 注意点二つ
- "Trusted Root Certification Authority" in "Local Computer" (not current user) and
- "Trusted Publishers" in "Local Computer" (not current user)

3、test signingを有効

bcdedit.exe /set TESTSIGNING ON

4、仮想デバイスをインストール
※.僕の場合usbip.exe installusbip.exe install -uを使ってインストールはできますが、attachコマンドを実行する時はvhciドライバー見つからないというエラーが出ました。でも、usbip.exe install -uを使ってインストールするのは影響はあるかどうかはわかりません。

usbip.exe install -w

使用方法

1、サーバ側共有しているデバイスを確認

usbip list -r <Server IP address>

2、デバイスをアタッチ

usbip attach -r <server IP address> -b <Device bus ID>

リソース解放

1、アタッチしているデバイスをリスト

usbip port

2、デバイスをデタッチ

usbip detach -p <port>

3、サーバサイドのアンバンド

usbip unbind -b 1-1.4

参考リンク:
https://progsoft.net/ja/software/usb-over-network
https://github.com/cezanne/usbip-win/wiki/Install-usbip-win-client
https://developer.ridgerun.com/wiki/index.php?title=How_to_setup_and_use_USB/IP
https://forums.raspberrypi.com/viewtopic.php?t=107720

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4