05.01.2015 Views

MikroTik RouterOS™ v2.9

MikroTik RouterOS™ v2.9

MikroTik RouterOS™ v2.9

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Flags: X - disabled<br />

0 name="test" port=serial1 signal=cts on-condition=change log=no script=""<br />

count=2 state=off<br />

[admin@<strong>MikroTik</strong>] tool sigwatch> print detail<br />

Flags: X - disabled<br />

0 name="test" port=serial1 signal=cts on-condition=change log=no script=""<br />

count=2 state=off<br />

[admin@<strong>MikroTik</strong>] tool sigwatch><br />

In the port menu you can see what signal is used by serial cable. For example, without any cables it<br />

looks like this:<br />

[admin@<strong>MikroTik</strong>] port> print stats<br />

0 name="serial0" line-state=dtr,rts<br />

1 name="serial1" line-state=dtr,rts<br />

[admin@<strong>MikroTik</strong>] port><br />

But after adding a serial cable to the serial port:<br />

[admin@<strong>MikroTik</strong>] port> print stats<br />

0 name="serial0" line-state=dtr,rts<br />

1 name="serial1" line-state=dtr,rts,cts<br />

[admin@<strong>MikroTik</strong>] port><br />

This means that the line-state besides the dtr and rts signals has also cts when a serial cable is<br />

connected.<br />

The example below will execute a script whenever on-condition changes to off:<br />

[admin@10.<strong>MikroTik</strong>] tool sigwatch> pr detail<br />

Flags: X - disabled<br />

0 name="cts_rest" port=serial1 signal=cts on-condition=off log=no<br />

script=/system shutdown count=0 state=on<br />

[admin@10.<strong>MikroTik</strong>] tool sigwatch><br />

It means that if a serial cable is connected to the serial port, all works fine, but as soon as it is<br />

disconnected, the router shuts down. It will continue all the time until the serial cable will not be<br />

connected again.<br />

Page 549 of 615<br />

Copyright 1999-2005, <strong>MikroTik</strong>. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.<br />

Other trademarks and registred trademarks mentioned herein are properties of their respective owners.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!