USB port in perl

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ashley Harris

    USB port in perl

    I hope to have a Linux box sitting in the boot of my car using perl and some
    CPAN modules for Ogg-Vorbis and Audio Streaming for a home-built stereo
    system. I recently scored a GPS locater that plugs into a USB port, and
    this. The old PC doesn't have a usb card in it, not a big deal, I'd pay a
    few bucks for it, but I can't seem to find a USB module for perl?

    is there a Devise::USB or equiverlant module for perl?

    are there other methods of reading from a USB port in this setup? something
    like `/dev/usb1 > /home/gps/gps.grab.txt` and then reading the text file
    with my perl script?

    or is it possible to do some cable cutting and soldering to plug a USB
    device into a serial port and read with the serial module?

    The protocol used by the device is a text protocol NEMA1803 or something of
    the like, sent over USB 1.1?

    Any ideas people?



  • Wiseguy

    #2
    Re: USB port in perl

    Ashley Harris <ashley___harri s@hotmail.com> tried to express:[color=blue]
    > is there a Devise::USB or equiverlant module for perl?[/color]

    To the best of my knowledge: no.

    [color=blue]
    > are there other methods of reading from a USB port in this setup? something
    > like `/dev/usb1 > /home/gps/gps.grab.txt` and then reading the text file
    > with my perl script?[/color]

    USB, at the level you are inquring, isn't designed to be accessed in that
    way. You won't find any direct /dev/usb device. The protocol is designed
    as a base hardware protocol and needs a software layer (driver class) for
    each type of device you wish to access.
    [color=blue]
    > or is it possible to do some cable cutting and soldering to plug a USB
    > device into a serial port and read with the serial module?[/color]

    At your own risk, but you won't get anything useful out of it.

    A USB to serial converter "may" work, accessed as /dev/usb/ttyUSB??



    Comment

    Working...