Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support usbmuxd on Windows #55

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

qmfrederik
Copy link
Contributor

This PR adds support for usbmuxd on Windows.

In short, the following changes were required:

  • Compatibility with winsock2 for sockets
  • The "set configuration" command is not implemented by libusb on Windows, but it is supported by libusb-win32 (if you also use the libusb-win32 driver). So libusb-win32 is used on Windows to set the configuraton
  • The polling sockets for usb devices are not available on libusb on Windows
  • Some fixes to make the code play nice with the Visual C++ compiler

As always, feedback is welcome.

* Disable syslog logging on Windows
* Implement get_tick_count for Windows
* Update the way the timestamps are calculated when logging on Windows
* preflight: Use Win32 Sleep() instead of sleep()
* usb.c: Include the LIBUSB_CALL macro in callback declarations
* Various fixes for usage of timeval/timespec on msvc
* Don't use libgen
* Alternatives for bzero, dirname on Win32
* Add #include for mkdir
…ibusb), and make the loop poll every 100 ms.
@neheb
Copy link

neheb commented Jan 30, 2020

Needs a rebase.

@mexmer
Copy link
Contributor

mexmer commented Jan 31, 2020

did you test if it works at all?

old apple driver uses ioctl, new apple driver is based on winusb, does ubsmuxd communicate with this devices trough driver at all?

@qmfrederik
Copy link
Contributor Author

The PR is based on libusb-win32 and the libusb-win32 driver. It works/worked, though on Windows, you're probably better off just using the Apple Mobile Device Service unless you have a good reason not to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants