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


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 May 6 at 12:05

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 May 6 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 May 6 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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