From: Axel Date: 2009-07-01T17:20:11+09:00 Subject: Re: serial port connection Hello, I never used serial-port communication with Ruby, but I collected some informations on this. (It's likely that I'll need it in the future...) Maybe, the following is usefull for you: " # ...All I had to do was set a seemingly # arbitrary read_timeout value. With the timeout, serialport.gets just returns # whatever was in the input buffer. " My collection: ########################################################################### # 2008-12-08: According to comp.lang.ruby, there is no easy-to-use library, # for serial port usage under windows. But: This should work: # http://grub.ath.cx/win32serial/ # which worked fine on my system (Windows XP sp3, using cygwin ruby, but I # think it'll work with the one-click version of Ruby) # Small, but must be compiled first. Compilation made problems, according to # comp.lang.ruby # # 2009-06-09: Somebody got library working (comp.lang.ruby, 2008-06): # Nevertheless, it seems to be working today! All I had to do was set a seemingly # arbitrary read_timeout value. With the timeout, serialport.gets just returns # whatever was in the input buffer. # # Other thread (2008-06): # ...in my experience Ruby serialport library for Windows is in most cases # not usable. I suppose the problem is Ruby's implementation of threads # (green threads) under Windows. # # For serial communication under windows I now use a RS-232/422/485 # connections over Ethernet (i.e. Ethernet to serial) - so from windows # (Ruby) perspective I use TCP/IP communication which works fine. Regards, Axel