bidib BusAufgleisrichtungBoosterGBMFeaturesRailcomMobaLiStXpressNetDebugLizenz
Pfad: mknetz/Eisenbahn/Digital/bidib
Impressum
Autor: Klaus Merkert
Letzte Änderung dieser Seite: 04.01.2019 12:36:57 374
Debug

Installation von interceptty und Herunterladen von bidibmsg.py

~$ sudo apt install build-essential
~$ sudo apt install git
~$ git clone https://github.com/geoffmeyers/interceptty
~$ cd interceptty/
~/interceptty$ ./configure
~/interceptty$ make
~/interceptty$ sudo make install
~/interceptty$ cd ..
~$ git clone https://github.com/KlausMerkert/bidibmsg
~$ cd bidibmsg
~/bidibmsg$

Nicht vergessen, das Skript bidibmsg.py ausführbar zu machen.

interceptty/bidibmsg.py anwenden

~/bidibmsg$ sudo interceptty -s 'ispeed 115200 ospeed 115200' /dev/ttyUSB0 /dev/rr | ./bidibmsg.py

Es wird davon ausgegangen, dass das Terminal, das zuerst geöffnete ist, benutzt wird und dass der bidib-Master an ttyUSB0 hängt. Jetzt in der rocrail.ini in <digint iid="bidib" .. ttyUSB0 durch pts/1 austauschen und Rocrail starten.

Beispiel-Log

Es werden die Nachrichten MSG_BM_SPEED, MSG_CS_STATE, MSG_CS_SET_STATE, MSG_BM_DYN_STATE mit einer Nummer aus msgex = {0xa6,0xe1,0x62,0xaa} ausgefiltert. Zur Änderung muss der Quelltext von bidibmsg.py geändert werden.

2019-01-04 11:53:17.430818 < 07000018358b44c1  0x18 MSG_SYS_CLOCK 11:53, Freitag, 1
2019-01-04 11:53:17.450913 < 03000001  0x01 MSG_SYS_GET_MAGIC
2019-01-04 11:53:17.457726 >          05000081feaf  0x81 MSG_SYS_MAGIC 1:0xFE 2:0xAF
2019-01-04 11:53:17.471078 < 03000009  0x09 MSG_SYS_RESET
2019-01-04 11:53:18.472506 < 0300000b  0x0b MSG_NODETAB_GETALL
2019-01-04 11:53:18.481884 >          0400008800  0x88 NODETAB_COUNT 0
2019-01-04 11:53:18.603685 < 0300000b  0x0b MSG_NODETAB_GETALL
2019-01-04 11:53:18.609885 >          0400018802  0x88 NODETAB_COUNT 2
2019-01-04 11:53:18.623760 < 0300000c  0x0c MSG_NODETAB_GETNEXT
2019-01-04 11:53:18.641850 >          0c0002890200da000d680097ee  0x89 MSG_NODETAB version: 2 local: 0 class: 11011010 0 vid: 0d pid: 680097ee
2019-01-04 11:53:18.654169 < 03000006  0x06 MSG_SYS_GET_SW_VERSION
2019-01-04 11:53:18.654322 < 0c000064000000000000000000  0x64 MSG_CS_DRIVE 0, 14, 000000, rev, 0, 0 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:53:18.654482 < 0400011265  0x12 MSG_FEATURE_GET FEATURE_GEN_WATCHDOG
2019-01-04 11:53:18.654681 < 03000332  0x32 MSG_BOOST_QUERY
2019-01-04 11:53:18.654769 < 050004190000  0x19 MSG_STRING_GET 0 0
2019-01-04 11:53:18.654862 < 050005190001  0x19 MSG_STRING_GET 0 1
2019-01-04 11:53:18.654957 < 04000612fe  0x12 MSG_FEATURE_GET FEATURE_FW_UPDATE_MODE
2019-01-04 11:53:18.655050 < 03000703  0x03 MSG_SYS_ENABLE
2019-01-04 11:53:18.655133 < 0300080c  0x0c MSG_NODETAB_GETNEXT
2019-01-04 11:53:18.657844 >          06000385030402  0x85 MSG_SYS_SW_VERSION 4.3.2
2019-01-04 11:53:18.679023 >          060004e2000001  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:53:18.679198 >          050005906514  0x90 MSG_FEATURE FEATURE_GEN_WATCHDOG 20
2019-01-04 11:53:18.679429 >          040007b000  0xb0 MSG_BOOST_STAT 0x0 BIDIB_BST_STATE_OFF
2019-01-04 11:53:18.679582 >          090008b2000901a70219  0xb2 MSG_BOOST_DIAGNOSTIC 9mA 16.7V 25°C
2019-01-04 11:53:18.679816 >          1500099500000f47424d426f6f7374204d6173746572  0x95 MSG_STRING 0 0 15 'GBMBoost Master'
2019-01-04 11:53:18.679985 >          06000a95000100  0x95 MSG_STRING 0 1 0 ''
2019-01-04 11:53:18.680129 >          04000b91fe  0x91 MSG_FEATURE_NA FEATURE_FW_UPDATE_MODE
2019-01-04 11:53:18.680292 >          0c000c89020105000d6b00d2ec  0x89 MSG_NODETAB version: 2 local: 1 class: 00000101 0 vid: 0d pid: 6b00d2ec
2019-01-04 11:53:18.680457 >          06000da9000101  0xa9 MSG_BM_CONFIDENCE void: 0 freeze: 1 nosignal: 1
2019-01-04 11:53:18.694491 < 03000911  0x11 MSG_FEATURE_GETNEXT
2019-01-04 11:53:18.694652 < 0401000006  0x06 MSG_SYS_GET_SW_VERSION
2019-01-04 11:53:18.694758 < 050100001232  0x12 MSG_FEATURE_GET FEATURE_CTRL_INPUT_COUNT
2019-01-04 11:53:18.694843 < 050100011246  0x12 MSG_FEATURE_GET FEATURE_CTRL_PORT_FLAT_MODEL
2019-01-04 11:53:18.694927 < 06010002190000  0x19 MSG_STRING_GET 0 0
2019-01-04 11:53:18.695012 < 06010003190001  0x19 MSG_STRING_GET 0 1
2019-01-04 11:53:18.695097 < 0501000412fe  0x12 MSG_FEATURE_GET FEATURE_FW_UPDATE_MODE
2019-01-04 11:53:18.695171 < 03000a0c  0x0c MSG_NODETAB_GETNEXT
2019-01-04 11:53:18.720891 >          04000e91ff  0x91 MSG_FEATURE_NA FEATURE_EXTENSION
2019-01-04 11:53:18.721045 >          0701000085030301  0x85 MSG_SYS_SW_VERSION 3.3.1
2019-01-04 11:53:18.721159 >          06010001903208  0x90 MSG_FEATURE FEATURE_CTRL_INPUT_COUNT 8
2019-01-04 11:53:18.721262 >          050100029146  0x91 MSG_FEATURE_NA FEATURE_CTRL_PORT_FLAT_MODEL
2019-01-04 11:53:18.721363 >          04000f8bff  0x8b MSG_NODE_NA node: 255
Multimessage:              >          150100039500000e4c69676874436f6e74726f6c20310801000495000101200601000590fdde018a  3
2019-01-04 11:53:18.721623 >          150100039500000e4c69676874436f6e74726f6c2031  0x95 MSG_STRING 0 0 14 'LightControl 1'
2019-01-04 11:53:18.721674 >          080100049500010120  0x95 MSG_STRING 0 1 1 ' '
2019-01-04 11:53:18.721704 >          0601000590fe01  0x90 MSG_FEATURE FEATURE_FW_UPDATE_MODE 1
2019-01-04 11:53:18.735059 < 0401000503  0x03 MSG_SYS_ENABLE
2019-01-04 11:53:18.744986 < 050100064300  outdated 0x43 MSG_LC_KEY_QUERY 0
2019-01-04 11:53:18.745094 < 050100074301  outdated 0x43 MSG_LC_KEY_QUERY 1
2019-01-04 11:53:18.745170 < 050100084302  outdated 0x43 MSG_LC_KEY_QUERY 2
2019-01-04 11:53:18.745264 < 050100094303  outdated 0x43 MSG_LC_KEY_QUERY 3
2019-01-04 11:53:18.745340 < 0501000a4304  outdated 0x43 MSG_LC_KEY_QUERY 4
2019-01-04 11:53:18.745421 < 0501000b4305  outdated 0x43 MSG_LC_KEY_QUERY 5
2019-01-04 11:53:18.745526 < 0501000c4306  outdated 0x43 MSG_LC_KEY_QUERY 6
2019-01-04 11:53:18.745629 < 0501000d4307  outdated 0x43 MSG_LC_KEY_QUERY 7
2019-01-04 11:53:18.745709 < 0401000e11  0x11 MSG_FEATURE_GETNEXT
2019-01-04 11:53:18.752752 >          06010006c30000  outdated 0xc3 MSG_LC_KEY 0 0
Multimessage:              >          06010007c3010006010008c3020041  2
2019-01-04 11:53:18.752884 >          06010007c30100  outdated 0xc3 MSG_LC_KEY 1 0
2019-01-04 11:53:18.752908 >          06010008c30200  outdated 0xc3 MSG_LC_KEY 2 0
2019-01-04 11:53:18.753011 >          06010009c30300  outdated 0xc3 MSG_LC_KEY 3 0
2019-01-04 11:53:18.755416 < 0401000f11  0x11 MSG_FEATURE_GETNEXT
Multimessage:              >          0601000ac304000601000bc30500f5  2
2019-01-04 11:53:18.768957 >          0601000ac30400  outdated 0xc3 MSG_LC_KEY 4 0
2019-01-04 11:53:18.769005 >          0601000bc30500  outdated 0xc3 MSG_LC_KEY 5 0
2019-01-04 11:53:18.769177 >          0601000cc30600  outdated 0xc3 MSG_LC_KEY 6 0
Multimessage:              >          0601000dc307000501000e91ffd8  2
2019-01-04 11:53:18.769281 >          0601000dc30700  outdated 0xc3 MSG_LC_KEY 7 0
2019-01-04 11:53:18.769305 >          0501000e91ff  0x91 MSG_FEATURE_NA FEATURE_EXTENSION
2019-01-04 11:53:18.769426 >          0501000f91ff  0x91 MSG_FEATURE_NA FEATURE_EXTENSION
2019-01-04 11:54:00.442546 < 07000b18368b44c1  0x18 MSG_SYS_CLOCK 11:54, Freitag, 1
2019-01-04 11:54:58.719164 >          040011b080  0xb0 MSG_BOOST_STAT 0x80 BIDIB_BST_STATE_ON
2019-01-04 11:54:59.503216 >          060012a3000000  0xa3 MSG_BM_ADDRESS 0 rev 0 
2019-01-04 11:54:59.503433 >          060013a3010000  0xa3 MSG_BM_ADDRESS 1 rev 0 
2019-01-04 11:54:59.503598 >          060014a3020000  0xa3 MSG_BM_ADDRESS 2 rev 0 
2019-01-04 11:54:59.503746 >          060015a3030000  0xa3 MSG_BM_ADDRESS 3 rev 0 
2019-01-04 11:54:59.503890 >          060016a3040000  0xa3 MSG_BM_ADDRESS 4 rev 0 
2019-01-04 11:54:59.504034 >          060017a3050000  0xa3 MSG_BM_ADDRESS 5 rev 0 
2019-01-04 11:54:59.525211 >          060018a3060000  0xa3 MSG_BM_ADDRESS 6 rev 0 
2019-01-04 11:54:59.525346 >          060019a3070000  0xa3 MSG_BM_ADDRESS 7 rev 0 
2019-01-04 11:54:59.525438 >          06001aa3080000  0xa3 MSG_BM_ADDRESS 8 rev 0 
2019-01-04 11:54:59.525549 >          06001ba3090000  0xa3 MSG_BM_ADDRESS 9 rev 0 
2019-01-04 11:54:59.525631 >          06001ca30a0000  0xa3 MSG_BM_ADDRESS 10 rev 0 
2019-01-04 11:54:59.525717 >          06001da30b0000  0xa3 MSG_BM_ADDRESS 11 rev 0 
2019-01-04 11:54:59.525820 >          06001ea30c0000  0xa3 MSG_BM_ADDRESS 12 rev 0 
2019-01-04 11:54:59.525907 >          06001fa30d0000  0xa3 MSG_BM_ADDRESS 13 rev 0 
2019-01-04 11:54:59.525994 >          060020a30e0000  0xa3 MSG_BM_ADDRESS 14 rev 0 
2019-01-04 11:54:59.526082 >          060021a30f0000  0xa3 MSG_BM_ADDRESS 15 rev 0 
2019-01-04 11:54:59.541146 >          060022a9000000  0xa9 MSG_BM_CONFIDENCE void: 0 freeze: 0 nosignal: 0
2019-01-04 11:55:00.455269 < 07000e18378b44c1  0x18 MSG_SYS_CLOCK 11:55, Freitag, 1
2019-01-04 11:55:33.535555 < 0c002364660802018d00000000  0x64 MSG_CS_DRIVE 2150, 28, 000001, fwd, 3, 0 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:55:33.551223 >          060038e2660801  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:55:33.583216 >          06003aa3016688  0xa3 MSG_BM_ADDRESS 1 fwd 2150 
2019-01-04 11:55:35.679151 >          040046a000  0xa0 MSG_BM_OCC 0
2019-01-04 11:55:35.679338 >          060047a3006688  0xa3 MSG_BM_ADDRESS 0 fwd 2150 
2019-01-04 11:55:35.698242 < 0400262200  0x22 MSG_BM_MIRROR_OCC 0
2019-01-04 11:55:39.358866 < 0c002964660802018000000000  0x64 MSG_CS_DRIVE 2150, 28, 000001, fwd, 0, 0 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:55:39.374175 >          06005be2660801  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:55:39.598424 >          06005ea3010000  0xa3 MSG_BM_ADDRESS 1 rev 0 
2019-01-04 11:55:40.046276 >          040060a101  0xa1 MSG_BM_FREE 1
2019-01-04 11:55:40.056131 < 04002a2301  0x23 MSG_BM_MIRROR_FREE 1
2019-01-04 11:55:40.865105 < 0c002c64660802010000000000  0x64 MSG_CS_DRIVE 2150, 28, 000001, rev, 0, 0 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:55:40.878176 >          060063e2660801  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:55:41.673438 < 0c002d64660802010000000000  0x64 MSG_CS_DRIVE 2150, 28, 000001, rev, 0, 0 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:55:41.678129 >          060065e2660801  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:55:41.683543 < 0c002e64660802010000000000  0x64 MSG_CS_DRIVE 2150, 28, 000001, rev, 0, 0 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:55:41.693719 < 0c002f646608023e0010000000  0x64 MSG_CS_DRIVE 2150, 28, 111110, rev, 0, 1 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:55:41.694366 >          060066e2660801  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:55:41.710193 >          060067e2660801  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:55:43.695540 < 0c003264660802010d00000000  0x64 MSG_CS_DRIVE 2150, 28, 000001, rev, 3, 0 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:55:43.709422 >          06006de2660801  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:55:45.517280 >          040078a001  0xa0 MSG_BM_OCC 1
2019-01-04 11:55:45.517518 >          060079a3016688  0xa3 MSG_BM_ADDRESS 1 fwd 2150 
2019-01-04 11:55:45.534834 < 0400342201  0x22 MSG_BM_MIRROR_OCC 1
2019-01-04 11:55:49.404211 >          06008ea3000000  0xa3 MSG_BM_ADDRESS 0 rev 0 
2019-01-04 11:55:49.900221 >          040093a100  0xa1 MSG_BM_FREE 0
2019-01-04 11:55:49.910596 < 0400382300  0x23 MSG_BM_MIRROR_FREE 0
2019-01-04 11:55:50.572138 >          040096a002  0xa0 MSG_BM_OCC 2
2019-01-04 11:55:50.597682 < 0400392202  0x22 MSG_BM_MIRROR_OCC 2
2019-01-04 11:55:50.684126 >          060099a3026688  0xa3 MSG_BM_ADDRESS 2 fwd 2150 
2019-01-04 11:55:52.022704 < 0c003b64660802010000000000  0x64 MSG_CS_DRIVE 2150, 28, 000001, rev, 0, 0 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:55:52.028203 >          06009fe2660801  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:55:58.346867 < 0c004064660802010d00000000  0x64 MSG_CS_DRIVE 2150, 28, 000001, rev, 3, 0 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:55:58.363210 >          0600b1e2660801  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:56:00.468310 < 07004218388b44c1  0x18 MSG_SYS_CLOCK 11:56, Freitag, 1
2019-01-04 11:56:01.155671 < 0c004464660802010000000000  0x64 MSG_CS_DRIVE 2150, 28, 000001, rev, 0, 0 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:56:01.162258 >          0600bee2660801  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:56:01.402419 >          0600c1a3010000  0xa3 MSG_BM_ADDRESS 1 rev 0 
2019-01-04 11:56:01.898302 >          0400c3a101  0xa1 MSG_BM_FREE 1
2019-01-04 11:56:01.904055 < 0400452301  0x23 MSG_BM_MIRROR_FREE 1
2019-01-04 11:56:03.270459 < 0c004764660802018000000000  0x64 MSG_CS_DRIVE 2150, 28, 000001, fwd, 0, 0 0000, 0000 0000, 0000 0000, 0000 0000
2019-01-04 11:56:03.274129 >          0600c7e2660801  e2 MSG_CS_DRIVE_ACK
2019-01-04 11:56:20.639961 < 03005404  0x04 MSG_SYS_DISABLE

Links