Open pini-gh opened 12 years ago
Hi again,
Reading the source code, I understand that the port parameter of SerialPort.new() can be either an integer or a string, so it could open a port by name (say "\.\COM13"). But:
SerialPort.new("\.\COM13") TypeError: can't convert String into Integer
Thanks,
_g.
It seems it's the same issue as #13: when I force the full path of serialport.rb in my require statement it works.
I've tested: renaming serialport.so to libserialport.so and modifying accordingly the require statement in serialport.rb. Then, "require 'serialport'" produces "cannot load such file -- serialport". I guess that serialport.so was loaded instead of serialport.rd which actually isn't in the search path.
Installing serialport.rb init /lib/ruby/
Hence, the actual issue is relative to the serialport.rb installation path.
Thanks,
_g.
Hi,
I'm trying to connect to a serial device through a Moxa Board C32065T. The 8 Moxa ports are reported by Windows as COM10 to COM17. My device is on COM13, and accessible from standard serial communication applications such as PortMon.
Using ruby-serialport I initialize the port with (since COM1 is port 0, I guess COM13 should be port 12): SerialPort.new 12, 9600
But the initialization fails with "EBADF: Bad file descriptor".
Is there a way to access the port by its name "COM13"?
Thanks in advance,
_g.