50 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: USB/IP
description:
published: true
date: 2021-09-15T18:51:44.586Z
tags:
editor: markdown
dateCreated: 2021-09-14T13:15:26.610Z
---
# USB/IP
[USB/IP](http://archive.gabongao.club/archive/1631731717.465873/index.html)是一个将usb设备通过tcp/ip协议共享至其它主机的开源项目。希望基于这个项目可以将远程主机分享的相机、赤道仪、滤镜轮、调焦器等设备共享至远程作为远程天文台。
优点:
- 一机可以多用可以作为远程台可以作为类似asi的打野装备
- 控制软件不受限制可以使用ninasharpcap等等任何软件
缺点:
- 相较于远程桌面需要的带宽更大
- 受限于网速
- 驱动稳定性
## 安装
### Linux服务端
[How to setup and use USB/IP](http://archive.gabongao.club/archive/1631731688.884359/index.html)
Install USBIP:
`sudo apt-get install usbip`
Load the kernel module with modprobe:
`sudo modprobe usbip-host`
List available usb devices:
`sudo usbip list -l`
(my device shows up with an ID of 1-1.3)
Bind it to USBIP:
`sudo usbip bind --busid 1-1.3`
It returns:
`usbip: info: bind device on busid 1-1.3: complete`
start usbip server daemon.
`sudo usbipd`
### Windows服务端
https://github.com/cezanne/usbip-win
`.\usbip.exe attach -r 192.168.1.116 -b 1-1.4`
`.\usbip.exe detach -r 192.168.1.116 -p 0`
## 测试
可以将插在树莓派上的asi 120 mc pro共享至windows使用序列号等等都可以正常读取但是图像存在割裂可能是代码有bug如下图。
![snipaste_2021-09-14_21-18-02.png](/indilib/snipaste_2021-09-14_21-18-02.png)