An Introduction to the CAN Bus: How to Programmatically Control a Car
news.voyage.auto
news.voyage.auto
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.
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.
Spot the Orderly?
The bizarre story was we had an employee that was diabetic, and she passed out one day. When the paramedics arrived, they found her already sitting in a hospital bed.
- CAN is very slow despite high baudrates. As used in automotive max 40% of all bits are actual databits. That value is for frames with 8 bytes. For 4 bytes that drops to 25% so people avoid these frames. That means in practice one gets only 1500 frames/s at a typical 250kbps.
- a roundtrip takes 2 frames because the CAN request frame is broken to the point that standards like J1939 do not use it.
- CAN-B error detection mechanism has holes in it due to bit-stuffing. Effectively the CRC is circumvented, so error detection rates are nowhere near the projections made in the design documents.
- CAN-FD increases the payload, stuffing 5x (typical) more databits in the same frame. That means bits are transmitted at only 22% of the datarate, worse for higher datarates, much worse for frames with only 8 bytes. CAN-FD hardly improves latency or the frame-rate, but it does much improve error-detection rates.
So the take-away here is, yes, CAN sucks, quite badly. CAN-FD improvements really only suit niche applications.
It is possible to do much better and achieve roughly 4x the CAN-B performance (on metrics such as throughput, latency and robustness (all of them)), on the same bus.
But not for the self-driving car generation, where the sensors are higher-bandwidth.
As I recall, Mobileye worked around this by just putting the detection intelligence with the camera and sending back synthetic data.
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.
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-top thing but it actually helped me, it was the daylight running headlight that went out. Good to have that one.
Like I said, not thrilling, not programming, but an upvote for the Canbus.
The reason terrorists don't do that has nothing to do with being hard.
> The reason terrorists don't do that has nothing to do with being hard.
This is false. Remote-controlled VBIEDs are absolutely a thing
What he's saying is not false.
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.
just throw in a off the shelf servo to control the steering wheel and two more to run the brakes and gas. Throw in a off the shelf RC controller and you got yourself a giant RC car.
Probably faster than trying to hack a car when you got a perfectly good no authentication interface.
Put another way, it's not a hostile actor remotely controlling their own vehicle that worries me the most, it's the potential for a hostile actor to identify a vulnerability that lets them remotely control many other people's vehicles simultaneously.
It's also the lack of any way for even a relatively discerning customer looking for a new car to determine how likely any potential purchase is to be vulnerable to such an attack and how likely the manufacturer would be to anticipate and/or respond to such a vulnerability.
Given the generally awful attitude of the auto industry to safety and generally poor processes for handling even recalls for widespread and acknowledged mechanical failures, buying a new car is not looking like a happy experience any time soon.
We defend against killer-remote-control-cars like we defend against all forms of terrorism: plain old police and intelligence work to snatch the perps before they have a chance to strike.
tl;dr: If you don't care about the sanctity of life, humans are cheap.
Also, there is no connection between "hacking" the CAN bus in today's cars and doing anything like providing access to adjust the A/C blower level in some future self-driving livery mobile. Why anyone would think there would be even the remotest connection between how CAN bus works today and how some future consumer-oriented interface would work demonstrates dangerous naviete.
If your CAN nodes are all authenticated to one another, it's a lot harder to hack.
The downside is that they're a lot harder to hack, in the good sense of the term.
The problem with that is now how do you do the legitimate good things you want to do? Of course, these kinds of locks usually have their own problems and usually only keep "honest folks" out.
John Deere would love it though.
https://copyright.gov/1201/2015/comments-032715/class%2021/J...
Though I agree, ROS is nowhere near the stability level needed by industrial and automotive products. It's great for prototyping, but one has to keep in mind the inevitable refactoring of the communication layer, and keep the core functionality ROS-independent.
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].
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.
There is naked access to CAN all over the vehicle, it only firewalls the OBDII port because it's function is primarily to observe the vehicle (error codes, states, etc) with small exceptions such as clearing codes.
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
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 quality in implementations. It's a good idea, one I haven't heard of other automakers doing (although I'm not in the industry any more)
https://erlangcentral.org/videos/testing-automotive-software... http://www.cs.tufts.edu/~nr/cs257/archive/john-hughes/quviq-...
Some pics and text (sorry, Russian only for now)
- clock (can be taken from 2010+ GPSM module or from external RTC clock - DS3231 based) - tire pressure (from broadcasts 2010+ or from Ford TPMS protocol 2008+) - tire temp (from TPMS protocol) - RPM - engine temp - current speed
units are configurable (12/24h clock, psi/kpa pressure, C/F temperature)
Probably will share code and PCBs on github soon, now this thingy is under heavy test in my car and other cars of some enthusiastic guys
There are plans to extend the device with CAN proxy to allow it to work together with stock headunit and also sit on both HS and MS can buses to get more data do display
Edit: The Wikipedia entry's description makes no sense. The hottest saunas have low humidity levels produced by pouring water on hot stones? And the people in the sauna are below the dew point and so have condensation forming on them rather than evaporating? How then do they shed the heat?
https://www.youtube.com/watch?v=MEYCU62yeYk and the mentioned paper i assume is https://ioactive.com/pdfs/IOActive_Remote_Car_Hacking.pdf
I expected to find some vehicle simulator that allows me to load several car specs, similar to a flight simulator. Plus integration of some advanced racing / driving software - I could not find any of these, but I am not an expert in this field.
Where to find these? THANKS!
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 protocol, but info about it can be found for most cars). And from there, one can interfere with the throttle.
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.
While CAN and LIN are used everywhere Flexray and MOST are used in different domains: Flexray for driving/safety related functions and MOST for infotainment.
CAN will have a speed improved version CAN FD, which might see a lot of use in the more driving related ECUs - some say it might replace FlexRay uses there.
Afaik SecOC can and will be used for all kinds of PDU based communication (Ethernet and CAN). The amount of PDUs which will be transmitted over Ethernet vs. classical bus systems will very heavily from OEM to OEM. Some are more invested in Ethernet, others not.
http://jalopnik.com/the-tesla-model-s-is-basically-a-good-lo...
They haven't pulled that shit of calling people in a while.
They may not be calling people, but you'd better believe they're still monitoring them.