¿ªÔÆÌåÓý

Locked Update to JMRI 4.8 - CMRI Connection


 

Hi,


I have been running JMRI 4.6 with my CMRI system for some time without issue. I'm using a USB - Serial converter with a Windows 7 machine.


I recently tried updating to one of the 4.7 test releases and found I had lost comms with the CMRI. Restoring 4.6 resolved the problem and I was back up and running. I left things until the next production release.


Updating to 4.8 unfortunately gives me the same issue. The SUSIC indicates a fast flash indicating a problem with the send/rec. I have:-
1. Deleted and recreated the serial connection for the CMRI.
2. Reduced the configuration to the only first output card
3. Tried different baud rates.
4. Created a new panel file with only one output card


None of the above will give me the slow flash on the SUSIC indicating successfull send/rec to the CMRI - EXCEPT reinstalling version 4.6.


Have I missed something obvious? Any help appreciated.


Regards


Scott


 

Is your C/MRI set up a SUSIC with 24- or 32-bit cards?

JMRI might not poll (run the lights fast) unless it thinks there are _input_ cards. I don¡¯t remember exactly how that part works, and am away from hardware to try it.

So, as a diagnostic, please try configuring at least one input card and a JMRI sensor targeted at it.

(If you have a SMINI, the ¡°card¡± is predefined, but please set up the JMRI sensor)

The baud rate should match what¡¯s set on your boards (and the value you used to have in JMRI when it was working)

JMRI now can handle multiple C/MRI connections, so make sure that you haven¡¯t accidentally created more than one in the preferences.

Bob

On Jul 24, 2017, at 10:57 PM, scott.rose@... [jmriusers] <jmriusers@...> wrote:

Hi,


I have been running JMRI 4.6 with my CMRI system for some time without issue. I'm using a USB - Serial converter with a Windows 7 machine.


I recently tried updating to one of the 4.7 test releases and found I had lost comms with the CMRI. Restoring 4.6 resolved the problem and I was back up and running. I left things until the next production release.


Updating to 4.8 unfortunately gives me the same issue. The SUSIC indicates a fast flash indicating a problem with the send/rec. I have:-
1. Deleted and recreated the serial connection for the CMRI.
2. Reduced the configuration to the only first output card
3. Tried different baud rates.
4. Created a new panel file with only one output card


None of the above will give me the slow flash on the SUSIC indicating successfull send/rec to the CMRI - EXCEPT reinstalling version 4.6.


Have I missed something obvious? Any help appreciated.


Regards


Scott
--
Bob Jacobsen
rgj1927@...


 

Scott, Bob,

I might be able to help with this one. I started rebuilding a while ago and I noticed something with my SMINI setup that I hadn't with my 24-bit SUSIC system. If I start JMRI before I power up the SMINI, the program does not recognize it . I have multiple connections with both Locobuffer USB and Belkin Serial to USB RS232 converters. The Locobuffer will connect but the Smini just flashes the Green LED rapidly. If I shut down power to the SMINI, and close JMRI, THEN restore power to the SMINI and start JMRI, things sync right up.


It might be something in the way Windows handles the comm port or even the drivers to the RS-232 USB converter but this solved my problem.


Good luck,
Nick Kulp


 

Bob,

I believe the problem may lie with the initialisation .

The SUSIC is set up with 24 bit cards in the following format:-


OOOO OOII IIII


My interpretation of the initialisation sequenece is ua=0, Type= N, NS=3, CT = aa 5a 55


I have checked via the CMRI monitor for this sequence and have found that for 4.6, 4.7.4 & 4.8 the sequence is ua=0, Type=N, NS=16, DL=10, CT= 3 aa 5a 55 ????? I would have expected NS to be 3. It appears to have added the correct NS to the CT sequence. The baud rate on the SUSIC matches the preferences entry and there is only one entry for the CMRI.


I should have been clearer on the fast flash - this is not the amber and red send/rec LED's but the Green which should indicate a slow flash if the SUSIC is successfully initialised. I get the slow flash for 4.6 but once upgraded to 4.8, I get the fast flash.


Under 4.6 I can use the CMRI diagnostics on one output card located in slot 0 and can see the successfull result of the test sequence. 4.7.4 & 4.8 as mentioned won't initialise even for just one output card.


For all three versions I tested, I get ua=0, Type=N, NS=1, CT = x for output cards in slots 0 to 3. As soon as I add a 5th card as a second card set, it appears to add the NS as the first digit for the CT sequence followe by the correct CT numbers.


Short of removing all traces of Java and JMRI from my laptop and reinstalling, I'm not quite sure of any other diagnostics I can try. In the longer term, I am planning to replace my laptop so perhaps if it is driver related, that may help.


Scott


 

Thanks Nick. I do have an SMINI but haven't installed it yet. This is just one SUSIC with 24 bit I/O cards which it appears doesn't care what is started first. I'll remember this though when I get started on the SMINI.

Scott


 

Scott,



Inspect the console log to see if it provides clues. I can't remember when,
but there was an issue with the storing of the node configuration data and
that may need resetting. With the latest versions, 4.8 or 4.9.1 the serial
support has changed from 4.6 to a newer library. So there is a chance of a
conflict depending on what hardware you are using for your connection to
CMRI.



-Ken Cameron, Member JMRI Dev Team

www.jmri.org

www.fingerlakeslivesteamers.org

www.cnymod.com

www.syracusemodelrr.org


 

Thanks Ken. I had already started removing JMRI from the laptop.

After uninstalling 4.6 and removing any files left behind, I installed a fresh copy of 4.8. Unfortunately no change. As there appears to be little difference in the initialisation string between 4.6 and 4.8, I'm looking more towards a problem with drivers on the laptop and my USB to serial converters.


As I am planning to upgrade the laptop in the very near future due to some other minor issues, I'm going to stay with 4.6 in the mean time.


Regards

Scott


 

Sorry to reply to my own, but I just had another thought. This may be a misunderstanding of the C/MRI protocol.

The NS (number of bytes of board configuration, e.g. ceiling(n_boards/4)) is sent as a raw integer, not an ASCII character. As such, it can have values that looks like protocol characters. In that case, a DLE (a.k.a. DL or 0x10) character is sent before that.

When NS is 3, that¡¯s the case. It¡¯ll be sent as x10 0x03, i.e. DL 03. That¡¯s completely normal and correct AFAIK.

Unfortunately, the C/MRI monitor doesn¡¯t understand that when decoding the message. So get lines like this:

[41 49 58 00 00 10 03 A5 5A 09] Init ua=0 type=X DL=0 NS=16 CT: 3 a5 5a 9

That¡¯s the right raw data, but the wrong interpretation of it.

I¡¯ll fix this.

But, unfortunately, that means this isn¡¯t the cause of your problem. I¡¯m not sure what¡¯s going wrong there.

Bob


On Jul 26, 2017, at 12:26 AM, scott.rose@... [jmriusers] <jmriusers@...> wrote:

The SUSIC is set up with 24 bit cards in the following format:-


OOOO OOII IIII


My interpretation of the initialisation sequenece is ua=0, Type= N, NS=3, CT = aa 5a 55


I have checked via the CMRI monitor for this sequence and have found that for 4.6, 4.7.4 & 4.8 the sequence is ua=0, Type=N, NS=16, DL=10, CT= 3 aa 5a 55 ????? I would have expected NS to be 3. It appears to have added the correct NS to the CT sequence. The baud rate on the SUSIC matches the preferences entry and there is only one entry for the CMRI.
--
Bob Jacobsen
rgj1927@...


 

Bob,

Thanks for the explanation. Certainly explains why I was seeing the same string for 4.6 as well as 4.8. As I mentioned to Ken, I think I'll wait until I replace my laptop as this may be a driver issue.

Scott