It was gently running at low speed then it stopped, lights out. It is detected by the programmer, brand, address, everything. When reading or writing CVs it moves (jerks as expected) and the light flashes so connections are ok. In analog mode, i.e. with DC it runs and even the light effect works. But does not respond to DCC commands. Other locos run ok on the tracks. What happened?
If it responds then I assume the decoder is still OK. Maybe the wire from the decoder to the motor is missing or the motor is fried.
Do a factory reset of the decoder and then reprogram. If the decoder is responding to CV writes, it isn't dead, but it may have lost its mind. You need to try a brain transplant with a factory reset and reprogram.
I can't from JMRI as in the CV sheet, that CV has Write option disabled. And from the Arduino IDE monitor serial, the command returns -1 indicating failure. It reads the value so there is no any connection issue. But the reset value (210 in CV8 for this decoder) can't be set.
From the roster entry page in JMRI try the restore to defaults box and then write the "basic" sheet . That should work I think . You might even try just re writing the "basic" sheet first . I've had a couple locos that drove me crazy because they forgot who they were , and this worked for me .
SOLVED. The decoder is a 2-function LDH. I deleted the entry from the roster, reinstalled the xml config. file, I edited the CV8 definition in the xml file as it was readonly, but I didn't haver to reset it, when I installed the loco again using the Identify option, it was now number 3. Rewrote all the CVs and now it is working ok.
Great! Happy ending. Sometimes decoders seem to spontaneously corrupt their programming for no apparent reason. I've had this happen on ESU LokSound, Lenz, and others (rarely, but it has happened). If the decoder appears to be accepting programming commands, and therefore clearly isn't "dead," then the standard troubleshooting is to do a factory reset and reprogram. In your case, it appears that for some unknown reason, the decoder reset itself (hence, back to address 03). But all is well that ends well. John C.
What I failed to say, though I'm not sure it was the smoking gun, is that I tried to add a Saty Alive capacitor connected to the blue positive common and the black negative, and maybe this one was not the "true" negative wire (I had measured DC voltage between those two wires anyway). But the loco worked fine for some hours, and there were neither smoke nor smell. I finally took the cap out when the problem of stalling was identified as too much slack in the wheels, which I fixed by adding a plastic sheet between the wheels glued to the trucks' base.
CV29 has wrong value ( when lights work but moter fails to respond in DCC, this is typicaly the problem) you didn't specify your loco address (ie: 2 or 4 digits) if loco is 2 digit (1 to 127) CV29 should be 06 if loco is 4 digit (128 to 9999) CV29 should be 38 add 1 if normal direction is reversed.