Thread: UDS with C

  1. #1
    Registered User
    Join Date
    Dec 2016
    Posts
    87

    UDS with C

    Good day! Thanks for the help so far guys! Here is my latest question.

    I am interested in creating a software that will communicate with a car TCU(ECU) through CAN or CAN FD, something like Vector CANoe, Ediabas, Diagra D and etc.

    The idea is to send a request(example 0x10 0x01) and receive a response(0x50 0x01 from the control unit. I will connect the control unit to the PC through some CAN to USB cable. Or I will use it on a real car.

    Does anyone have experience with this? Would you recommend some ready libraries or some idea? How hard is it to communicate with the CAN?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    38,165
    Unless you really know what you're doing, use libraries wherever you can.

    I don't know if you can completely trash a car if you touch the wrong thing with your fumbling around.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Dec 2016
    Posts
    87
    Thank you for the advice! In that case I will get a company car, which I can trash.

  4. #4
    Registered User
    Join Date
    Apr 2019
    Posts
    662
    unless the ecu is capable of being updated then i would of thought that damage would be minimal. if it can be updated you can really screw things up big time and shouldn't be touched with or without libraries unless you really and i mean really understand what your doing.
    not many mechanics don't have a clue and are only capable of plugging in the code reader and reading a fault code off the screen 99% of the time they haven't a clue what the ecu is trying to tell them.

  5. #5
    Registered User
    Join Date
    Dec 2016
    Posts
    87
    We have a simulated car, on which we change the TCU and test it. I can flash it, erase the EEPROM and take measurements. 1 of our tools is sending and receiving UDS services. I need this part only, example send 0x10 0x01, receive 0x50 0x01. Its basically sending a UDS request by CAN(and on a CAN ID) and receiving a response on the CAN(different CAN ID).

    This is all I need for this C project.

  6. #6
    Registered User
    Join Date
    Apr 2019
    Posts
    662
    oh im with you now i thought from your post you were wanting to hook it up to the car and make changes i didn't realize it was a test bed sorry

  7. #7
    Registered User
    Join Date
    Dec 2016
    Posts
    87
    No problem, I appreciate the warnings.

    I have had the chance to take a loot at these tools, and they are installed on a computer with a graphical user interface(this is already programmed) and they send a UDS through USB(you must select on which USB adapter the tool should connect) and from that USB it goes through the USB adapter (VN1610) found here VN1600 - Network Interface for CAN, CAN FD, LIN, K-Line, J1708 and IO | Vector
    I need to know how to send a request through this USB adapter on a CAN ID(example 0x400) and receive too some information. I don't believe it should be this hard?

Popular pages Recent additions subscribe to a feed

Tags for this Thread