<code c serial-tcp-broadcast.are>
/* DESC: This script reads messages coming from the serial port and forwards them via TCP to remote hosts (and vice versa).
* Copyright (C) 2014 NetModule AG, Switzerland
*
* Usage: usage: serial-tcp-broadcast.are <remote-ip-1> <remote-ip-2> .... <remote-ip-n>
* Version: 2.0
*
*/
โ
/*
* Options to configure by user
*/
โ
/* Serial Baud Rate 9600, 19200, 38400, 57600, 115200 */
SER_SPEED = 115200;
/* number of data bits (5, 6, 7, 8) */
SER_DATABIT = 8;
/* number of stop bits (1, 2) */
SER_STOPBIT = 1;
/* parity (0=no parity, 1=odd parity, 2=even parity) */
SER_PARITY = 0;
/* flow control (0=none, 1=xon/xoff, 2=hardware) */
SER_FLOW = 0;
/* name of the Serial Interface */
DEV = "SERIAL1";
DEVIDX = ((int) substr(DEV, 6, 1)) - 1;
โ