DCC (NMRA) decoder with feedback packets

I have implemented a DCC decoder using the DCC_Decoder-Master library, with Arduino Mega, it works fine.
I want to include now the feedback messages to send back status to the base station.
Could sombody guide me where can I find a project with the right software?
I found libraries to implement decoders only for packets receiving, but I didn´t find any for sending feedback messages, like
Accessory Decoder Information response: 0x42 Addr DATA X-Or

Many thanks in advance for your reply

Please post a link to where you got the DCC decoder library.

Have you Googled for "Arduino DCC controller" ? It may be what you need.

...R

This is the link where downloeded the library

This works fine
The project is shown here:

Only receives packages but doesn´t send back anyone

I was googling for different Arduino DCC decoders, only found DCC ACK pulse but not the feedback packages.

DCC is sooo "last year" :slight_smile: My interest is in Battery Powered Radio Control!

It's a long time since I dabbled with DCC (and wrote a simple decoder) and I don't really understand what you want to do. Maybe you have a link to a short document that explains it (not necessarily in Arduino terms). Maybe there is a document for the specification of responses.

If you want a system that can generate DCC signals and inject them into the DCC bus I imagine that DCC controller examples would be useful.

...R

Thanks Robin2 for your answer.
This is that I was thinking trying to use the sending piece of controller library and adapting it to the decoder.

I'm not sure if you are expecting a response to Reply #4.

Without seeing the specification for what you want to do I have no idea if my suggestion makes sense.

...R

I didn´t expect any answer to reply #4.
The purpose of my query is to implement the feedback messages from the Decoder to the Command Station according to the NMRA DCC specification.
The code included in the decoder before is capable to receive packets from the comand station sent trough the rails on the railway layout.
The NMRA protocol includes the option the decoder can send back a reply to the comand station with the status of the devices (turnouts, trafic lights, servos). This is that I am looking for to implement in the decoder the mechanism to send commands back to the station informing how the devices are.
This feedback message can be sent after receiving an action command or by request of the command station to report devices status.

This is packet sent through the XpressNet interface with the LENZ station
Accessory Decoder
information response
P+0x60+GA 0x42 Addr DATA X-Or
Any idea how can implement the feedback messages on the Arduino decoder will be appreciated.

The datagram attached shows the complete sequence between the elements.
My intention is to implement the messages (in this example) from switch decoder to the master station (blue lines)

Image from Reply #7 so we don't have to download it. See this Image Guide

...R

ardu_man:
feedback messages from the Decoder to the Command Station according to the NMRA DCC specification.

But you have not posted a link to the specification document in spite of two requests to do so :slight_smile:

And, sorry, but I don't understand the diagram. (Maybe it is explained in the specification)

...R