ruby-serialport is a gem to work with rs232 interfaces using the ruby programming language.
Questions tagged [ruby-serialport]
7 questions
3
votes
1 answer
ruby-serialport is only sending data when a serial monitor is open, or when IRB is left open
I'm facing what seems to be a very odd issue. I've very much simplified my sketch and Ruby code in order to isolate the problem.
Ruby version is 2.0.0, and ruby-serialport version is 2.3.0. I'm on Mac OS X 10.9 (Mavericks).
Here is my sketch. As you…

Steven Petryk
- 683
- 4
- 11
2
votes
1 answer
Permission denied while connect to serialport?
I'd like to connect to 3G modem using Ruby and the serialport gem.
My Ruby code:
require 'serialport'
class GSM
sp = SerialPort.new('COM7', 9600)
sp.read_timeout = 1500
sp.write "AT\r\n"
puts sp.read
end
I get this error after starting my…

alexey.chumagin
- 630
- 5
- 16
1
vote
1 answer
How to send "ctrl+c" cmd through on the serial line by the ruby serialport
I send "top" to the device through serailport,then read the top info
After that, I don't known how to stop the "top"!
require 'serialport'
port = 2
args ={"baud"=>57600,…

wuhlcom
- 119
- 1
- 9
1
vote
1 answer
Identifying what /dev/ is a USB device connected to
I'd like to write a Ruby program for OSX that communicates via USB with my Arduino.
I am going to use the serialport gem for that purpose.
I found a sample code that says:
port_str = "/dev/ttyUSB0" #may be different for you
How can I scan and find…

Himberjack
- 5,682
- 18
- 71
- 115
0
votes
1 answer
Trouble converting serial port data to hex, data is from an RFID reader
I am trying to attain data from an RFID reader I have attached to a serial port. The data is coming through as jumbled characters, which I have to convert to hex. I am getting an error trying to convert it to hex, when I do this:
puts "%02X" %…

Mark
- 3
- 1
0
votes
1 answer
Ruby Datamapper will not insert serial data
I have created a Ruby script that gets serial data and if it starts with certain characters, prints string (SMS), inserts string into a file, parses string, then inserts parsed data into a MySql database.
If I put a sample test string in place of…

kiwiaviator
- 35
- 4
0
votes
0 answers
ruby serialport flow control is not working
Im using the serialport gem which has done a good job for me so far. But now I realized the flow_control is simply not working. First I thought its a problem of my usb rs232 adapter but it isnt. I tried it with an onboard rs232 interface and it…

davidb
- 8,884
- 4
- 36
- 72