in reply to Re^6: USB module
in thread USB module

I'm not sure how I can put it more simply appart from saying that I have written USB drivers for two "home grown" USB devices and have written the device side code for one of those devices and for a third USB device. I know what I speak of!

Unless your devices are battery chargers or christmas tree lights running off USB power, there absolutely must be drivers for them. They may be standard operating system supplied drivers if they identify themselves as standard devices (HID for example).

Simply saying "Tell me how to communicate with a USB device" is like saying "Tell me how to communicate with a person". Sounds fine, but: are you going to talk, use Morse code, exchange letters, use email...? What language are you going to use? Do you need to send a message once, or is this going to be a frequent thing? There is simply no way to answer the question when it is put in that form except by asking a bunch of detailed questions.

This has moved beyond being of general interest. If you /msg me your email address I will help as I can.


Perl is Huffman encoded by design.

Replies are listed 'Best First'.
Re^8: USB module
by boblikeperl (Novice) on Sep 29, 2005 at 14:46 UTC
    OK. This has gotten away from my original question. I am not asking how USB works or needing to develop drivers that deal with protocols and hardware devices. I wanted to know if there is a PERL module for USB that is similar to the Net::TelNet module that deals with ethernet communications. Maybe you can answer this one: I want to copy a file from a USB device on USB #1 to a device on USB #2 on my WinXP PC using Perl. How is this done? Assume the devices are HID.

      If your USB device is a HID device and, I assume from the nature of your question, behaves like a disk drive, then it is a disk drive and you access it exactly as you would your hard disk. If it is a HID device then your software simply doesn't need to know that USB is involved.

      However your references to Net::Telnet and suggestion that the device is some sort of test device imply that that is not the case. You really have to make it clear what the device is. I can understand that you don't wish to do that in a public forum such as this and offer an exchange of email as a way I may be able to help in a more focused fashion. I am not offering to write drivers or planing lecture 101 in implementing USB devices :).


      Perl is Huffman encoded by design.