Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^3: How to Access USB Device on Windows

by dasgar (Priest)
on Nov 18, 2013 at 13:08 UTC ( #1063082=note: print w/replies, xml ) Need Help??

in reply to Re^2: How to Access USB Device on Windows
in thread How to Access USB Device on Windows

Ummm.....I'm not sure that I agree with interpretation.

From the "Limitations" section of Device::USB:

So far, this module has only been tested on Linux. It should work on any OS that supports the libusb library. Several people have reported problems compiling the module on Windows. In theory, it should be possible to make the library work with LibUsb-Win32 Without access to a Windows development system, I can't make those changes.

That doesn't sound like "the windows port is not supported". If you read carefully, what it says is there have been reported issues on Windows, but that the maintainer does not have access to a Windows system. That's not the same thing as "not being supported". Also, I happen to know the maintainer of that module via Perl Mongers and I have heard him say on more than one occasion that he does not use Windows on his personal systems at home.

Also, the "For More Information" section of Device::USB's documentation points to Google Code for a wiki. A quick look there turns up a wiki entry on how to install this on Windows with Strawberry Perl (see here). Granted, that entry appears to be at least 3 years old and doesn't mention which version of Windows, Strawberry Perl or Device::USB used. But there's at least one person who was able to install and use the module on Windows.

If you're having issues with installing and/or using Device:USB, you can always report a new bug. Looking at the bugs report for that module (see here), someone submitted a new bug report within the past few days and the maintainer responded within 2 hours. Since the maintainer is actively responding to new bug reports, you could potentially get help with install issues directly from the maintainer via that method.

In summary, I would try to install it and its prerequisites. If you have problems, you can post questions here at PerlMonks or you can submit a new bug report. As for portability and the need for libusb on Windows, my initial thoughts are that you should be able to package your script into an executable (using something like pp) so that your end users on Windows don't need Perl or libusb installed. I might be wrong about the packaging, but that's my gut reaction.

  • Comment on Re^3: How to Access USB Device on Windows

Replies are listed 'Best First'.
Re^4: How to Access USB Device on Windows
by Anonymous Monk on Feb 16, 2015 at 14:32 UTC

    Here's what the FAQ.pod of Device::USB says:

    There is a port of the C<libusb> library to the Windows environment called C<LibUsb-Win32>. Because I don't have a development environment for testing this library, C<Device::USB> does not yet support this library.

    Unfortunately I read this after spending half a day installing Device::USB and its prerequisites.

    I found here a post of the author, that says, that only libusb Version 0.14 is supported:

    However on I only find Versions 1.2.x, 1.1.x and 0.1.12.x.

    I tried the Installation with first, then removed it again and tried with Both installations succeeded (once I had removed the in the distribution dir and moved the away).

    Unfortunately, no USB devices are detected (although I have USB keyboard and mouse plugged in).

    I need access to a proprietary USB HID device, but with Device::USB I failed.

    Any further suggestions?

      ... Both installations succeeded (once I had removed the in the distribution dir and moved the away). ... Any further suggestions?

      Um, is the whole thing, what do you mean you removed it?

      It can't possibly do any thing if you ditched

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1063082]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2018-08-16 04:43 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (166 votes). Check out past polls.