Live data from Hacker News

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

news.voyage.auto

61–70 of 110 posts

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

#61
post #31
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?

I'd argue that a lot of terrorists don't care. They want to do it themselves, die in the process and be glorified by their own. Otherwise they would probably just hide bombs somewhere to detonate them instead of strapping them onto themselves.

Well, humans are capable of improvising better than something automated or pre-positioned. That's the biggest reason. Second, for the terrorist organization itself, people are probably close to free assets (you just brainwash a few more), whereas spending a lot of R&D on developing an automated explosive delivery system and then continuing to patch vulnerabilities in it that governments would use to neutralize it would cost exponentially more.

tl;dr: If you don't care about the sanctity of life, humans are cheap.

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

#62

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…

CAN is just the communication protocol. The diagnostics just ride on top of it.

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

#63
post #3

Does anybody know where the trend is going? Do electric cars have standard buses or are they moving to proprietary (and not published) buses?

Yes, Tesla still uses CAN buses. It has 6 buses if I remember correctly.

True, but bear in mind, the dashboard CAN bus port itself provides almost no access at all, and Tesla actually monitors their cars so they can call and threaten anyone who tries to connect to the actual diagnostics ports, which require a bit more work to get into.

http://jalopnik.com/the-tesla-model-s-is-basically-a-good-lo...

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

#64
CANbus is also on boats and in industrial automation! The physical connectors follow the DeviceNet spec.

Marine applications use a subset of CANbus (with mainly DeviceNet micro connectors) named NMEA 2000. The best repo to get started is probably https://github.com/ttlappalainen/NMEA2000

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

#66
post #50
post #37

CAN Bus is great. I highly recommend reading the CAN Open Spec if your going to be implementing new systems using CAN Bus. https://en.wikipedia.org/wiki/CANopen Many more things besides auto's use CAN. One of my current projects involves exercise equipment that internally speaks CAN Bus. There is great support in Arduino for interfacing with stuff like this.

Isn't CAN very limited in terms of bandwidth? Seems like this wouldn't be appropriate for most applications of interest? When I worked at an equipment manufacturer, everyone was very concerned about accidentally saturating the bus, and we even had a very compact data representation.

Some systems do up to 1mbps. MIDI for example is nowhere near this. It's not the right protocol for media or bandwidth intensive applications but for control systems or reading sensors its often enough.

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

#67
post #50

Earlier quoted context omitted.

Isn't CAN very limited in terms of bandwidth? Seems like this wouldn't be appropriate for most applications of interest? When I worked at an equipment manufacturer, everyone was very concerned about accidentally saturating the bus, and we even had a very compact data representation.

500kbps is typical. That's not super-slow, IMO.

It can also operate at 1Mbps.

There's a relatively recent extension called CAN FD that can go faster, as can the FlexRay protocol, which is sometimes used instead of CAN.

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

#68
post #39

"we flipped the problem (and the OBD-II port) inside out and found naked access to HS1, HS2, HS3 and MS. The solution was on the back of the OBD-II port where all those buses arrive to a device called the Gateway Module." This seems like a critical hack. Is this normal of all (non-ford) cars as well? I'm gonna guess Car mfg's are going to start encrypting the CAN bus [1]. [1]: http://www.eetimes.com/document.asp?doc_…

Unfortunately it's pretty much industry standard that once you have physical access to the relevant CAN bus you can read (and write) everything. The normal protection which is mostly deployed is that the end-user only has access to the CAN bus on the ODB2 interface, which is behind a gateway and should not expose safety critical things. Some car manufacturers however might also only use a single CAN bus for everything, just to save the cost for the gateway.

I'm pretty sure we will see encryption in the future. But currently I'm only aware of efforts for authenticating CAN (and other signal based) communication. If anybody is interested, look for Autosar SecOC module. I'm not too deeply into it, but if it prevents tempering around with the system (like shown in the linked article) it's already a way forward.

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

#69
post #31
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?

I'd argue that a lot of terrorists don't care. They want to do it themselves, die in the process and be glorified by their own. Otherwise they would probably just hide bombs somewhere to detonate them instead of strapping them onto themselves.

Ransomeware devs on the other hand...

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

#70
post #54

Earlier quoted context omitted.

Man, that's really cool. I'm really looking forward to all of this CAN Bus stuff being EOL in 10-25 years so I can get my hands on it at tinker with it.

There are used beds that use the bus available on eBay and other auction sites. Be aware that it's only on their high-end beds, If you're looking to bid on one, know that they weigh over 600 lbs and need wide doorways (ask me how I know..) Current prices are $900 and up, and often don't come with the inflatable mattresses (hospital may not want the potential biohazard liability, so disposes of it first).

Thanks for the tips. I would almost definitely just stash it in my garage while I took it apart.

That actually sounds perfect for a project I've been working on. I think changing your environment really helps with thinking, so I added wheels to my desk/workbench at home. I've been trying to find parts that are inexpensive, reliable, and have enough torque to move an entire workbench, but they are near impossible to find.

My first goal is to add automated raising and lowering of the table surface so I can switch from sitting to standing. Then I want to replace the casters with actual motorized wheels. The plan is to run the whole thing on a bunch of 18650s and use that as my UPS for the electronics on my workbench as well.

Plus I think it would be hilarious to build a desk that you can control from afar, since you have to be at one to use it anyways.

Post reply on HN