From: Brian Candler Date: 2012-12-27T07:14:56+09:00 Subject: Re: Comunication via rs485 iosu bueno wrote in post #1090230: > Brian Candler wrote in post #1089866: >> Google "ruby serial port" > > Im already using serialport gem in my project, but as they say in their > page "Ruby/SerialPort is a Ruby library that provides a class for using > RS-232 serial ports" so i dont know if I can use it to comunicate via > rs485 or just rs232 Have you googled for the difference between RS232 and RS485? Also, you haven't said what hardware you want to use to connect your PC to RS485, nor what protocol you are going to use, nor what operating system you are using. If this is just a long-reach point-to-point asynchronous serial link, then RS232 and RS485 are basically the same thing but with different electrical properties. If you are using an RS232-to-RS485 level shifter, or an RS485 card with a 16550A-compatible UART, then it will appear just like an RS232 serial port. However if you are trying to do something cleverer, e.g. talk on an RS485 shared multipoint bus, you may have more work to do, e.g. turning the line driver on and off at the right times. This *might* still be drivable like an RS232 serial port, e.g. raising and lowering DTR might turn the transmit driver on and off. You'll need to read the documentation for the hardware and OS drivers you're using. -- Posted via http://www.ruby-forum.com/.