uniba-swt / libbidib

A library for communication with a BiDiB (www.bidib.org) system using a serial connection.
GNU General Public License v3.0
10 stars 4 forks source link

"No train configured for..." message when placing train on tracks in right orientation #13

Closed BLuedtke closed 2 years ago

BLuedtke commented 2 years ago

When placing a train on the tracks with right orientation, we get a libbidib error message that looks as follows: libbidib: No train configured for dcc address 0x01 0x80 Driving the train (i.e. setting a speed) still works as expected.

When placing the same train with left orientation, this does not occur.

eyip002 commented 2 years ago

This occurs on the SWTbahn Full platform, but does not happen on the SWTbahn Standard platform. This error is probably because the SWTbahn Full are using newer bidib firmware that sends out an unrecognised serial message.

BLuedtke commented 2 years ago

Lower level log (excerpt):

Jul 27 10:30:13 raspberrypi3 swtbahn: libbidib: Received from: 0x0b 0x00 0x00 0x00 seq: 114 type: MSG_LC_STAT (0xc0) action id: 0
Jul 27 10:30:13 raspberrypi3 swtbahn: libbidib: Message bytes: 0x07 0x0b 0x00 0x72 0xc0 0x22 0x00 0x00

Jul 27 10:30:13 raspberrypi3 swtbahn: libbidib: Received from: 0x0a 0x00 0x00 0x00 seq: 55 type: MSG_LC_STAT (0xc0) action id: 0
Jul 27 10:30:13 raspberrypi3 swtbahn: libbidib: Message bytes: 0x07 0x0a 0x00 0x37 0xc0 0x23 0x00 0x00

Jul 27 10:30:13 raspberrypi3 swtbahn: libbidib: Received from: 0x08 0x00 0x00 0x00 seq: 49 type: MSG_LC_STAT (0xc0) action id: 0
Jul 27 10:30:13 raspberrypi3 swtbahn: libbidib: Message bytes: 0x07 0x08 0x00 0x31 0xc0 0x23 0x00 0x00

Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Received from: 0x00 0x00 0x00 0x00 seq: 107 type: MSG_BOOST_DIAGNOSTIC (0xb2) action id: 0
Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Message bytes: 0x09 0x00 0x6b 0xb2 0x00 0x42 0x01 0x96 0x02 0x16

Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Received from: 0x07 0x00 0x00 0x00 seq: 110 type: MSG_BOOST_DIAGNOSTIC (0xb2) action id: 0
Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Message bytes: 0x0a 0x07 0x00 0x6e 0xb2 0x00 0x3a 0x01 0x98 0x02 0x15

Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Received from: 0x00 0x00 0x00 0x00 seq: 108 type: MSG_BM_DYN_STATE (0xaa) action id: 0
Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Message bytes: 0x08 0x00 0x6c 0xaa 0x09 0x01 0x80 0x01 0x05
Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: No train configured for dcc address 0x01 0x80

Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Received from: 0x0b 0x00 0x00 0x00 seq: 115 type: MSG_LC_STAT (0xc0) action id: 0
Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Message bytes: 0x07 0x0b 0x00 0x73 0xc0 0x22 0x00 0x01

Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Received from: 0x0a 0x00 0x00 0x00 seq: 56 type: MSG_LC_STAT (0xc0) action id: 0
Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Message bytes: 0x07 0x0a 0x00 0x38 0xc0 0x23 0x00 0x01

Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Received from: 0x08 0x00 0x00 0x00 seq: 50 type: MSG_LC_STAT (0xc0) action id: 0
Jul 27 10:30:14 raspberrypi3 swtbahn: libbidib: Message bytes: 0x07 0x08 0x00 0x32 0xc0 0x23 0x00 0x01

Jul 27 10:30:15 raspberrypi3 swtbahn: libbidib: Received from: 0x00 0x00 0x00 0x00 seq: 109 type: MSG_BOOST_DIAGNOSTIC (0xb2) action id: 0
Jul 27 10:30:15 raspberrypi3 swtbahn: libbidib: Message bytes: 0x09 0x00 0x6d 0xb2 0x00 0x43 0x01 0x96 0x02 0x15

Jul 27 10:30:15 raspberrypi3 swtbahn: libbidib: Received from: 0x07 0x00 0x00 0x00 seq: 111 type: MSG_BOOST_DIAGNOSTIC (0xb2) action id: 0
Jul 27 10:30:15 raspberrypi3 swtbahn: libbidib: Message bytes: 0x0a 0x07 0x00 0x6f 0xb2 0x00 0x3e 0x01 0x97 0x02 0x15

Jul 27 10:30:15 raspberrypi3 swtbahn: libbidib: Received from: 0x00 0x00 0x00 0x00 seq: 110 type: MSG_BM_DYN_STATE (0xaa) action id: 0
Jul 27 10:30:15 raspberrypi3 swtbahn: libbidib: Message bytes: 0x08 0x00 0x6e 0xaa 0x09 0x01 0x80 0x01 0x00
Jul 27 10:30:15 raspberrypi3 swtbahn: libbidib: No train configured for dcc address 0x01 0x80
eyip002 commented 2 years ago

Ignore orientation bit in DCC address when finding train data. Fixed in branch bidib_messages.