From: James Tucker Date: 2008-02-22T02:49:10+09:00 Subject: Re: Connecting to HyperTerminal On 20 Feb 2008, at 19:48, Todd Benson wrote: > On Feb 19, 2008 10:52 AM, Active View wrote: >> >> Ben Bleything wrote: >>> On Wed, Feb 20, 2008, Active View wrote: >>>> Hmm... Thanks... I thought that was an overall installer for >>>> Ruby?? Or >>>> was it an installation file with all the libraries in? >>> >>> It is an installer for Ruby. What I'm suggesting is that instead of >>> using cygwin, which is an overly complex mess, use the OCI instead. >>> Install Ruby using the OCI and then install ruby-serialport. >>> >>> Ben >> >> Hmm... I already have Ruby installed in my computer and it was done >> using the OCI. So now I only need to install the serialport libraries >> and it is giving me real lot of headaches... =[ >> >> >> Thank you. > > 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.