MikroTik RouterOS v2.9 Reference Manual page 643

Reference manual
Table of Contents

Advertisement

Flags: X - disabled
0
name="test" port=serial1 signal=cts on-condition=change log=no script=""
count=2 state=off
[admin@MikroTik] tool sigwatch> print detail
Flags: X - disabled
0
name="test" port=serial1 signal=cts on-condition=change log=no script=""
count=2 state=off
[admin@MikroTik] tool sigwatch>
In the port menu you can see what signal is used by serial cable. For example, without any cables it
looks like this:
[admin@MikroTik] port> print stats
0 name="serial0" line-state=dtr,rts
1 name="serial1" line-state=dtr,rts
[admin@MikroTik] port>
But after adding a serial cable to the serial port:
[admin@MikroTik] port> print stats
0 name="serial0" line-state=dtr,rts
1 name="serial1" line-state=dtr,rts,cts
[admin@MikroTik] port>
This means that the line-state besides the dtr and rts signals has also cts when a serial cable is
connected.
The example below will execute a script whenever on-condition changes to off:
[admin@10.MikroTik] tool sigwatch> pr detail
Flags: X - disabled
0
name="cts_rest" port=serial1 signal=cts on-condition=off log=no
script=/system shutdown count=0 state=on
[admin@10.MikroTik] tool sigwatch>
It means that if a serial cable is connected to the serial port, all works fine, but as soon as it is
disconnected, the router shuts down. It will continue all the time until the serial cable will not be
connected again.
Copyright 1999-2007, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.
Page 629 of 695

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents