
Hi, What are the alternatives to read a USB port (actually, a COM serial port with an USB adapter) in Haskell, running in Linux? Thanks, Maurício

Maurício wrote:
Hi,
What are the alternatives to read a USB port (actually, a COM serial port with an USB adapter) in Haskell, running in Linux?
Guessing wildly here... Either as a regular file, or a wrapper around some ioctl calls? /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus Haskell is an even 'redder' pill than Lisp or Scheme. -- PaulPotts

On Wed, 06 Aug 2008 23:11:50 +0200, Maurício
Hi,
What are the alternatives to read a USB port (actually, a COM serial port with an USB adapter) in Haskell, running in Linux?
Have a look at: http://www8.garmin.com/support/commProtocol.html Maybe you can find somfing useful at sourceforce.net -- Met vriendelijke groet, Henk-Jan van Tuyl -- http://functor.bamikanarie.com http://Van.Tuyl.eu/ --

On Wed, Aug 06, 2008 at 06:11:50PM -0300, Maurício wrote:
Hi,
What are the alternatives to read a USB port (actually, a COM serial port with an USB adapter) in Haskell, running in Linux?
Just be aware that the USB-serial converter can be polled only every ms. So if you have really time critical applications you may see some porblems. I've spend days no knowing why I wasn't able to program a avr microcontroller till trying a real serial device (without USB) and it suddenly worked.. So if someting does'nt work maybe try a real serial interface first :) Marc

Marc Weber a écrit :
On Wed, Aug 06, 2008 at 06:11:50PM -0300, Maurício wrote:
Hi,
What are the alternatives to read a USB port (actually, a COM serial port with an USB adapter) in Haskell, running in Linux?
Just be aware that the USB-serial converter can be polled only every ms. So if you have really time critical applications you may see some porblems. I've spend days no knowing why I wasn't able to program a avr microcontroller till trying a real serial device (without USB) and it suddenly worked.. So if someting does'nt work maybe try a real serial interface first :)
Marc
I would, if my computer had one... :)

I'm currently using partial wrapper around libusb[1] in my work. It
doesn't provide full interface to the library itself, so I didn't have
to translate C structures. Perhaps someone can make a regular wrapper
- the libusb API is pretty small and concise.
Regards,
Christopher Skrzętnicki
[1] http://libusb.wiki.sourceforge.net/
On Wed, Aug 6, 2008 at 23:11, Maurício
Hi,
What are the alternatives to read a USB port (actually, a COM serial port with an USB adapter) in Haskell, running in Linux?
Thanks, Maurício
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Interesting! The new version of the library really deserves a wrapper. Thanks, Maurício
I'm currently using partial wrapper around libusb[1] in my work. It doesn't provide full interface to the library itself, so I didn't have to translate C structures. Perhaps someone can make a regular wrapper - the libusb API is pretty small and concise.
Regards, Christopher Skrzętnicki
[1] http://libusb.wiki.sourceforge.net/
On Wed, Aug 6, 2008 at 23:11, Maurício
wrote: Hi,
What are the alternatives to read a USB port(...)

Which version do you consider "new": the current 0.1.12 or the future
1.0 version?
Regards,
Christopher Skrzętnicki
On Fri, Aug 8, 2008 at 14:54, Maurício
Interesting! The new version of the library really deserves a wrapper.
Thanks, Maurício
I'm currently using partial wrapper around libusb[1] in my work. It doesn't provide full interface to the library itself, so I didn't have to translate C structures. Perhaps someone can make a regular wrapper - the libusb API is pretty small and concise.
Regards, Christopher Skrzętnicki
[1] http://libusb.wiki.sourceforge.net/
On Wed, Aug 6, 2008 at 23:11, Maurício
wrote: Hi,
What are the alternatives to read a USB port(...)
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

1.0. By the time one finishes a Haskell wrapper, 1.0 will be probably available, so I think it's better to start with that.
Which version do you consider "new": the current 0.1.12 or the future 1.0 version?
Regards, Christopher Skrzętnicki
On Fri, Aug 8, 2008 at 14:54, Maurício
wrote: Interesting! The new version of the library really deserves a wrapper.
Thanks, Maurício
I'm currently using partial wrapper around libusb[1] (...)
participants (5)
-
Henk-Jan van Tuyl
-
Krzysztof Skrzętnicki
-
Magnus Therning
-
Marc Weber
-
Maurício