srcp issue

Moderator: Moderators

srcp issue

Postby Richard-TX » 13.04.2013, 14:45

Condition:

srcpd is running on a separate Linux server
Rocrail is configured to talk srcp
two devices are configured to use srcp

If the srcpd process is stopped and restarted on the Linux server, rocrail goes into an infiinte loop trying to reconnect. Rocrail says "...0491 Try to reconnect" once a second.

What Rocrail does not do is to try to reinit the communications with the srcpd daemon with a "SET PROTOCOL SRCP 0.8"...."GO" sequence.

It might be best to just re-init the conversation instead of just reconnect.

What do you think Rob?
Last edited by Richard-TX on 14.04.2013, 05:47, edited 2 times in total.
Richard-TX
 

Postby Richard-TX » 13.04.2013, 15:03

More info.


While the srcpd process is stopped Rocrail says:


20130413.085844.843 r9999E ddlfb00F OSRCP 0491 Try to reconnect...
20130413.085846.031 r9999E ddlfb00F OSocket 0330 connect(rocpi:4303) failed [10
061]
20130413.085846.031 r9999E ddlfb00F OSocket 0601 recv() failed [10057] size=1 r
ead=0
20130413.085846.031 r9999E ddlfb00F OSRCP 0491 Try to reconnect...

.
.
.


When the srcpd process has been restarted Rocrail says this:

20130413.085848.328 r9999E ddlfb00F OSRCP 0491 Try to reconnect...
20130413.085849.328 r9999E ddlfb00F OSRCP 0491 Try to reconnect...
20130413.085850.328 r9999E ddlfb00F OSRCP 0491 Try to reconnect...
20130413.085851.328 r9999E ddlfb00F OSRCP 0491 Try to reconnect...
.

.
.
Richard-TX
 

Postby Richard-TX » 14.04.2013, 05:52

I tried version 5001. Much better but there is a small problem.

20130413.234826.671 r9999E ddlfb010 OSRCP 0492 Try to reconnect...
20130413.234827.671 r9999E ddlfb010 OSRCP 0492 Try to reconnect...
20130413.234828.671 r9999c ddlfb010 OSRCP 0180 FB Connected
20130413.234828.671 r9999c ddlfb010 OSRCP 0183 srcpd V2.1.2; SRCP 0.8.4; SRCP
OTHER 0.8.3

20130413.234828.671 r9999c ddlfb010 OSRCP 0192 SET PROTOCOL SRCP 0.8

20130413.234828.671 r9999c ddlfb010 OSRCP 0205 SET CONNECTIONMODE SRCP INFO

20130413.234828.671 r9999c ddlfb010 OSRCP 0218 GO

20130413.234828.906 r9999c ddlfb010 OSRCP 0432 sensor 0 = 0
20130413.234828.906 r9999a 0000095C OModel 3187 Sensor event: 0:0
20130413.234828.906 r9999a 0000095C OModel 3201 unregistered sensor event: 0_0
_srcp OFF
20130413.234828.906 r9999c ddlfb010 OSRCP 0432 sensor 0 = 0
20130413.234828.906 r9999a 0000095C OModel 3187 Sensor event: 0:0
20130413.234828.906 r9999a 0000095C OModel 3201 unregistered sensor event: 0_0
_srcp OFF
20130413.234828.937 r9999c ddlfb010 OSRCP 0432 sensor 0 = 0
20130413.234828.937 r9999a 0000095C OModel 3187 Sensor event: 0:0
20130413.234828.937 r9999a 0000095C OModel 3201 unregistered sensor event: 0_0
_srcp OFF
20130413.234828.937 r9999c ddlfb010 OSRCP 0432 sensor 0 = 0
20130413.234828.937 r9999a 0000095C OModel 3187 Sensor event: 0:0
20130413.234828.937 r9999a 0000095C OModel 3201 unregistered sensor event: 0_0
_srcp OFF
20130413.234841.593 r9999a cmdr01AE OLoc 2341 <lc id="srcp-loco" V="20" fn="
false" dir="true" server="infw01AE26F4"/>

20130413.234841.593 r9999a cmdr01AE OLoc 1218 Sending command...V=20
20130413.234841.593 r9999c 000016D8 OSRCP08 0452 sent: SET 2 GL 10 1 20 100 0 0
0 0 0 0 0 0 0 0 0 0 0

20130413.234841.593 r9999E 000016D8 OSocket 0601 recv() failed [10053] size=1 r
ead=0
20130413.234841.593 r9999E 000016D8 OSRCP08 0457 SendCommand: could not read response
Richard-TX
 

Postby Richard-TX » 14.04.2013, 06:09

One more thing Rob,

After restarting the srcpd daemon and after the init string is sent after a restart of srcpd, nothing else is sent to the srcp server. Rocrail seems to think that a message has been sent but cannot read the response. No message is actually sent.

Do you want an annotated packet trace?
Richard-TX
 

Postby Richard-TX » 15.04.2013, 02:14

Rob,

No joy yet with Version 5008.

Do you want a Rocrail trace or packet trace or both?



20130414.200958.890 r9999E ddlfb00F OSRCP 0507 Try to reconnect...
20130414.201000.031 r9999E ddlfb00F OSocket 0330 connect(rocpi:4303) failed [10
061]
20130414.201000.031 r9999E ddlfb00F OSocket 0601 recv() failed [10057] size=1 r
ead=0
20130414.201000.031 r9999E ddlfb00F OSRCP 0507 Try to reconnect...
20130414.201001.046 r9999c ddlfb00F OSRCP 0195 FB Connected
20130414.201001.062 r9999c ddlfb00F OSRCP 0198 srcpd V2.1.2; SRCP 0.8.4; SRCP
OTHER 0.8.3

20130414.201001.062 r9999c ddlfb00F OSRCP 0207 SET PROTOCOL SRCP 0.8

20130414.201001.062 r9999c ddlfb00F OSRCP 0220 SET CONNECTIONMODE SRCP INFO

20130414.201001.062 r9999c ddlfb00F OSRCP 0233 GO

20130414.201002.359 r9999I ddlfb00F OSRCP 0292 fbAddrStr = [1365988203.429 10
0 INFO 0 DESCRIPTION SESSION SERVER TIME GM]
20130414.201002.375 r9999I ddlfb00F OSRCP 0292 fbAddrStr = [1365988203.405 10
1 INFO 0 TIME 0 0]
20130414.201002.390 r9999I ddlfb00F OSRCP 0292 fbAddrStr = [1365988203.435 10
0 INFO 1 DESCRIPTION GA GL FB SM POWER LOCK DESCRIPTION]
20130414.201002.390 r0000B ddlfb00F (null) *trace dump( 0x0214FAD4: length=73
)
offset: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |ASCII...........|

--------------------------------------------------------- |----------------|

00000000: 31 33 36 35 39 38 38 32 30 33 2E 34 33 35 20 31 |1365988203.435 1|

00000010: 30 30 20 49 4E 46 4F 20 31 20 44 45 53 43 52 49 |00 INFO 1 DESCRI|

00000020: 50 54 49 4F 4E 20 47 41 20 47 4C 20 46 42 20 53 |PTION GA GL FB S|

00000030: 4D 20 50 4F 57 45 52 20 4C 4F 43 4B 20 44 45 53 |M POWER LOCK DES|

00000040: 43 52 49 50 54 49 4F 4E 0A |CRIPTION. |

20130414.201002.390 r9999c ddlfb00F OSRCP 0447 sensor 0 = 0
20130414.201002.390 r9999a 000011A0 OModel 3187 Sensor event: 0:0
20130414.201002.390 r9999a 000011A0 OModel 3201 unregistered sensor event: 0_0
_srcp OFF
20130414.201002.390 r9999c ddlfb00F OSRCP 0447 sensor 0 = 0
20130414.201002.390 r9999a 000011A0 OModel 3187 Sensor event: 0:0
20130414.201002.390 r9999a 000011A0 OModel 3201 unregistered sensor event: 0_0
_srcp OFF
20130414.201002.406 r9999I ddlfb00F OSRCP 0292 fbAddrStr = [1365988203.435 10
0 INFO 1 POWER OFF AUTO POWER OFF]
20130414.201002.421 r9999I ddlfb00F OSRCP 0292 fbAddrStr = [1365988203.435 10
0 INFO 2 DESCRIPTION GA GL FB SM POWER LOCK DESCRIPTION]
20130414.201002.421 r0000B ddlfb00F (null) *trace dump( 0x0214FAD4: length=73
)
offset: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |ASCII...........|

--------------------------------------------------------- |----------------|

00000000: 31 33 36 35 39 38 38 32 30 33 2E 34 33 35 20 31 |1365988203.435 1|

00000010: 30 30 20 49 4E 46 4F 20 32 20 44 45 53 43 52 49 |00 INFO 2 DESCRI|

00000020: 50 54 49 4F 4E 20 47 41 20 47 4C 20 46 42 20 53 |PTION GA GL FB S|

00000030: 4D 20 50 4F 57 45 52 20 4C 4F 43 4B 20 44 45 53 |M POWER LOCK DES|

00000040: 43 52 49 50 54 49 4F 4E 0A |CRIPTION. |

20130414.201002.421 r9999c ddlfb00F OSRCP 0447 sensor 0 = 0
20130414.201002.421 r9999a 000011A0 OModel 3187 Sensor event: 0:0
20130414.201002.421 r9999a 000011A0 OModel 3201 unregistered sensor event: 0_0
_srcp OFF
20130414.201002.421 r9999c ddlfb00F OSRCP 0447 sensor 0 = 0
20130414.201002.421 r9999a 000011A0 OModel 3187 Sensor event: 0:0
20130414.201002.421 r9999a 000011A0 OModel 3201 unregistered sensor event: 0_0
_srcp OFF
20130414.201002.437 r9999I ddlfb00F OSRCP 0292 fbAddrStr = [1365988203.435 10
0 INFO 2 POWER OFF AUTO POWER OFF]
20130414.201008.406 r9999a cmdr0106 OLoc 2341 <lc id="srcp-loco" V="0" fn="f
alse" dir="true" server="infw010661D4"/>

20130414.201008.406 r9999a cmdr0106 OLoc 1218 Sending command...V=0
20130414.201008.406 r9999c 00000D18 OSRCP08 0452 sent: SET 2 GL 10 1 0 100 0 0
0 0 0 0 0 0 0 0 0 0 0

20130414.201008.406 r9999I 00000D18 OSocket 0571 Other side has closed connecti
on.
20130414.201008.406 r9999E 00000D18 OSRCP08 0457 SendCommand: could not read re
sponse
20130414.201009.984 r9999a cmdr0106 OLoc 2341 <lc id="srcp-loco" V="0" fn="f
alse" dir="false" server="infw010661D4"/>

20130414.201009.000 r9999a cmdr0106 OLoc 1218 Sending command...V=0
20130414.201009.000 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201009.000 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201009.000 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201009.000 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201009.000 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201009.000 r9999I 00000D18 OSRCP08 0513 Handshake completed.
20130414.201009.000 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201012.968 r9999a cmdr0106 OLoc 2341 <lc id="srcp-loco" V="0" fn="f
alse" dir="true" server="infw010661D4"/>

20130414.201012.968 r9999a cmdr0106 OLoc 1218 Sending command...V=0
20130414.201012.968 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201012.968 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201012.968 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201012.968 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201012.968 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201012.968 r9999I 00000D18 OSRCP08 0513 Handshake completed.
20130414.201012.968 r9999E 00000D18 OSRCP08 0442 not connected in SendCommand
20130414.201049.218 r9999a cmdr0106 OLoc 2341 <lc id="srcp-loco" V="0" fn="f
alse" dir="false" server="infw010661D4"/>
Richard-TX
 

Postby rjversluis » 15.04.2013, 07:22

Hi,

5012 should work.
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 


Return to srcp