Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: interface with USB and perl

by Sihal (Pilgrim)
on Jan 15, 2003 at 10:44 UTC ( [id://227112]=note: print w/replies, xml ) Need Help??


in reply to Re: interface with USB and perl
in thread interface with USB and perl

BTW, could you please detail how I would be able to copy stuff on the MD if it has a FS driver (wich is still to be found out, cause it has a driver, but under Linux????) ? I fail to see how to copy stuff to an USB device ? Is it just like a cdrom, the device is mounted when plugged in the USB or do I need a special module to accesss to USB devices ? Thanx a lot.

Replies are listed 'Best First'.
Re: Re: Re: interface with USB and perl
by Corion (Patriarch) on Jan 15, 2003 at 11:05 UTC

    If you have a FS driver for your device, copying files to it is mostly reduced to a shell script that does :

    mount /dev/fsminidisk /mount/md cp $* /mount/md/ umount /mount/md
    In Perl, you would possibly use File::Copy to copy files, and unlink to erase files. This also assumes that the FS driver does the work of possibly converting your mp3 files to atrack format (the sound format used on minidisk players). You might have to find a way to convert mp3 to atrack unless the FS driver already does what you need.

    If there is no support for Linux, and the device dosen't use a protocol that is similar to a protocol that is already supported under Linux, then you can still resort to Wine or vmWare, install the driver under the emulation, and export it to the Linux box...

    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
      the wine solution might be an option. I'll have a look when I get home to see if there is any drivers provided for Linux.
Re: Re: Re: interface with USB and perl
by Sihal (Pilgrim) on Jan 15, 2003 at 11:59 UTC
    ok. I know how to copy/erase stuff from a FS.
    What I don't 'know' (never used it) is how USB works. From what I seem to understand, USB is handled by the kernel, and I can access a device just as an ordinary FS if there is a kernel driver for that device, is that correct ?
    If so, it all boils down to finding the driver... or writing my own ( but I might "peter plus haut que mon cul" as we say in France :-) )
        That's very cool indeed. I'm at work so no time to look deeply, but I will. I was talking with a colleague today, and we might start to work on the subject in a serious way, if it seems feasible (if we can get enough doc. about our minidiscs and stuff)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://227112]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2025-02-07 02:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (94 votes). Check out past polls.