I want to be able to read Flash memory from Microcontroller using CAN BUS, I was looking for the past few months for some resources to do that but didn't find any, i'm wondering how is that possible since some companies do that I'm looking for a simple example or explaination on how to accomplish that and which tools I need. Thanks

2 Answers 2


In the automotive domain take a close look at the Unified Diagnostic Services (UDS) protocol. Most modern cars implement at least some of the services provided by UDS, typically over the OBD-II CAN interface.

For reading out flash memory, service $35 (Request upload) can be used, if implemented. However, most likely you will have to get security access via service $27 first.

  • Thanks for our helpful answer I read every documentation I could find but couldn't find any sample use case to see how to make a code to implement that.also from reading I think I will have to figure out the ECU id. I hope that someone point me to an example how to use UDS After a bit a research I found that My two ecus use different protocols one use CAN the other one uses KWP (which uses AUD one data line not UDS).but couldn't find how to find ID for this ecu and how to talk to it
    – Jwdsoft
    Commented May 6, 2019 at 12:05
  • I've been looking closely at UDS for the past few months now i understand quite well about it and i know what to do but i couldn't find any example on how to implement it so i can try it out.supposedly i have already the security key how to implement a flash upload and which programming language is the best for this kind of tasks (i can use arduino with a can bus shield to send the can frames and use any other language to interface with the arduino) can any one point me to an example that i can try or a sample code that i can understand and edit to my needs
    – Jwdsoft
    Commented Dec 25, 2019 at 22:32

If the specific ECU you have implements flash reading CAN commands and if you know the command format (and possibly some password necessary to unlock them) then it may be possible.

Unfortunately to discover these commands you need to analyze the firmware so it is somewhat of a chicken and egg problem.

  • I have already a tool that could dump firmware from these ECUs I have. one uses UDS the other one uses AUD (Advanced User Diagnostics).i'm willing to understand how that tool could do it to be able to dump similar ECUs that are not existing in that tool. so if I could be able to sniff on the kline wire to see what the tool sends it would be very helpful but I couldn't find any kline sniffing tool or sketch to use on arduino.
    – Jwdsoft
    Commented May 6, 2019 at 12:09
  • That changes the question pretty much so you should open a new one describing what you have and what you want to achieve.
    – Igor Skochinsky
    Commented May 6, 2019 at 20:08
  • Can you point me to an example on how to use the upload service and get security access (i will find the key my self) i couldn't find any example out there or any book that shows how to do it
    – Jwdsoft
    Commented Dec 25, 2019 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.