ToyotaInfoTech / RAMN

RAMN (Resistant Automotive Miniature Network), a miniature CAN/CAN-FD testbed of 4 Electronic Control Units.
Other
100 stars 14 forks source link

How can I add more DTC to RAMN? #24

Open AdonaiDiazEsparza opened 3 days ago

AdonaiDiazEsparza commented 3 days ago

Hi, Im using the RAMN project to develop a "scanner" for DTC in cars with UDS protocol, my only question is how can I "introduce" or add more DTC codes? The intention is to know how the CAN frames are sent when It has more DTC storaged. I don't know if I'm missing to read something from the documentation... so I'll be waiting for your answer. Thank you and you've been created a great project!

CamilleTTT commented 2 days ago

Hello!

This is the part of the code that adds DTCs at startup (if no DTC is recorded): https://github.com/ToyotaInfoTech/RAMN/blob/d8d8874298aa42baafdbf2c3e51a3da159633783/firmware/RAMNV1/Core/Src/main.c#L431

You can use the functions in ramn_dtc.h to add or clear DTCs. Note that the implementation is simplified, but we also have an alternative firmware with a better UDS implementation following the standard more closely. If you let me know what features you need, I can try and include them in this repo.

AdonaiDiazEsparza commented 2 days ago

Hi, thanks for the answer. So I must modify the firmware directly and reflash the RAMN board? Watching the code I think it will be like that 😅 I thought there was a script as tool to set the DTC's. If you can create it, will be so helpfull for the users.

CamilleTTT commented 21 hours ago

I can quickly add a routine control (0x0208) to add arbitrary DTCs. For example, use UDS command "31 01 02 08 " to add the specified DTC. Would that be enough for your needs?

AdonaiDiazEsparza commented 18 hours ago

Okay, yes for sure, it will be helpful, Im interacting with the CANBUS network so will be easier sending the command. If I had more questions Can I send them??

And I congratulate you, you have a great project! 🙌