10512 questions

12517 answers

19444 comments

22040 members

0 votes
169 views 0 comments
by

Dear Teltonika Forum,

i try to implement a custom script that can read and write data over the serial RS232 port.
First i implemented my script on an RUT955. The script works well on that platform.
Next i tried the same with an TRB142. Here i can read data, but at writing data there are unwanted \n Bytes at the tx.

My Hardware:

RUT955 at FW: RUT9_R_00.07.01.1
RS232 Configuration (for the default functions) is set to disabled (to allow my script to work by its own). Is that right?
root@Teltonika-RUT955:~# stty -F /dev/ttyACM0 -a
speed 9600 baud;stty: /dev/ttyACM0
 line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc

TRB142 at FW: TRB1_R_00.07.00.1
RS232 Configuration (for the default functions) is set to disabled (to allow my script to work by its own). Is that right?
root@Teltonika-TRB142:~# stty -F /dev/ttyHS0 -a
speed 9600 baud;stty: /dev/ttyHS0
 line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc

To keep it simple, i try to write some simple Data to the /dev/tty :

RUT955
echo "Hello, World!" > /dev/ttyACM0

The communication on the RUT955 looks like expected.

TRB142
echo "Hello, World!" > /dev/ttyHS


On the TRB142 the default voltage level on the tx line is different in comparison to the RUT955 and therefore the receiver misinterprets the received data.
Is it possible to get the same behavior from the RUT955 on the TRB142?

Thanks for reading.
Greetings
Florian

1 Answer

0 votes
by
Hi,

Unfortunately, we do not have examples / instructions for programming / developing additional features.