Prius 2008 CAN Bus Hacking Guidelines

Discussion in 'Gen 2 Prius Technical Discussion' started by mserour, Nov 7, 2019.

  1. mserour

    mserour New Member

    Joined:
    Nov 7, 2019
    9
    0
    0
    Location:
    Alexandria
    Vehicle:
    2009 Prius
    Model:
    N/A
    Hello guys,

    I am planning to hack a toyota prius 2008 car with ELM327 OBD2, Have someone done this before and have an idea about the signals that I can read and write? or can provide guidelines for the CAN data base of the Prius?
     
  2. Skibob

    Skibob Senior Member

    Joined:
    Sep 14, 2018
    2,705
    1,373
    0
    Location:
    Northern California
    Vehicle:
    2006 Prius
    Model:
    N/A
    Don’t do it. Too many bad things can happen.
     
  3. mserour

    mserour New Member

    Joined:
    Nov 7, 2019
    9
    0
    0
    Location:
    Alexandria
    Vehicle:
    2009 Prius
    Model:
    N/A
    Why not?, can you explain?

    We will hack it to use for a self driving car application, I know the risks but I want to here more from you.
     
  4. 2k1Toaster

    2k1Toaster Brand New Prius Batteries

    Joined:
    Feb 14, 2010
    5,733
    3,334
    0
    Location:
    Rocky Mountains
    Vehicle:
    2006 Prius
    Model:
    Three
    It's extremely easy to do on the bus. The problem is if you are asking this question on how to do it, you are not the person who SHOULD be doing it.

    It is pretty neat though to steer the car from your laptop and that type of thing. But that's custom software and hardware with lots of controls.
     
    Skibob likes this.
  5. Skibob

    Skibob Senior Member

    Joined:
    Sep 14, 2018
    2,705
    1,373
    0
    Location:
    Northern California
    Vehicle:
    2006 Prius
    Model:
    N/A
    Also how would you stop? I don’t think the brakes are fly by wire on a gen 2 Prius. There is a hydraulic backup thru the brake petal.
     
  6. 2k1Toaster

    2k1Toaster Brand New Prius Batteries

    Joined:
    Feb 14, 2010
    5,733
    3,334
    0
    Location:
    Rocky Mountains
    Vehicle:
    2006 Prius
    Model:
    Three
    You can override the pedal input signals, as long as they match, and move the car. It's just two potentiometer readings fed into an ADC and then the CANBus. The thing about CAN is that if you know what you're doing it is easy to snoop and alter messages on the bus without errors.
     
  7. Skibob

    Skibob Senior Member

    Joined:
    Sep 14, 2018
    2,705
    1,373
    0
    Location:
    Northern California
    Vehicle:
    2006 Prius
    Model:
    N/A
    Would that actually move the brake petal?
     
  8. 2k1Toaster

    2k1Toaster Brand New Prius Batteries

    Joined:
    Feb 14, 2010
    5,733
    3,334
    0
    Location:
    Rocky Mountains
    Vehicle:
    2006 Prius
    Model:
    Three
    No it doesn't move the pedal. But it can be overrode. Same reason the accelerator pedal doesn't move when you have cruise control set and it has to speed up.
     
  9. bisco

    bisco cookie crumbler

    Joined:
    May 11, 2005
    83,244
    36,315
    0
    Location:
    boston
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    i don't recall anyone ever covering the signals here. maybe there is something in the tech forum?
     
  10. ChapmanF

    ChapmanF Senior Member

    Joined:
    Mar 30, 2008
    7,758
    5,399
    0
    Location:
    Indiana, USA
    Vehicle:
    2010 Prius
    Model:
    IV
    The go pedal is the one with the two-potentiometers position signal. The brake system is not completely by wire, though Gen 2 was the closest it got. Gen 1 had the hydraulically-boosted master cylinder and Gen 3 brought it back.
     
    NortTexSalv04Prius and Skibob like this.
  11. mserour

    mserour New Member

    Joined:
    Nov 7, 2019
    9
    0
    0
    Location:
    Alexandria
    Vehicle:
    2009 Prius
    Model:
    N/A
    I know how to do it but I was asking for a previous experience.

    If I hack the brake pedal in this generation, will the vehicle brake?
     
  12. mserour

    mserour New Member

    Joined:
    Nov 7, 2019
    9
    0
    0
    Location:
    Alexandria
    Vehicle:
    2009 Prius
    Model:
    N/A
    so if I hacked the brake pedal and faked its value will the vehicle brake without pressing on the brake pedal?
     
  13. dolj

    dolj Senior Member

    Joined:
    May 14, 2012
    3,671
    1,901
    0
    Location:
    Wellington, New Zealand
    Vehicle:
    2006 Prius
    I'm not sure whether you will get too much information here, as I do not recall anything like this being discussed (not to say it hasn't been) before. So, you may well be the pioneer in this endeavor.

    I do hope I am wrong, though.
     
  14. Elektroingenieur

    Elektroingenieur Senior Member

    Joined:
    Jan 8, 2017
    1,365
    1,896
    9
    Location:
    California
    Vehicle:
    2016 Prius
    Model:
    Three Touring
    I’m not sure what you would hack. The skid control ECU doesn’t rely on digital data from a CAN or other multiplex bus to determine the condition of the brake pedal or the driver’s braking demand; instead, it receives analog voltages directly from the brake pedal stroke sensor and master cylinder pressure sensors.

    I’d suggest that you spend some time looking over the “Chassis — Brake” section of the New Car Features book (more info) for the 2004 Prius (NCF255U), and the “Electronically Controlled Brake System” section of the Repair Manual, especially the system diagram, system description, and information for DTCs C1246 and C1247.

    You’ll notice that nearly all of the sensors and actuators for the brake control system are connected directly to the skid control ECU. This ECU does have a CAN bus connection, but on second-generation Prius cars, it’s used only for a few functions, such as getting the readings from the yaw rate and steering angle sensors, and for regenerative braking cooperative control with the hybrid vehicle control ECU (HV ECU).

    That last function is, I think, the opposite of what you’re asking about: the skid control ECU asks the HV ECU to apply regenerative braking, and to the extent the HV ECU reports that it is doing so, the skid control ECU reduces the hydraulic brake force, so the total brake force meets the driver’s demand.

    That said, I can’t say for sure that there is no way to cause braking by sending a message on the CAN bus, but as far as I know, that isn’t how the system—at least on this model—normally works. Later models definitely have that capability, since it’s needed for the Toyota Safety Sense driving support systems.
     
  15. Skibob

    Skibob Senior Member

    Joined:
    Sep 14, 2018
    2,705
    1,373
    0
    Location:
    Northern California
    Vehicle:
    2006 Prius
    Model:
    N/A
    What would happen if the brake Actuator failed and there was nobody in the drivers seat to press the brake petal?
     
  16. ChapmanF

    ChapmanF Senior Member

    Joined:
    Mar 30, 2008
    7,758
    5,399
    0
    Location:
    Indiana, USA
    Vehicle:
    2010 Prius
    Model:
    IV
    It wouldn't make a sound.
     
    NortTexSalv04Prius and dolj like this.
Loading...