Keyboard Shortcuts
Likes
Search
Locked
DCS52 Connecting to JMRI On Linux
#digitrax
#linux
Hi,
New to JMRI, and I am struggling to get the Connection to my DCS52 unit. Its connected to the PC via a USB cable, and its on port s1:11.
In the JMRI Settings, I can only see ttyACM0 as the port for the DCS52.
I cannot seem to get them to talk to each other.
In the Error logs, I get:-
2024-11-29T23:04:57,941 xml.AbstractSerialConnectionConfigXml INFO ?- Starting to connect for "LocoNet" [main]
2024-11-29T23:04:57,959 locobuffer.LocoBufferAdapter ? ? ? ? ?ERROR - Serial port ttyACM0 not found: Unable to create a serial port object from the invalid port descriptor: /dev/ttyACM0 [main] 2024-11-29T23:04:57,960 locobuffer.LocoBufferAdapter ? ? ? ? ?ERROR - failed to connect LocoBuffer to ttyACM0 [main] 2024-11-29T23:04:57,961 jmrix.ConnectionConfigManager ? ? ? ? ERROR - Unable to create jmri.jmrix.loconet.usb_dcs52.configurexml.ConnectionConfigXml for [Element: <connection/>], load returned false [main] ?
Which seems to suggest a connection issue, or I have the wrong port ID.
?
Any ideas? |
On Fri, Nov 29, 2024 at 04:14 PM, <ijcornish@...> wrote:
Looks right me. What are your other preference connection settings? -- Peter Ulvestad Linux Mint 21.3, JMRI 5.96plus, Java 21.0.5 JMRI Users Group Moderator ( /g/jmriusers ) JMRI Developers Group Moderator ( ) Tam Valley Group Moderator ( ) Sprog-DCC Group Moderator ( ) Edmonton Model Railroad Association ( ) |
开云体育It's saying that JMRI can't access the port /dev/ttyACM0 but that's usually not a correct name most of the time. There are two likely issues. One is that JMRI doesn't have permissions. Did you add your login id to the group dialout? That's a frequently missed step like this: ? adduser your_login_name dialout ? On a Raspberry Pi this is usually it: ? adduser pi dialout ? Another rare possibility is a driver issue. While common on Windows systems, it is seldom a problem on Linux systems. ? -Ken Cameron, Member JMRI Dev Team
? ? |
The log shows you are trying to setup a Locobuffer USB for your DCS52 zephyr Extra.
Since the DCS52 has built in PR4, why did you select Locobuffer as a connection type ? Unless you have and are trying to use a Locobuffer, this might be your error. You should have selected the DCS52 USB Interface in PREFERENCES and let it use the Integrated PR4. Marc |
Marc
Since most of the usb serial adaptors use the locobuffer as a base many informational and error messages report that name. Further down the log you will see?
?
ERROR - Unable to create jmri.jmrix.loconet.usb_dcs52.configurexml.ConnectionConfigXml for [Element: <connection/>], load returned false [main]
?
This is why we like to see the entire log.
?
Steve G.
?
|
开云体育
I have selected DCS52 USB Interface
Serial Port:- ttyACM0 - this is the only choice I am offered
Command Station Type - DCS52 (Zephyr Express)
From: [email protected] <[email protected]> on behalf of Marc N Fournier via groups.io <forfoum@...>
Sent: 30 November 2024 05:47 To: [email protected] <[email protected]> Subject: Re: [jmriusers] DCS52 Connecting to JMRI On Linux ?
The log shows you are trying to setup a Locobuffer USB for your DCS52 zephyr Extra.??
Since the DCS52 has built in PR4, why did you select Locobuffer as a connection type ? Unless? you have and are trying to use a Locobuffer,? this might be your error. You should have selected the? DCS52 USB Interface in PREFERENCES and let it use the Integrated PR4. Marc |
开云体育Ian, ? I think you need to prove the USB device from the DCS52. ? One usual method is to:
? If that name isn’t being offered in the JMRI connection, let us know what name you found. We can figure out why it isn’t working right. ? -Ken Cameron, Member JMRI Dev Team
? ? |
Ken et al,
Doing the steps below from Ken confirm the name is ttyACM0.
Below is the full Session.log from the session. I have also swapped the cable with one that is known to be good and the same errors/behaviour occurs.
2024-11-30T23:07:58,044 util.Log4JUtil ? ? ? ? ? ? ? ? ? ? ? ?INFO ?- * JMRI log ** [main]
2024-11-30T23:07:58,049 util.Log4JUtil ? ? ? ? ? ? ? ? ? ? ? ?INFO ?- This log is stored in file: /home/jmri/.jmri/log/session.log [main]
2024-11-30T23:07:58,049 util.Log4JUtil ? ? ? ? ? ? ? ? ? ? ? ?INFO ?- This log is appended to file: /home/jmri/.jmri/log/messages.log [main]
2024-11-30T23:07:58,057 apps.AppsBase ? ? ? ? ? ? ? ? ? ? ? ? INFO ?- DecoderPro version 5.8+Rbc21ce2ce7 starts under Java 17.0.12 on Linux amd64 v6.6.56-Unraid at Sat Nov 30 23:07:58 GMT 2024 [main]
2024-11-30T23:08:00,255 gui3.Apps3 ? ? ? ? ? ? ? ? ? ? ? ? ? ?INFO ?- Starting with profile Default.3efec34b [main]
2024-11-30T23:08:00,288 node.NodeIdentity ? ? ? ? ? ? ? ? ? ? INFO ?- Using 9cceeea7-5dbb-4d7d-94b6-eb2a6a7e50fa as the JMRI storage identity for profile id 3efec34b [AWT-EventQueue-0]
2024-11-30T23:08:00,333 xml.AbstractSerialConnectionConfigXml INFO ?- Starting to connect for "LocoNet" [main]
2024-11-30T23:08:00,346 locobuffer.LocoBufferAdapter ? ? ? ? ?ERROR - Serial port ttyACM0 not found: This port appears to have been shutdown or disconnected. [main]
2024-11-30T23:08:00,347 locobuffer.LocoBufferAdapter ? ? ? ? ?ERROR - failed to connect LocoBuffer to ttyACM0 [main]
2024-11-30T23:08:00,348 jmrix.ConnectionConfigManager ? ? ? ? ERROR - Unable to create jmri.jmrix.loconet.usb_dcs52.configurexml.ConnectionConfigXml for [Element: <connection/>], load returned false [main]
2024-11-30T23:08:00,348 plementation.JmriConfigurationManager ERROR - Exception initializing jmri.jmrix.ConnectionConfigManager: Unable to create several of your connections. [main]
2024-11-30T23:08:00,451 roster.Roster ? ? ? ? ? ? ? ? ? ? ? ? INFO ?- Reading roster file with rootFromName(/home/jmri/.jmri/Default/roster.xml) [main]
2024-11-30T23:08:00,499 plementation.JmriConfigurationManager ERROR - Exception initializing jmri.util.startup.StartupActionsManager: jmri.util.prefs.InitializationException: Unable to run startup actions due to earlier failures. [main]
2024-11-30T23:08:03,521 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path program: is /opt/JMRI/ [main]
2024-11-30T23:08:03,522 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path preference: is /home/jmri/.jmri/Default/ [main]
2024-11-30T23:08:03,522 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path profile: is /home/jmri/.jmri/Default/ [main]
2024-11-30T23:08:03,522 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path settings: is /home/jmri/.jmri/ [main]
2024-11-30T23:08:03,522 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path home: is /home/jmri/ [main]
2024-11-30T23:08:03,522 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path scripts: is /opt/JMRI/jython/ [main]
2024-11-30T23:08:03,642 throttle.PowerManagerButton ? ? ? ? ? INFO ?- No power manager instance found, panel not active [main]
2024-11-30T23:08:03,698 jmrix.ActiveSystemsMenu ? ? ? ? ? ? ? ERROR - Proceeding after error while trying to create menu for class jmri.jmrix.loconet.swing.LnComponentFactory [main]
java.lang.NullPointerException: Cannot invoke "jmri.jmrix.loconet.SlotManager.getCommandStationType()" because the return value of "jmri.jmrix.loconet.LocoNetSystemConnectionMemo.getSlotManager()" is null
From:?[email protected] <[email protected]> on behalf of Ken Cameron via <kcameron=[email protected]>
Sent:?30 November 2024 15:39 To:?[email protected] <[email protected]> Subject:?Re: [jmriusers] DCS52 Connecting to JMRI On Linux ?
Ian, ? I think you need to prove the USB device from the DCS52. ? One usual method is to:
? If that name isn’t being offered in the JMRI connection, let us know what name you found. We can figure out why it isn’t working right. ? -Ken Cameron, Member JMRI Dev Team ? ? |
In a Linux command shell window type these two commands and report what they
show: ls -l /dev/ttyACM0 groups The first will list the permissions and ownership of the serial port device and the second will list what groups you are in. For example: fruitloops% ls -l /dev/ttyACM0 crw-rw---- 1 root dialout 166, 0 Dec 2 10:47 /dev/ttyACM0 fruitloops% groups heller adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi Note here that /dev/ttyACM0 has rw access for user root and rw access for the group dialout and no access for anybody else. And that my username (heller) is in group dialout, which gives me rw access to /dev/ttyACM0. At Mon, 2 Dec 2024 10:52:20 +0000 "Ian Cornish via groups.io" <ijcornish@...> wrote: -- Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364 Deepwoods Software -- Custom Software Services -- Linux Administration Services heller@... -- Webhosting Services |
From
Serial Port Access The majority of JMRI layout connections are based on serial ports. On recent hardware these are implemented using USB ports and a USB device such as the RR-CirKits LCC Buffer-USB. Most USB serial devices do not require the installation of drivers. The Linux user running JMRI needs to have read/write access to the serial ports. The following command updates the user's group list with access to the serial ports. sudo usermod -a -G dialout ${USER} Do not change ${USER}. That is a variable that contains the current user name. -- Peter Ulvestad Linux Mint 21.3, JMRI 5.96plus, Java 21.0.5 JMRI Users Group Moderator ( /g/jmriusers ) JMRI Developers Group Moderator ( ) Tam Valley Group Moderator ( ) Sprog-DCC Group Moderator ( ) Edmonton Model Railroad Association ( ) |
At Mon, 02 Dec 2024 08:42:28 -0800 "Peter Ulvestad via groups.io" <ulvestad@...> wrote:
Note: the usermod command just updates the user group database (/etc/group),FromSerial Port Access which will then be used the next time the user logs in. It *does not update* the user process(es) currently logged in/running. One needs to logout and log back up again after running the usermod command. On a Raspberry Pi, the default user (pi) is already in the dialout group -- this is part of how the uSD card images are built. -- Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364 Deepwoods Software -- Custom Software Services -- Linux Administration Services heller@... -- Webhosting Services |
开云体育You still seem to be trying to connect via a Locobuffer. ?Look at the messages at 23:08:00,346. ?Are you sure you have the correct device type in the connection setup in the JMRI connection tab in Preferences. ?Are you actually using a Locobuffer or the built-in USB port - which is NOT a locobuffer?Mick ________________________________ Mick Moignard Specialising in DCC Sound m: +44 7774 652504 The week may start M,T but it always ends WTF. |
For the second time on this thread.
All the pr2/3/4/ dcs52/210+/240/240 adaptors as well as some uhlenbrock, Intellibox are sub types of a locobuffer.
?
this line
2024-11-30T23:08:00,348 jmrix.ConnectionConfigManager ? ? ? ? ERROR - Unable to create jmri.jmrix.loconet.usb_dcs52.configurexml.ConnectionConfigXml for [Element
Tells us it is a DCS52 USB connection.
If it was a real locobuffer connection it would say:
15:29:01,724 jmri.jmrix.ConnectionConfigManager ? ?ERROR - Unable to create jmri.jmrix.loconet.locobuffer.configurexml.ConnectionConfigXml?
?
And.... It would work just fine excluding some special functions.
?
Steve G.
? |
All, Managed to get it working.. 1) BIOS upgrade, which included an update on USB. 2) executed?"sudo chown 777 /dev/ttyACM0" -> Even though my JMRI user was in the dialout group, it did not have permission, so this is a belt and braces approach. I am using the built in USB port, and as previously advised, it is correctly set in Preferences - not sure why the log was suggesting Locobuffer. Now to prepare the roster and learn the power! Ian? On Mon, 2 Dec 2024 at 19:09, Mick Moignard via <mick=[email protected]> wrote:
|
At Tue, 3 Dec 2024 16:36:53 +0000 "Ian Cornish via groups.io" <ijcornish@...> wrote:
1) BIOS upgrade, which included an update on USB.Not sure if this necessarily would make any difference. 2) executed "sudo chown 777 /dev/ttyACM0" -> Even though my JMRI user wasIt won't persist across reboots or USB disconnects. Modern Linuxes use a ramdisk for the /dev file system. The device files are populated by udev as they show up (and depopulated on disconnect). Also, did you mean chmod above? You don't want to do anything like manually using chmod or chown on anything in /dev. If something needs to be different than the "defaults", you should create a udev rule for that. (I can help you craft such a rule, if that is really needed -- contact me off list.) Oh: random guess: the BIOS upgrade implies rebooting the system, right? This in turn implies logging out and logging back in. If you had done usermod to add yourself to the dialout group earlier and didn't promptly logged out and logged back in, it would not have been effective. But once you logged out and then back up (effectively because of rebooting), the "default" permissions would have "magically" worked. Which USB port should make no difference. As others have stated, "Locobuffer" covers a number of different devices that all speak (more or less) the same protocol. -- Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364 Deepwoods Software -- Custom Software Services -- Linux Administration Services heller@... -- Webhosting Services |