Using serial port to command a relay

Hi, im wondering if is there any way to use the serial port to control an electronic board to turn on or turn off other thing.

The idea is use the out pin (TXD, DTR and CTS) to control. I need a high state (bit 1) on those pin and them i’ll take the signal to control some thing.

Today i’m using LED signal, but this is a problem , becouse when i reboot my routerboad the leds turn on


Thanks.

you can use those pins on the serial port. you just cant use them on many routerboards since they are not hooked up.

[@cip-office] /port> set 0 dtr=off
[@cip-office] /port> set 0 dtr=on


– List of item numbers
baud-rate – Baud rate (bits/s)
data-bits – Number of bits for data
dtr –
flow-control – Type of flow control
name – New port name
parity – Parity
rts –
stop-bits – Number of bits for control

if i connect a LED on pin 4(DTS) and pin 5 (GND). how can i make turn on?

I’m trying to do this

/port set 0 dtr=on
/port set 0 dtr=off

but i can’t see output voltage on this pin (4), why?

are you using a routerboard or x86? routerboards do not have those pins active … i think i mentioned that below.

yes, i’m using RB450

serial ports on routerboards are not complete. you should be able to use some of the user leds - like user 4 or 5 i think.