Registration of new MFX with mgbox

Märklin Central Station 2

Registration of new MFX with mgbox

Postby lplanz » 17.04.2017, 18:23

Hello,

I often have the problem that a new MFX locomotive isn´t inserted into the loco list if another dcc or motorola device with the same address is already known. In this case the following is reported by the discovery protocol:

19:13:14 Discovery completed on schnitte, ready for operation
19:13:11 mfx bind thread completed on interface: schnitte.
19:11:42 mfx registration for loco: RE4/4 I 10O33 , sid: 18 ended.
19:11:42 Registering request id: RE4/4 I 10O33 , sid: 18, UID: 0x7DFEEE84, by controller iid: schnitte

But the new locomotive is not added to the list. There are already a motorola and a dcc device with address 18 in the list, but as this are other protocols the should be no problem. Or on the other hand, why is rocrail/mgbox using the same address if already used by other devices.

Thanx and regards, Lars
H0 3L / RocRail / CC-Schnitte / Gleisbox / MS2 / ModulBooster / MC2 /Raspi3
lplanz
 

Re: Registration of new MFX with mgbox

Postby woodyboy » 17.04.2017, 19:03

Hi Lars,

This does not sound like "works as intended" . Please attach a byte and information level trace file. Configure the number of trace files to 1 and give it enough space to catch a complete log from rocrail server startup up to and including the message that the registration has completed. http://wiki.rocrail.net/doku.php%3Fid%3Drocrailini-trace-en
Regards,

Bert

Equipment: Edits booster, Gleisbox, Arduino Ethernet-CANbus gateway, MS2, Edits S88 with Arduino CANbus controller emulating CS2 event feedback. Switches: 2nd Gleisbox. Roco WLANMaus. RocRail (Ubuntu) mostly M-stock.
woodyboy
 

Re: Registration of new MFX with mgbox

Postby woodyboy » 17.04.2017, 19:39

Lars,

In your signature I read you are using a MS2 too. If registering is executed by the MS2 then Rocrail only listens. The MS2 has no problems when two loco are registered with the same address with different protocols. Creating a loco with an existing address results in a no show in the loclist, this is not a specific mgbox interface issue. The MCS2 interface shows the same behaviour at the time the mgbox interface was written. If MCS2 has a different behaviour now, I'll write a fix for the mgbox library. Probably a change in the model or other module is necessary to fix this. I'm only the maintainer for the mgbox interface.

Fastest workaround is to use the MS2 in slave mode or change the address of the loco to get unique addresses.
Regards,

Bert

Equipment: Edits booster, Gleisbox, Arduino Ethernet-CANbus gateway, MS2, Edits S88 with Arduino CANbus controller emulating CS2 event feedback. Switches: 2nd Gleisbox. Roco WLANMaus. RocRail (Ubuntu) mostly M-stock.
woodyboy
 

Re: Registration of new MFX with mgbox

Postby lplanz » 17.04.2017, 20:01

Hi Bert,

the MS2 is disconnected in normal mode, and in this case when registering the new mfx loco. Just using it to set the Acc/Dec values for MFX loco on the prgramming lane.

I will try to do the trace...

Regards, Lars
H0 3L / RocRail / CC-Schnitte / Gleisbox / MS2 / ModulBooster / MC2 /Raspi3
lplanz
 

Re: Registration of new MFX with mgbox

Postby woodyboy » 17.04.2017, 20:48

Hi Lars,

To get the mfx loco registered on a different address, please remove the line:
Code: Select all
<product pid="2113859204" sid="18" desc="RE4/4 I 10O33" cid="0"/>
or something simular from rocrail.ini

Otherwise it will always reregister on address 18.
Regards,

Bert

Equipment: Edits booster, Gleisbox, Arduino Ethernet-CANbus gateway, MS2, Edits S88 with Arduino CANbus controller emulating CS2 event feedback. Switches: 2nd Gleisbox. Roco WLANMaus. RocRail (Ubuntu) mostly M-stock.
woodyboy
 

Re: Registration of new MFX with mgbox

Postby lplanz » 17.04.2017, 21:30

Hi Bert,

here is the trace. As I´m using a booster that is not able to transfer the mfx messages back to the central it can only handle the requests from the programming lane (connected directly to the box (60113).

rocrail.zip


Regards, Lars
You do not have the required permissions to view the files attached to this post.
H0 3L / RocRail / CC-Schnitte / Gleisbox / MS2 / ModulBooster / MC2 /Raspi3
lplanz
 

Re: Registration of new MFX with mgbox

Postby woodyboy » 17.04.2017, 22:07

Hi Lars,

The trace is ok, but the RE4/4 I 10O33 was still present in rocrail.ini.
Code: Select all
20170417.221957.524 r9999I mgboxsvc OMCS2    3372 Clearing registration for produ: RE4/4 I 10O33   , product marked as not registered
.....
20170417.222037.893 r9999I gbxreade OMCS2    2768 Discovery requested for UID=0x7DFEEE84
20170417.222037.894 r9999I gbxreade OMCS2    2774 Discovery UID=0x7DFEEE84 (RE4/4 I 10O33   ) already assigned to address 18
20170417.222037.894 r9999I gbxreade OMCS2    2779 Discovery UID=0x7DFEEE84 name in structure: RE4/4 I 10O33   
20170417.222037.894 r9999I gbxreade OMCS2    2801 Bind requested by Rocrail for sid 18


The 218 235-0 is found in the locolist. I'll expect that the removal of the RE4/4 I 10O33 from the productlist in rocrail.ini solves your problem.

Be sure that before a new trace is started the entry is removed from the locolist in a previous rocrail session and that the line containing RE4/4 I 10O33 is removed from the productlist in rocrail.ini

For the used configuration it is recommended to disable discover in the configuration. The Gleisbox however will discover a new placed loco and the registration will be performed by Rocrail.

NB. :idea: a fast path to solving an address issue is renumbering the sid entry in the productlist. (In that case we shall never now if it is a bug...)
Regards,

Bert

Equipment: Edits booster, Gleisbox, Arduino Ethernet-CANbus gateway, MS2, Edits S88 with Arduino CANbus controller emulating CS2 event feedback. Switches: 2nd Gleisbox. Roco WLANMaus. RocRail (Ubuntu) mostly M-stock.
woodyboy
 

Re: Registration of new MFX with mgbox

Postby lplanz » 17.04.2017, 23:00

Hi Bert,

just did it again, with deleting the line in rocrail.ini (as I bought the loko today, it wasn´t in the list at the first time).
The lokomotive is added to rocrail.ini after detection, but not to the loko.xml. Therefor its not available in rocrail loko list, even after restart of rocrail.

Disabling the discovery options no new detection of MFX based loko?

rocrail.zip


Regards, Lars
You do not have the required permissions to view the files attached to this post.
H0 3L / RocRail / CC-Schnitte / Gleisbox / MS2 / ModulBooster / MC2 /Raspi3
lplanz
 

Re: Registration of new MFX with mgbox

Postby eroncelli » 18.04.2017, 06:31

lplanz wrote:...

As I´m using a booster that is not able to transfer the mfx messages back to the central ...


Maybe this is the point !
HO Maerklin, CS2+MS2, PC with Win10, Android phone, electronics by IEK, decoder by Maerklin-ESU-TAMS
".. and let your dog enjoy Rocrail"
eroncelli
 

Re: Registration of new MFX with mgbox

Postby woodyboy » 18.04.2017, 07:53

Hi Lars,

The 2nd trace is ok except it is registering to an occupied address :shock: :? . I'll try to fix or clarify this behaviour. To speed up, would you like to upload rocrail.ini?
Regards,

Bert

Equipment: Edits booster, Gleisbox, Arduino Ethernet-CANbus gateway, MS2, Edits S88 with Arduino CANbus controller emulating CS2 event feedback. Switches: 2nd Gleisbox. Roco WLANMaus. RocRail (Ubuntu) mostly M-stock.
woodyboy
 

Re: Registration of new MFX with mgbox

Postby woodyboy » 18.04.2017, 17:57

Hi Lars,

Analyzing the logfile, it is very likely that the interface ID is not defined for loco 218235-0. As this is not mandatory for a single controller configuration I'll create a fix for this.
Regards,

Bert

Equipment: Edits booster, Gleisbox, Arduino Ethernet-CANbus gateway, MS2, Edits S88 with Arduino CANbus controller emulating CS2 event feedback. Switches: 2nd Gleisbox. Roco WLANMaus. RocRail (Ubuntu) mostly M-stock.
woodyboy
 

Re: Registration of new MFX with mgbox

Postby lplanz » 18.04.2017, 19:18

Hi Bert,

218-235 is configured as DCC with address 18 (ESU Model).
Here is my rocrail.ini, without deleleting any line. Hope it helps.

rocrail.ini


Regards, Lars
You do not have the required permissions to view the files attached to this post.
H0 3L / RocRail / CC-Schnitte / Gleisbox / MS2 / ModulBooster / MC2 /Raspi3
lplanz
 

Re: Registration of new MFX with mgbox

Postby woodyboy » 19.04.2017, 21:44

Hi Lars,

It should be fixed in tomorrow mornings build.
Regards,

Bert

Equipment: Edits booster, Gleisbox, Arduino Ethernet-CANbus gateway, MS2, Edits S88 with Arduino CANbus controller emulating CS2 event feedback. Switches: 2nd Gleisbox. Roco WLANMaus. RocRail (Ubuntu) mostly M-stock.
woodyboy
 

Re: Registration of new MFX with mgbox

Postby lplanz » 20.04.2017, 21:46

Hi Bert,

just downloaded the new version and started again. New loco was recognized (this time with address 22) and listed in the locomotive table.
Looks like it works...

Thank you very much. Can you tell something about the background? What did you changed?

Regards, Lars
H0 3L / RocRail / CC-Schnitte / Gleisbox / MS2 / ModulBooster / MC2 /Raspi3
lplanz
 

Re: Registration of new MFX with mgbox

Postby woodyboy » 21.04.2017, 16:09

Hi Lars,

mfx locoś are registered by the interface where they appear. The used configuration has locos with a defined iid and without. The fix now checks locos with the specific iid en locoś without a defined iid before assigning a new mfx sid.
Regards,

Bert

Equipment: Edits booster, Gleisbox, Arduino Ethernet-CANbus gateway, MS2, Edits S88 with Arduino CANbus controller emulating CS2 event feedback. Switches: 2nd Gleisbox. Roco WLANMaus. RocRail (Ubuntu) mostly M-stock.
woodyboy
 


Return to CS2