[solved] ttyS0 gets mangled

Moderator: dadolphs

Post Reply
bertc3p0
Posts: 327
Joined: 25.04.2012, 20:19
Location: near Frankfurt Germany

[solved] ttyS0 gets mangled

Post by bertc3p0 » 06.11.2015, 13:58

Hi,

I'm using Rocrail as headless server (BananaPi/CAN and Gleisbox) and ttyS0 as console for
debugging. I have one annoying problem: after starting Rocrail, the console (ttyS0) get mangled
and doesn't work aymore. The ttyS0 isn't configured to used by Rocrail - here an empty rocrail.ini as test:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<rocrail resetspfx="false">
  <ctrl/>
  <trace/>
  <digint lib="virtual" iid="vcs-1" restricted="false" stress="false" libpath="."/>
  <clock hour="13" minute="21"/>
  <tcp/>
  <anaopt/>
</rocrail>
but after starting rocrail, the console settings are changed (e.g. the speed):

Code: Select all

% stty -F /dev/ttyS0 speed
9600
% # starting rocrail and stopping
% stty -F /dev/ttyS0 speed
600
Rocrails log:

Code: Select all

% ./rocrail
   --
  / /  (_)__  __ ____  __
 / /__/ / _ \/ // /\ \/ /
/____/_/_//_/\_,_/ /_/\_\
--------------------------------------------------
                                            lll
                                        iii lll
                                            lll
 rrrrrr   ooooo   ccccc rrrrrr   aaaaaa iii lll
 rrr rrr ooo ooo ccc    rrr rrr aaa aaa iii lll
 rrr     ooo ooo ccc    rrr     aaa aaa iii lll
 rrr      ooooo   ccccc rrr      aaaaaa iii  lll
--------------------------------------------------
 TM and Copyright 2002-2015 Robert Jan Versluis.
 All Rights Reserved.
   r.j.versluis@rocrail.net
   http://www.rocrail.net
--------------------------------------------------
 Rocrail 10108 [a25bfee2396ab6ef179ba0cc1d067cb34bb36549]
 Build: Nov  6 2015 11:57:54
 librocs 2.0-0 build Nov  6 2015 11:57:50
 processid = 8152
20151106.134308.670 r9999W main     OSocket  0170 rocs_socket_mac( eth0 ): rc = -1, errno = 19
       mac = 0000000000000000
--------------------------------------------------
20151106.134308.670 r9999I main     OSystem  0545 no key
************************************************************************
* Rocrail runs entirely on volunteer labor.                            *
* However, Rocrail also needs contributions of money.                  *
* Your continued support is vital for keeping Rocrail available.       *
* If you already did support you can ask a key: supportkey@rocrail.net *
************************************************************************
20151106.134308.670 r9999I main     OApp     0979 dpIID = []
20151106.134308.670 r9999I main     OApp     0980 ptIID = []
20151106.134308.670 r9999I main     OApp     0981 svIID = []
20151106.134308.670 r9999I main     OApp     0982 lcIID = []
20151106.134308.670 r9999I main     OModel   0441 parsePlan file: plan.xml
20151106.134308.670 r9999I main     OAnalyse 10875 MRD[100] ExtChk: basic[1]c[0] block[1]c[0] route[1]c[0] action[1]c[0]
20151106.134308.670 r9999I main     OAnalyse 8469 checking plan health...
20151106.134308.670 r9999I main     OAnalyse 8902 Starting zlevel check
20151106.134308.670 r9999I main     OAnalyse 3621 zlevel check: 0 items
20151106.134308.670 r9999I main     OAnalyse 8939 objectmap is empty
20151106.134308.670 r9999I main     OAnalyse 8949 Plan is healthy
20151106.134308.670 r9999I main     OAnalyse 0192 cleaning up the ANALYSER...
20151106.134308.670 r9999I main     OAnalyse 0259 ANALYSER is cleaned up
20151106.134308.670 r9999I main     OModel   0505 parsePlan title: New Plan
20151106.134308.670 r9999I main     OModel   3827 init clearingMaps...
20151106.134308.671 r9999I main     OModel   3852 init creatingMaps...
20151106.134308.671 r9999I main     OModel   3856 init creatingFbAddrMap...
20151106.134308.671 r9999I main     OModel   2616 createFbAddrMap: size=0.
20151106.134308.671 r9999I main     OModel   3880 init creatingFbAddrMap...
20151106.134308.671 r9999I main     OModel   2638 createSwAddrMap: size=0.
20151106.134308.671 r9999I main     OModel   2659 createCoAddrMap: size=0.
20151106.134308.671 r9999I main     OModel   5767 loading occupancy file [occ.xml]
20151106.134308.671 r9999I main     OModel   3885 init blocks...
20151106.134308.671 r9999I main     OSerial  0222 open rc=0 read=0 write=0 [0] [OK]
20151106.134308.671 r9999I main     OSerial  0227 blocking[1] directIO[0]
20151106.134308.671 r9999I main     OSerial  0287 set bps to 600 (requested=0)
20151106.134308.671 r9999I main     OSerial  0222 open rc=2 read=-1 write=-1 [2] [No such file or directory]
20151106.134308.671 r9999I main     OSerial  0222 open rc=0 read=0 write=0 [0] [OK]
20151106.134308.671 r9999I main     OSerial  0227 blocking[1] directIO[0]
20151106.134308.671 r9999I main     OSerial  0287 set bps to 600 (requested=0)
20151106.134308.671 r9999I main     OSerial  0222 open rc=2 read=-1 write=-1 [2] [No such file or directory]
20151106.134308.671 r9999I main     OControl 2176 devices: "/dev/ttyS0,/dev/ttyS1,/dev/ttyUSB0"
20151106.134308.671 r9999I main     OControl 1751 initDigInts lib="virtual" idd="vcs-1"
20151106.134308.672 r9999I C9944740 OVirtual 0863 ----------------------------------------
20151106.134308.672 r9999I tick0197 OSystem  0101 Ticker thread has started.
20151106.134308.672 r9999I C9944740 OVirtual 0864 virtual 2.0.0
20151106.134308.672 r9999I C9944740 OVirtual 0865   IID: vcs-1
20151106.134308.672 r9999I C9944740 OVirtual 0866   reset sensors   : no
20151106.134308.672 r9999I C9944740 OVirtual 0867   sensor timer    : 200 ms
20151106.134308.672 r9999I C9944740 OVirtual 0868   sensor modules  : 0
20151106.134308.672 r9999I C9944740 OVirtual 0869   sensor offset   : 0
20151106.134308.672 r9999I C9944740 OVirtual 0870   protocol version: 0
20151106.134308.672 r9999I C9944740 OVirtual 0871 ----------------------------------------
Rorail changes the settings (ttyS0 seems to be used):

Code: Select all

20151106.134308.671 r9999I main     OSerial  0222 open rc=0 read=0 write=0 [0] [OK]
20151106.134308.671 r9999I main     OSerial  0227 blocking[1] directIO[0]
20151106.134308.671 r9999I main     OSerial  0287 set bps to 600 (requested=0)
even the port isn't configured to be used by Rocrail.

Does anybody have an idea, howto prohibit Rocrail confguring non used serial ports ?

Regards

Gerd
Last edited by bertc3p0 on 06.11.2015, 14:35, edited 1 time in total.

rjversluis
Site Admin
Posts: 42383
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: ttyS0 mangled

Post by rjversluis » 06.11.2015, 14:32

Hi Gerd,

just use the command line option -nodevcheck
http://wiki.rocrail.net/doku.php?id=rocrail-cmdln-en

bertc3p0
Posts: 327
Joined: 25.04.2012, 20:19
Location: near Frankfurt Germany

Re: ttyS0 mangled

Post by bertc3p0 » 06.11.2015, 14:36

Hi Rob,
rjversluis wrote:Hi Gerd,

just use the command line option -nodevcheck
http://wiki.rocrail.net/doku.php?id=rocrail-cmdln-en
that's beautiful working - many thx !

:rr_for_ever:

Regards

Gerd

Post Reply

Return to “Basic topics”