On 20 Feb 2008, at 19:48, Todd B. wrote:
Install Ruby using the OCI and then install ruby-serialport.
I’ve only worked with the serial port on *nixes, but doing a little
googling, there’s also
http://grub.ath.cx/win32serial/
a conversation about wh
We’ve got a couple of production apps (sold to real customers) using
parsing data from serial ports using ruby.
The solutions work great on several platforms, but there are no non-
GPL’d implementations that I have ever been able to find. To date,
ruby-serialport requires some patches in order to build and run (in
the very least the patch that opens up .create).
The win32 specific lib was never really much interest to me as we are
supporting *nix and win32, and ideally I wanted a well abstracted
solution.
So I wrote two libs, one in ruby-termios (for *nix) and one using the
win32api, or more specifically using the overlapped IO interfaces, and
SetCommState.
Someone recently attached ruby-serialport to eventmachine, and I had
been thinking about making a GPL serial-port proxy server, but at this
point in time I am not aware of enough demand to make such a project
at all worth doing. The ruby-serialport lib is also in need of some
maintenance, as I mentioned earlier.
I recently connected my own serial port abstractions to eventmachine a
wholly different way, using a timer to poll at a relatively low speed
(after all, 9600 baud is nothing these days), as I couldn’t get the
overalapped IO implementation to work with the reactor core select loop.
As far as connecting to Hyperterminal is concerned, you can easily
connect back to yourself if you have two serial ports. I used Virtual
Serial Port Kit on win32 for a lot of our testing however, as I can do
things like breach the baud rate for running long-running tests in a
reasonable time frame. This obviously involves building a mock replica
of your hardware, in software however.