cbrake / linux-serial-test

Linux Serial Test Application
302 stars 154 forks source link

Parameters to test RS485 #32

Open amankumar1194 opened 4 years ago

amankumar1194 commented 4 years ago

From the options available, I see "-q" to enable the RS485 direction control. But I don't understand what other parameters can be passed to validate the working of RS485 driver using your app.

If someone can help me with the proper parameters to test RS485 with this app then it would be very much helpful.

cbrake commented 4 years ago

To test RS485, generally you need two ports, wire them together, and then send data from one port to the other, and then back the other way. You could run one port with transmit disabled, and configure the other instance to send data. This app uses a counting pattern to detect missed data.

andy-shev commented 1 year ago

FYI: Linux kernel gained 9-bit mode and RS422 support (https://elixir.bootlin.com/linux/v6.2-rc5/source/include/uapi/linux/serial.h#L130), maybe someone wants to implement this in the testing tool...

htot commented 1 year ago

422? This one SER_RS485_RX_DURING_TX - Full-duplex RS485 line.?

andy-shev commented 1 year ago

422? This one SER_RS485_RX_DURING_TX - Full-duplex RS485 line.?

It's a confusion in the Linux kernel. Some of the drivers use that to set RS422 compatibility in the registers of a certain hardware. But yes, RS485 in some cases can be full-duplex — needs two differential pairs, or the specific methods to communicate between peers on the physical level (I don't remember what Synopsis is ptoviding).

htot commented 1 year ago

I think the latter is a confusion by some manufacturers calling their RS422 a full-duplex RS485 (because they used RS485 drivers in the design).

What confused me even more is that their exists RS422 in a multiple slave configuration.