¿ªÔÆÌåÓý

Locked Re: Problems with Persistent PI4 USB ports


 

¿ªÔÆÌåÓý

Dave Sand,
?
That line added to the ~/.jmri/jmri.conf file did the trick. I had been in that file before but didn¡¯t remember why. For me the file was already installed, I don¡¯t know if it was originally installed, or if I placed it there. First test I commented out the line:

»å±ð´Ú²¹³Ü±ô³Ù³å´Ç±è³Ù¾±´Ç²Ô²õ="-¶Ù±è¾±4Âá.±ô¾±²Ô°ì¾±²Ô²µ=»å²â²Ô²¹³¾¾±³¦¡±

And replaced it with?

default_options="--serial-ports=/dev/ttyUSB_NCE_PH_Pro, /dev/ttyUSB_PowrCab¡±

In the final version I decided to leave both default_options= lines in the script, since it works either way. Should I have left it out since it is a legacy option? Later, I will experiment with truncating the tty ports ?to see how that works. After adding the ports, it did not take until I saved and _rebooted_. A simple restart of JMRI didn¡¯t work.
?
This answers the issue I had when a new Steve Todd JMRI 5.8 image was installed on the Pi5 which would not display bound ports. It was the departure from the serial library after 5.6. I will revisit the Pi5 to add the patch.

Thanks for your help. A new page will be added to my programming info book.?

?John ?Bauchiero
- D&H Model Railroad
-?NCE PH-Pro & PowerCab, Pi4b, DCC-EX
- JMRI 5.9.4

On Sep 30, 2024, at 9:56 AM, Dave Sand via groups.io <ds@...> wrote:

John,

Some additional details.

The previous serial library, purejavacom, had a process to find device names that started with a set of prefixes, ?One of them was ttyUSB. ?For technical reasons, a different serial library needed to be used after JMRI 5.6. ?This library does not include the discovery feature.

For Linux and macOS, JMRI has three methods to specify special serial device names. ?
  • Specify the special names in the exported JMRI_SERIAL_PORTS environment variable.
  • Add --serial-ports="???" to the command line or icon command argument
  • Use the jmri.conf file.
The jmri.conf can also be used with Windows.

The jmri.conf approach is the easiest. ?The "/dev/" prefix is not needed. ?The "ttyUSB" prefix is no longer needed for discovery but can be retained to make the purpose obvious..
<Screenshot 2024-09-30 at 8.49.39?AM.png>
Dave Sand


----- Original message -----
From: Dave Sand <ds@...>
Subject: Re: [jmriusers] Problems with Persistent PI4 USB ports
Date: Sunday, September 29, 2024 10:51 PM

John,

I am not sure that this is the official method but it does work.

Copy the jmri.conf file from the JMRI install to ~/.jmri.

Edit the file and add the serial port names. ?If more than one, separate them by using a comma.
<Screenshot 2024-09-29 at 10.35.57?PM.png>
When you start JMRI, the names are added to the serial port list in Preferences -> Connections.
<Screenshot 2024-09-29 at 10.37.25?PM.png>
After the Save and restart:
<Screenshot 2024-09-29 at 10.35.02?PM.png>

Dave Sand


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