|
1 | 1 | # PythonUSBIP
|
2 |
| -USBIP protocol fully implemented in python + Full wiimote support using cwiid |
| 2 | +This work is heavily based on [this repository](https://github.com/lcgamboa/USBIP-Virtual-USB-Device). |
| 3 | +However, there a many differences, mainly because this new version supports any number of devices. |
| 4 | +It is still missing a proper detach protocol. |
| 5 | + |
| 6 | +## Usage |
| 7 | +The whole USBIP code is in the USBIP.py file. The best way to understand how to implement a device is to look at how the wiimote example is implemented or to see [the example of lcgamboa's repository](https://github.com/lcgamboa/USBIP-Virtual-USB-Device/blob/master/python/hid-keyboard.py). |
| 8 | + |
| 9 | +## Using with Windows |
| 10 | +Using USBIP on Windows can be a huge pain. I have done a lot of research defore finally getting it to work correctly. Therefore, here are the thing you should know : |
| 11 | +* If you've already installed the USBIP driver, uninstall it, it causes BSODs |
| 12 | +* If you've already downloaded the USBIP binary, remove it |
| 13 | +* Use [this driver & binary](https://sourceforge.net/p/usbip/discussion/418507/thread/86c5e473/) instead (the driver is located in the `output` folder) |
| 14 | +* This is not directly related to this post, but if you're having issue attaching a device from Windows to a linux host, this is because usbip has been merged into the kernel since 3.14. However, no need to downgrade, there is [a fix](https://sourceforge.net/p/usbip/discussion/418507/thread/7ff86875/?limit=25&page=5#cd87) ! |
| 15 | + |
| 16 | +## Wiimote example |
| 17 | +This repository contains a fully fonctionnal USBIP wiimote example. It uses cwiid to communicate with the wiimotes. |
| 18 | +Everything is implemented, including using multiple wiimotes and using a nunchuk. |
| 19 | +All wiimotes are represented as a Generic USB Joystick with USBIP, they are therefore accessible without any specific driver. |
| 20 | +In order to use it, launch `python wiimotes.py` and follow the instructions. |
| 21 | + |
| 22 | +### Wiimote menu |
| 23 | +Pressing the HOME button on a wiimote will put it into a "menu" mode. There are four entries that can be selected using the MINUS and PLUS buttons. Activating the selected entry is made by pressing the A button : |
| 24 | + |
| 25 | +1. If nunchuk is plugged, send its values instead of the values of the accelerometer |
| 26 | +2. Easy "Mario Kart" switch. Remaps some buttons to use the wiimote as a steering wheel |
| 27 | +3. Trigger a new wiimote scan |
| 28 | +4. Disconnect this wiimote |
0 commit comments