hparra / ruby-serialport

ruby-serialport is a Ruby library that provides a class for using RS-232 serial ports
http://rubygems.org/gems/serialport
GNU General Public License v2.0
246 stars 58 forks source link

how to read and write to port? #62

Closed sagax closed 9 years ago

sagax commented 9 years ago

this methods not working

require 'serialport'
s = SerialPort.new '/dev/ttyS0', 9600, 8, 1, SerialPort::NONE
s.write 'AT'
pp s.read  # not work
pp s.readlines  # not work
pp s.readline  # not work

i just get back command. why? please help

sagax commented 9 years ago

i find my problem, https://github.com/hparra/ruby-serialport/issues/31#issuecomment-5983733