JMRI supports DCC++ as of JMRI version 4.3.1. I recommend using the latest release of DCC++, whatever that is. Please post your questions, bug reports, or support issues in this thread!
TwinDad, Did you get a chance to look into the issue I found with not being able to connect over Ethernet using JMRI 4.3.2 and DCC++ 1.2.1+ (last post)? Thanks, Mike
I'm still investigating. For future reference, can you copy/reproduce the "bug report" info here? Thanks, Mark
For reference, the messages in the "Introducing DCC++" thread for this are: 719, 721, 726, 729, 731, 734, 735. The distilled version: Using JMRI 4.3.2 and Base Station 1.2.1+. I added a W5100 Ethernet shield to my Base Station stack. JMRI appears to connect to it (PanelPro opens up without error) but doesn't seem to interact with it (it cannot determine track power status, etc.). With JMRI shut down I connected via telnet and was able to issue commands to turn track power on and off, verifying the functionality of the Base Station stack. The same Base Station stack works fine with JMRI if I have it connected via USB.
mikegillow... First: You have it configured to use the "DCC++ Ethernet" connection, not the "DCC++ Server", right? Second, double and triple check your IP address/hostname and port settings, just to be sure... they are in the Preferences window... you'll have to click the "Additional Connection Settings" checkbox... it defaults to port 2560. Third, open the DCC++ Traffic Monitor window and check the "Show Raw Data" checkbox... try a few things and tell me if you see properly formatted DCC++ commands (the opening and closing brackets will *probably* not be there). If not, tell me what you see. The Ethernet and Serial interfaces use the same packetizer to format the command packets, so the data heading over to the Base Station *should* be identical... just flowing over a different data pipe. I'm assuming (but will check) that the Base Station expects the data to be identical, irrespective of the pipe (E-net vs. serial). Finally, I don't suppose you have a TCP packet sniffer and know how to use it? If you do, a packet trace on the port while trying a few things may be helpful in debugging. Unfortunately, I'm *still* having hardware problems with my Ethernet shield, so I'm unable to directly debug at the moment.
Excellent! That will go a long way towards seeing whether JMRI is handling the interface properly. Thank you!
JMRI 4.3.2, DCC++ Ethernet, IP and port confirmed via telnet test and double-checked in JMRI Connection definition. In Wireshark I only see three packets (the SYN, SYN-ACK, ACK handshake) when JMRI starts up and nothing more after that. The DCC++ Traffic Monitor (set for raw data) shows a periodic "[packet: s] Status Cmd" entry. I also saw [packet: 1] and [packet: 0] when I tried to send power on/off. But no traffic picked up by Wireshark going out to the Base Station. I also never see a FIN packet set when I shut down JMRI. If I capture a telnet session I see plenty of traffic in Wireshark. I can follow the single byte keystrokes I typed in the telnet window and see the multi-byte packet response from the Base Station. It appears that the JMRI commands are not being output to the Ethernet interface at all when set for DCC++ Ethernet. Hope this info helps!
Trying to connect stack (Mega, Ethernet shield, Motor shield) wireless to JMRI JMRI 4.3.2, DCC++ Ethernet selected, IP and port confirmed Quick question: Where in Base Station code do you enter Network SSID and Wep encryption? I keep getting a connection time out. Thanks Steve
Code for wifi is not yet built into Base Station, just wired Ethernet. We would need to add code for SSID, password, and a few other housekeeping things. Which wifi shield do you have?
It might be better to move the WiFi question over to the WiFi/Ethernet thread... more folks watching that thread might be able to help. Perfectly fine to keep it here, though.... just sayin'... JMRI doesn't really know or care what physical pipe the network connection is made over. It just creates a TCP link with the given IP and port. You could connect to the Base Station via carrier pidgeon, for all JMRI cares...
I also have been unable to get ethernet running - Mega, Arduin.cc clone ethernet, JMRI 4.3.2. I get the following in the JMRI log. It reoeats every time I try a command. 2016-01-27 12:35:04,945 jmrix.AbstractMRTrafficController WARN - sendMessage: Exception: port warn java.lang.ClassCastException: jmri.jmrix.dccpp.network.DCCppEthernetAdapter cannot be cast to jmri.jmrix.dccpp.DCCppPortController [Transmit] Maybe this will help in solving the issue.
This is a basic programming error. I am new to DCC++ and I am waiting for the motor shield. I am planning to use JMRI. The reason for this error is that in some of the code paths they are casting from one type to another that is not compatible. This code path can't have been tested yet. Do you have the call stack in the log file that might give a hint on where the exception is thrown. I can't help you to test/fix it, but perhaps I can help in investigating the reason if I find the JMRI DCC++ code.
I have found some of the code and I am sorry I can't help you at the moment, I have checked the class inheritance and they have one common class. The code in AbstractMRTTrafficController.sendMessage seems to be common to many implementations. I found some traces in code of configuration(xml). Perhaps it is a configuration problem. You must keep in mind that I have just checked the code for JMRI for some minutes but I really want to learn JRMI and DCC++.
Yep. That's pretty much a smoking gun. I should be able to figure it out pretty quickly this evening, when I get time to look into it.
No rush for me. I am using USB connected to a RaspberryPI right now. I just wanted to add some diagnostic info to the thread. I want to use ethernet eventually so the computer is not tethered to the Arduino.
Could someone please explain me how to setup and control turnouts with DCC++ and JMRI? In the past I was using a decoder accessory from ESU named SwitchPilot Servo. I has used this together with Dinamis system. I have no idea how to migrate from this primer system to DCC++. I will be glad if someone could help me. Thanks.
I think I've found the problem. DCCppNetworkAdapter (the parent class of DCCppEthernetAdapter) is supposed to implement the DCCppPortController interface, but it doesn't. I've got the code fixed, and am working on testing it. I'll let you know when there is a build available to try out. If you want to build it yourself, you can pick up the source from the "fixbugs" branch of JMRI on my personal GitHub ... https://github.com/msunderwd/JMRI/tree/fixbugs There is apparently an unrelated problem in the PanelPro code, so... don't try that.