Automatic recognition of mfx id with CS2 & Gleisbox

Märklin Central Station 2

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby Niklas01 » 03.08.2015, 11:43

Hi Bert,

it's not easy to reconstruct the problem. Sometimes I have the problem, but then the byte-level is turned off. With byte-level i had the following problem for example: The current in RR doesn't change, the CS2 shows something about 300mA. Rocrail shows 0mA everytime (trace 4, line 886 and 966). When I have more ideas how i could reconstruct the problem, I will write again.
Well, the trace is looking like the CS2 return false values...

Regards,
Niklas
You do not have the required permissions to view the files attached to this post.
Viele Grüße / Best regards Niklas
MCS2, PC mit Win10/Linux Mint 18
Niklas01
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby Niklas01 » 03.08.2015, 11:59

Yeah! I found a Problem in Byte-Level: trace 2, line 157 - 160...

Regards,
Niklas
You do not have the required permissions to view the files attached to this post.
Viele Grüße / Best regards Niklas
MCS2, PC mit Win10/Linux Mint 18
Niklas01
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby woodyboy » 03.08.2015, 12:48

Hi Niklas,

Thanks for uploading the traces and testing. My problem is that too much context information is missing. Please configure the log file limit to 1 file, see http://wiki.rocrail.net/doku.php?id=rocrailini-trace-en.To make it possible to determine the problem it is necessary that the startup sequence of rocrail is logged.
It seems that the calculated constant factor is missing. The mean reason for this is that the CS2 is not completely booted before Rocrail is started or a miss interpretation of the config information. But that information is also in the start of a complete trace.
It is absolute necessary that the CS2 is ready for operating before starting Rocrail. That is about after 10-15 seconds that the CS2 is responsive.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby Niklas01 » 03.08.2015, 18:00

Well, the CS2 (V3.8.1) was online all the time I tested. So the CS was definitely full booted at the test.

It was very difficult to find that problem in a recontsructable way. Sometimes there is the problem, sometimes not.
In the Configuration above I could reconstruct the Problem in the following way: I turned on the track current in the CS2, then I started the rocrail server. After command "go" in RR the problem appears. I just start a train to look, whether the values will change.

The problem could also appear when the CS2 was set to "stop" and the RR server is starting. Or sometimes when there are no locos in the database of RR.

I forgot the startup sequence of rocrail, sorry. It's in the attachment now, I merged it to one big file.
I hope it's helping you. Until Wednesday evening I could not test again.

Regards,
Niklas
You do not have the required permissions to view the files attached to this post.
Viele Grüße / Best regards Niklas
MCS2, PC mit Win10/Linux Mint 18
Niklas01
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby woodyboy » 03.08.2015, 20:35

Hi Niklas,

This trace is valuable. It contains all information and it shows the error. I'll try to fix it in the next days.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby woodyboy » 04.08.2015, 18:56

@Rob would you be so kind to test the parenthesis? If it passes please merge. It is tested with todays git status.

Hi Niklas,
According to the log file the information screen is displayed on the CS2 while starting Rocrail. This particular screen on the CS2 causes a lot of traffic between the GUI processor and the GFP processor. See from timestamp 20150803.125506.531 and on in the full log file. This traffic is also announced and processed by the PC, or more accurate not completely handled by the PC. Due to this load, the Ethernet driver has dropped packets. This is normal UDP behaviour. This circumstance and behavior (packet loss) is relative easily to reproduce when using a wifi connection.

The log contains also dirty packets, that was a reason for failure too. This is fixed, for the network errors a fix is not possible, however a work around is implemented. In case of a timeout (due to packet loss) or a packet sequence error, interrogation for the channel configuration is restarted. An error message is displayed in Rocview when this situation occurs.

Another workaround is the predefinition of the channel parameters. But this is little bit tricky. Because if M decides to implement other values for the load indicator, wrong values will be displayed the first seconds. This situation only occurs before reading the channel config. The predefined values will be overwritten with calculated values by reading the channel config.

Other small modification is that the load value is read more often as the voltage and temperature values. The load value is at least updated twice per second instead of 1 time per 1,5 second. The voltage an temperature about 1 time per second.

The fix is tested with emulation, the original CS2 that I had on loan has returned to the owner. :cry:
You do not have the required permissions to view the files attached to this post.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby Niklas01 » 06.08.2015, 08:58

Hi Bert,

it's working great now, thanks a lot! And thanks for explaining the problem :D

the original CS2 that I had on loan has returned to the owner. :cry:

Don't be sad. There are other people, who are able to test new fixes or features for the mgbox on a CS2 8)

Regards,
Niklas
Viele Grüße / Best regards Niklas
MCS2, PC mit Win10/Linux Mint 18
Niklas01
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby woodyboy » 05.09.2015, 10:10

Dear forummembers,

Attached a new version of the mgbox library. Changes are:
  • waiting on a reboot of an Arduino in case of a USB/serial connection
  • possibility to add an external VAT sensor which has priority to the Gleisbox/CS2 sensors. To display values of an external booster. The UID should be 0x0000 for this type of sensor report.
  • preventing ping flooding at startup.

Rob would you be so kind to merge this version in case no warnings are reported?
You do not have the required permissions to view the files attached to this post.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby woodyboy » 12.09.2015, 16:27

Dear Forummembers,

Attached an updated version of the mgbox library. Changes:
Prevent asking a Loco discover when a CS2 is detected independent of the selected checkboxes. The grey mfx symbol should not appear anymore on CS2 version 4.0.1.
Ping moved to a separate thread, only asking every minute if no CS2 or MS2 is present.

@Rob, if the attachment passes the compiler parentesis checks please merge. :wink:
You do not have the required permissions to view the files attached to this post.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby rjversluis » 12.09.2015, 16:42

Hi Bert,

I just merged it.
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
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby John Hoek » 01.10.2015, 15:59

[attachment=0]rocrail trace.000.trc[/attachment)

Hi Bert,
I have changed my CAN hardware to the cc-schnitte.
Works fine..

However, with Rocrail and you latest MSGBOX driver, i still get CAN errors.
I made a screenshot and a dump for you.
Even without trains running, i get this errors. Most of the time it says to high priority set.
or feedback 0000????
I dunno what they mean, but it don't look good... Could you have a look to it?

thanks John
You do not have the required permissions to view the files attached to this post.
John Hoek
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby woodyboy » 01.10.2015, 17:10

Hi John,

Is CTS selected in the interface configuration? These messages are flow control errors.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby John Hoek » 01.10.2015, 18:08

BNert,
Yes CTS is enabled in the intwrface config.

Most time the eroors i see are priority related.
I get the CAN message 'To high priority set'.
John Hoek
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby woodyboy » 01.10.2015, 19:44

Hi John,

I'm afraid I can't do anything for you. It is due to a flow control error. Rocrail receives invalid frames from the cc-schnitte. In the MCS2 library this frame checking is not implemented so you will not see these errors, but the errors still remain. If reporting state is disabled, maybe you get less errors.

Contact the supplier for the correct configuration.
Regards,

Bert

Equipment: Roco WLANMaus, MS2, Gleisbox 2x(separated switch & rollingstock). Ubuntu 16. Edits booster. Arduino: S88 CANbus interface & Ethernet-CANbus gateway
woodyboy
 

Re: Automatic recognition of mfx id with CS2 & Gleisbox

Postby John Hoek » 02.10.2015, 06:26

Ok. Clear.
i would try to diable report status and contact Thorsten aboit this.

One thning cross my mind. i use an old Dell laptop with a Pentium and WindowsXP for driving rocrail.
i can't update to Linux or a newer version of Windows, because the processor is not compatible.
However.... Could it be that my pc is sometimes just a littlebit too slow for handling all events?
And not handling the CAN frames on time? Hence flow errorr.... Of not? What do you think?
Could this been the reason?
John Hoek
 

PreviousNext

Return to CS2