FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
919 views 2 comments
by

Hello,

I experimented with the RS-232 port of RUT955. We intend to use the handshake lines for some extra I/O (driving LEDs, reading switches) in our application.

https://wiki.teltonika.lt/view/RUT955_RS232/RS485#RS232_Connector_Pinout

I compiled a test program making standard ioctl calls (TIOCMGET, TIOCMSET) to opened ttyACM0 fd.

My results:

  1. The handshake line control bits are "DTE side": to change state of pin 6 (DSR) of the connector, bit TIOCM_DTR must be toggled, same for pin 8 (CTS) = bit TIOCM_RTS
  2. To read pin 7 (RTS) one must check bit TIOCM_CAR (=TIOCM_CD) instead of expected TIOCM_CTS.
  3. Pin 1 (DCD) does not change state when toggling any TIOCM_* bit, it is always at positive voltage.

Is this expected behavior?

I can live with points 1 and 2, but point 3 is problematic - is there any way to change DCD pin state?

With it (and the extra output at power connector) we have just right amount of I/O for our application, not requiring any extra hardware...

1 Answer

0 votes
by anonymous

Hi,

First of all our router is DCE type RS232 device. For this reason first two points might look incorrect, since these control bits "DTE side".

Talking about third point, DCD pin in RUT955 can be controlled with gpio.sh command. For example to invert DCD pin state use command gpio.sh invert SDCS. More info about this command check in terminal with command gpio.sh -h

Best answer
by
Thanks! DCD control via SDCS GPIO pin worked.
by anonymous

The bit for reading RTS signal (my point 2 above) seems to have changed in newer hardware, revision 2017 (batch 116).

Now reading TIOCM_CAR no longer works but TIOCM_CTS does instead.

Using the same firmware as before, 06.05.3

Shouldn't there have been a PCN about this?