# RS232 in ruby

**URL:** <https://www.ruby-forum.com/t/rs232-in-ruby/147107>\
**Category:** Rails\
**Created:** [August 28, 2008, 2:36pm UTC](https://www.ruby-forum.com/t/rs232-in-ruby/147107 "2008-08-28T14:36:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shanmugam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@shanmugam](https://www.ruby-forum.com/u/shanmugam)\
**Post date:** [August 28, 2008, 2:36pm UTC](https://www.ruby-forum.com/t/rs232-in-ruby/147107/1 "2008-08-28T14:36:56Z")

</div>

is it possible in  
Ruby to interface with a device through a RS232 serial connection?

I want to connect my Windows XP computer with a medical device through  
RS232 - get data from the device and send it messages.

---

<div class="post-metadata">

**Author:** ![shanmugam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@shanmugam](https://www.ruby-forum.com/u/shanmugam)\
**Post date:** [August 28, 2008, 2:56pm UTC](https://www.ruby-forum.com/t/rs232-in-ruby/147107/2 "2008-08-28T14:56:11Z")

</div>

A Google search for

ruby “serial port”

turns up several hits that look worthwhile. There are even a couple that  
are  
Windows-specific.

Regards,  
Craig

---

<div class="post-metadata">

**Author:** ![shanmugam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@shanmugam](https://www.ruby-forum.com/u/shanmugam)\
**Post date:** [August 28, 2008, 2:58pm UTC](https://www.ruby-forum.com/t/rs232-in-ruby/147107/3 "2008-08-28T14:58:51Z")

</div>

i have got a library named Win32Serial Extension Library for Ruby  
but i dont know the steps to use it…!  
if any one knows plzz explain me in detail

Craig D. wrote:

> A Google search for
> 
> ruby “serial port”
> 
> turns up several hits that look worthwhile. There are even a couple that  
> are  
> Windows-specific.
> 
> Regards,  
> Craig

---

<div class="post-metadata">

**Author:** ![shanmugam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@shanmugam](https://www.ruby-forum.com/u/shanmugam)\
**Post date:** [August 28, 2008, 3:00pm UTC](https://www.ruby-forum.com/t/rs232-in-ruby/147107/4 "2008-08-28T15:00:33Z")

</div>

Mine is a web application. My server is in linux  
any way to get it worked for linux…

Shanmu Varatharajank wrote:

> i have got a library named Win32Serial Extension Library for Ruby  
> but i dont know the steps to use it…!  
> if any one knows plzz explain me in detail
> 
> Craig D. wrote:
> 
> > A Google search for
> > 
> > ruby “serial port”
> > 
> > turns up several hits that look worthwhile. There are even a couple that  
> > are  
> > Windows-specific.
> > 
> > Regards,  
> > Craig

---

<div class="post-metadata">

**Author:** ![shanmugam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@shanmugam](https://www.ruby-forum.com/u/shanmugam)\
**Post date:** [August 28, 2008, 9:19pm UTC](https://www.ruby-forum.com/t/rs232-in-ruby/147107/5 "2008-08-28T21:19:24Z")

</div>

Depending on what other libraries you use it might be easier to call out  
to some native C libraries to perform the RS232 work. It’s not like  
performance is going to be much of an issue with RS232. You’ll spend  
well over 90% of your time waiting for data to flow into the port.

Not sure if that’s a workable solution, just a thought.

Shanmu Varatharajank wrote:

> Mine is a web application. My server is in linux  
> any way to get it worked for linux…
> 
> Shanmu Varatharajank wrote:
> 
> > i have got a library named Win32Serial Extension Library for Ruby  
> > but i dont know the steps to use it…!  
> > if any one knows plzz explain me in detail
> > 
> > Craig D. wrote:
> > 
> > > A Google search for
> > > 
> > > ruby “serial port”
> > > 
> > > turns up several hits that look worthwhile. There are even a couple that  
> > > are  
> > > Windows-specific.
> > > 
> > > Regards,  
> > > Craig

---

<div class="post-metadata">

**Author:** ![shanmugam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/d6d6ee/32.png) [@shanmugam](https://www.ruby-forum.com/u/shanmugam)\
**Post date:** [August 28, 2008, 10:34pm UTC](https://www.ruby-forum.com/t/rs232-in-ruby/147107/6 "2008-08-28T22:34:49Z")

</div>

Hi, you might want to post your question here  
[http://groups.google.com/group/comp.lang.ruby](http://groups.google.com/group/comp.lang.ruby)

because your question is targeted to Ruby instead

Rails.

Good luck,

-Conrad

On Thu, Aug 28, 2008 at 5:36 AM, Shanmu Varatharajank \<
