¿ªÔÆÌåÓý

Locked Re: NCE USB Issue with RPi4 #rpi #nce #powercab


 

¿ªÔÆÌåÓý

Inubo and Marcus,

On 3 Jan 2020, at 2:09 PM, Inobu One via Groups.Io <one2beros@...> wrote:

This is what the log doesn't reveal. The NCE USB Interface has a 20 second lock up cycle. During that time the NCE USB Interface seems to be inaccessible.?
Any connection although good will fail. I think this is where I interjected the power cycle to start the NCE USB Interface again. I noticed that Decoder Pro
aligned itself verses Panel Pro did not.

Thanks for the logs.

I've performed some timing tests using both Mac and Ubuntu to test the power-up delay of the NCE USB and Power Cab.

1) The NCE USB power up cycle.

I made sure I had the following JMRI windows opening automatically and non-overlapping:
- NCE Command Monitor with Show Raw Data and Show Timestamps enabled.
- Send NCE Command, with Binary Enabled and AA entered into the Command Field.
- Single CV Programmer, with mode set to Direct.

After starting JMRI successfully, I turned off the 240V power switch supplying the PCP and waited for all NCE components to be thoroughly shut down.

While watching the seconds on the computer clock, I simultaneously flicked the 240V power on with one hand and with the other I clicked on the Send button in the Send NCE Command window.

The NCE Command Monitor log showed the AA command being sent within the same second I had used on the clock and the 07 03 07 response being returned in less than 10 milliseconds.

This was fully repeatable, even with the Power Cab being unplugged from the PCP.
So there is very little power-up delay within the NCE USB itself, less than 1 second.

2) The combined NCE USB and Power Cab power up cycle.

Before performing the following tests I navigated to the Setup Command Station menu item on the Power Cab throttle, and went through to the "PROCAB POWER UP SECONDS(1-30):" item (available on V1.65 firmware and above) and made sure it was set to "01" (for obvious reasons).

While watching the seconds on the computer clock, I flicked the 240V power on with one hand, waited a few seconds and with the other I clicked on the Read CV button in the Simple Programmer window.

I found I had to wait about 5 seconds between "flick" and "click" in order to get a reliable read of CV 1 in the attached decoder.

3) The time between JMRI startup and Version Report in the Log.

In all cases (with Profile Selector Delay disabled), the interval between " JMRI log " and "NCE EPROM revision = 7.3.7" was less than 5 seconds.

I would expect that interval to be considerably greater with an RPi.

My Conclusions and Speculations

There is no evidence to support the assertion that "The NCE USB Interface has a 20 second lock up cycle."

Some other factor(s) must be in play with Larry and Inubo's RPi situations.

In most cases (but maybe not with the RPi setup) the user would normally power up the NCE hardware well before starting JMRI. If there is simultaneous power-up it would be well worth a user checking the?"PROCAB POWER UP SECONDS(1-30):" setting. (I have no idea how long an RPi takes to boot up, but I'd assume at least 5 seconds).
?
My speculations about possible factors in the situation include:
- The RPi USB behaviour after the JMRI code sets up a connection and tells the driver to ?reset the Baud Rate of the CP2102 chip on the NCE USB. (We've not observed any problem of this sort with Windows/Mac/Ubuntu.)
- The slower processing speed of the RPi.
- The reported difference in behaviour between PanelPro and DecoderPro could be related to Startup Items (or slightly different code paths in JMRI).
- One factor that was mentioned was that the "workaround" is a one-off rather than every time. If that's the case, something happening in JMRI code at first start with the premade image (possibly coupled to processor speed) or to the Auto Configuration used by Steve (although I thought this still occurred with?Auto Configuration disabled. But a lot of this information has been buried in interpretation and speculation rather than simple clear reporting of test conditions and results.


Dave in Australia




Join [email protected] to automatically receive all group messages.