Live data from Hacker News

An Introduction to the CAN Bus: How to Programmatically Control a Car

news.voyage.auto

71–80 of 110 posts

Re: An Introduction to the CAN Bus: How to Programmatically Control a Car

#71
post #44

Ok, just to clarify... the CAN bus protocol can not be used to control throttle, brakes or steering. Critical stuff like that must be feedback driven. Most manufacturers have their own communication protocol (some on top of the CAN bus). Probably the most researched and hacked bus out there is BMW's I-BUS (Used in MINI, BMW and Range Rover) [1]. You can however flash the ECU through most CAN buses (not in the protoco…

Wrong, on certain cars it can be used to control all three. https://github.com/commaai/openpilot

Okay, cool! Do you know of any more than Honda and Tesla?

Re: An Introduction to the CAN Bus: How to Programmatically Control a Car

#72
post #65
post #55

Ya know Ford supports all this in the open right http://openxcplatform.com/

Does that work only on US cars or internationally?

http://openxcplatform.com/hardware/vehicles.html says: "All Vehicles Sold in the U.S. Since 2008 (OBD-II on CAN)"

Re: An Introduction to the CAN Bus: How to Programmatically Control a Car

#73

So this not that thrilling but my BMW r1200gs has this bus. I dropped the bike recently and killed one of the turn signals. Canbus lit up saying you have a light out. I fixed the turn signal and it still lit up. I thought I needed to reset it or something. Turns out I killed the headlight in the drop as well. Without the canbus it would have been months before I would have caught that. I thought it was a BMW over-the…

Once that light blew, the computer detected half voltage from the headlight circuit, and knew it was a broken. The computer sent a PID code.

When it works, it's great. I have seen it not work though. There's nothing more frustrating than replacing a part, and the PID still won't go out.

My hope is vechicle computer programs just improve.

Re: An Introduction to the CAN Bus: How to Programmatically Control a Car

#74
post #57

Earlier quoted context omitted.

IIRC, US Law mandates a bunch of CAN IDs for general engine diagnostics like fuel flow, o2 sensors, etc. The rest of the CAN IDs are unique to every manufacturer. GM (for instance) Tech Scan tool knows these CAN IDs. Independent 3rd parties can develop a simliar tool and license the CAN IDs from GM for a hefty fee. I imagine Ford has the same service available.

Would it be possible to feed CAN IDs to Tech Scan tool sequentially and thus decode their meaning? Would it be legal?

Might be easier to dump the scan tools firmware. Both are probably about the same legality! :D

Re: An Introduction to the CAN Bus: How to Programmatically Control a Car

#75
post #29
post #2

Interesting - never realized there would be multiple CAN buses in a car. That probably makes it a lot easier to not screw things up - if you know that the medium speed bus is only connected to non-safety-critical systems, then it's easier to trust that when you send out your hand-crafted CAN packets, you're not going to cause anything too drastic to happen.

Indeed. Especially important when you remember that most of the (many!) devices in a car sitting on CAN buses come from outside suppliers, and black-box testing of these modules can only go so far to verify the CAN implementation and stability. AFAIK, Ford actually mandates that their suppliers use a standard CAN stack provided/licensed by Ford (FNOS, the Ford Network Operating System) to try and ensure a level of qu…

My inner five year old hopes that FNOS was developed by the Ford Network Operating Research Division.

Re: An Introduction to the CAN Bus: How to Programmatically Control a Car

#76
post #27

Earlier quoted context omitted.

I have a hard time imagining self-driving cars merely negotiating the traffic I drive in each day much less deal with the myriad foreign policy and security issues that have led us to this point in time. Imagine the lawsuits if it can ever be proved that a murder was committed by someone hacking an automobile--and I do suspect it has already happened. The drive-by-wire gas pedal and shifter in my car cause me concern…

The self driving car doesn't need to be perfect, it needs to be better than humans. That is a much lower bar. Self driving cars have already demonstrated their ability to handle traffic better than humans, but there are other situations where they are much worse.

Yeah, that's the problem. It's easier to be better than humans 95% of the time, but really hard for the next 4% and close to impossible for the last 1.

Re: An Introduction to the CAN Bus: How to Programmatically Control a Car

#77
post #57

Earlier quoted context omitted.

IIRC, US Law mandates a bunch of CAN IDs for general engine diagnostics like fuel flow, o2 sensors, etc. The rest of the CAN IDs are unique to every manufacturer. GM (for instance) Tech Scan tool knows these CAN IDs. Independent 3rd parties can develop a simliar tool and license the CAN IDs from GM for a hefty fee. I imagine Ford has the same service available.

Would it be possible to feed CAN IDs to Tech Scan tool sequentially and thus decode their meaning? Would it be legal?

Easier to bribe some intern or entry-level engineer who has the excel file mapping all the signals from every module on the bus. These used to be passed around pretty openly at the suppliers I worked for, and interns started out making something like $11.50/hr with no benefits.

Re: An Introduction to the CAN Bus: How to Programmatically Control a Car

#79
post #10

Can you imagine the havok when terrorists figure out they can program cars to hunt and kill pedestrians in crowded spaces? Currently the terrorist needs to drive the vehicle, which makes it a suicide mission. How much more deadly would it be if it was reduced to just the cost of the car and a low chance of getting caught? How can we defend against this?

There was a problem in Edmonton ~10 years ago, where criminals would steal a car to get part way home in the winter. Then, they would convert it to a land missile, and launching it across a parking lot, into a mall, in the middle of the night.

Their solution was much simpler: secure the wheel using the seatbelts, jam a big snowball on the accelerator, and use a stick to nudge the transmission from neutral to drive.

Re: An Introduction to the CAN Bus: How to Programmatically Control a Car

#80
post #48

In the last picture in the blog post, does he really run a script for Celsius? Because at 67 degrees you are certainly dead! :D

Why would you be dead at 67 celsius..? I go in to a room near 100 Celsius every weekend (also known as sauna)

If you bring a glass of water with you, does it boil?
Post reply on HN