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
177 views 0 comments
by anonymous
Hello,

Can you give me the CLI commands to enable the RS232 port with these parameters:

Name : test
Device : rs232
Baud rate : 9600
Data bits : 8
Stop bits : 1
Parity : Even
Flow control : None
Mode : server
Protocol : TCP
Port : 5004

Best regard

1 Answer

0 votes
by anonymous

Hello,

Thank you for reaching out!

In order to create an RS232 OverIP instance using the command line with your pre-defined settings, these commands should be used:

uci set rs_overip.1=overip
uci set rs_overip.1.device='/dev/rs232'
uci set rs_overip.1.name='test'
uci set rs_overip.1.raw='0'
uci set rs_overip.1.protocol='0'               0 - TCP, 1 - UDP
uci set rs_overip.1.flowcontrol='none'
uci set rs_overip.1.always_reconnect='0'
uci set rs_overip.1.tcp_echo_enabled='0'
uci set rs_overip.1.baudrate='9600'
uci set rs_overip.1.mode='server'
uci set rs_overip.1.max_clients='32'
uci set rs_overip.1.parity='even'
uci set rs_overip.1.timeout='300'
uci set rs_overip.1.stopbits='1'
uci set rs_overip.1.no_leading_zeros='0'
uci set rs_overip.1.echo_enabled='0'
uci set rs_overip.1.databits='8'
uci set rs_overip.1.enabled='1'
uci set rs_overip.1.port_listen='5004'
uci commit rs_overip

You might have noticed, that there are more settings than listed in the query, however, these are all required.

If there already are some RS instances created, then number 1 needs to be changed to [number_of_last_instance]+1

NOTE: these settings apply to RutOS versions from v7.3 onwards.

Best regards,
DaumantasG