34C3: Using Your Car As Video Game Controller

Despite the presence of human drivers, modern cars are controlled by computers. In his talk at the Chaos Communication Congress [Guillaume Heilles] and [P1kachu] demonstrate the potential of taking control of a car’s computer. This of course leads to the natural conclusion of emulate an Xbox controller and using the car to play computer games.

His research was limited by the fact that the only cars they had access to were the daily drivers of different members of [P1kachu]’s family, which meant that all tinkering had to be strictly non-destructive. Despite this, they achieved impressive results and deliver a great introduction into reverse engineering.

[P1kachu] used a RasPi and an OBD-II adapter to access the car’s CAN bus and begins the presentation with a quick overview of the protocol. He then briefly touches on security measures that he ran into, which are optional and their implementation varies widely between manufacturers. His first attempt to access the CAN bus was successfully blocked by a challenge-response algorithm doing its work. His mother’s convertible however provided no such obstacles and gaining access allowed him to map the position of the steering wheel and pedals to a game controller, using the car to play video games.

After this, [Guillaume] steps in and walks us through the teardown of a gadget that plugs into the OBD-II port and claims to do amazing things for your car’s mileage by reprogramming the ECU. The device was not brand specific and after having seen the variations in the ways different manufacturers implement the protocol, [Guillaume] and [P1kachu] doubted that the gadget was capable of even holding the information required to modify every known implementation out there. Listening to the output of the device, along with a quick analysis of the circuit followed by decapping the single chip they found, showed that their doubt was justified. The lecture closes with an extended Q&A that adds more information on car hacking. Those that don’t have access to a car can instead tear down hot glue guns, doppler modules or antique calculators.

Continue reading “34C3: Using Your Car As Video Game Controller”

Turn A Car Into A Game Controller

The CAN bus has become a staple of automotive engineering since it was introduced in the late ’80s, but in parallel with the spread of electronic devices almost every single piece of equipment inside a car has been put on the CAN bus. While there are opinions on whether or not this is a good thing, the reality is that enough data is gathered on this bus to turn an unmodified modern car into a video game controller with just a little bit of code.

The core of [Scott]’s project is a laptop and a Python program that scrapes information about the car from the car’s CAN bus, including positions of the pedals and the steering wheel. This information can be accessed by plugging an adapter into the OBD-II port (a standard for all cars made after 1995). From there, the laptop parses the CAN data into keyboard and mouse commands for your video game of choice.

This is an interesting investigation into the nitty-gritty of the CAN bus, but also a less dangerous demonstration of all of the data available from the car than some other cases we’ve seen. At least [Scott]’s Mazda (presumably) lacks any wireless attack vectors!

Continue reading “Turn A Car Into A Game Controller”

Get Your Hands On A 2017 Hackaday Superconference Badge

We just got the shipment of hot Hackaday Superconference badges in our hands yesterday, and they’re frankly awesome. Due to great manufacturing partners and a fantastic design by [Mike Harrison], we ended up with too few manufacturing defects and too many badges. How’s that for a nice problem to have?

But our gain is your gain! We have enough badges for everyone who’s coming to the con, and we’re selling the rest on Tindie.

In case you missed it, the badge is a digital video camera, or at least that’s how it’s going to start out its life. It’s got a camera sensor, enough processing power on-board to handle the image data, a screen, and SD card storage. It’s also got a good assortment of buttons, and more importantly, prototyping space and an abundance of pins broken out for you to play with. For the nitty-gritty, see the badge’s Hackaday.io project page. We’ve coded up the obvious applications, added in some challenging puzzles, and now we’re handing them off to you.

Hackaday Badge History

What will you do with them? That remains to be seen. The first time we put on a Supercon, we made the best badge you’ve ever seen — a blank protoboard, and a big pile of parts. Add in an enthusiastic and creative crowd, and out pops magic. Last year, [Voja] produced a badge with finesse and more resources, adding blinkies, IR, and an accelerometer, and we saw hacks making use of each of the features. This year, we’ve pushed it even further. Now it’s your turn.

The Superconference is this weekend, and a few hundred Hackaday hackers will get their hands on this lump of open hardware. Something fantastic is certainly going to happen. If you couldn’t make it but still want to play along, now’s your chance!

Conference badges are a fantastic playground for hardware hackers: they’re a small enough project to get done, but large enough to do something interesting. Some badges, like [Brian Benchoff]’s badge for Tindie, are minimalistic. Others, like this unofficial badge for DEFCON, are quadcopters. In between, there’s room for artistry and aesthetics and just plain cleverness. And don’t forget utility. The 2017 Layer One conference badge (here on Hackaday.io) is easily converted into an OBD II CAN bus sniffer or a video game machine — your pick.

Hackaday loves custom hardware and badges like this are more than just a PCB full of components. They’re a piece of the culture from the event where they made their debut. We’re happy we can share that with some of the hackers who couldn’t make it to Supercon this year.

Microcontroller Load Meter Tells You How Hard It’s Currently Working

Writing code for embedded applications can be difficult. There are all sorts of problems you can run into – race conditions, conflicting peripherals, unexpected program flow – any of these can cause havoc with your project. One thing that can really mess things up is if your microcontroller is getting stuck on a routine – without the right debugging hardware and software, this can be a tricky one to spot. [Terry] developed a microcontroller load meter just for this purpose.

It’s a simple setup – a routine named loadmeter-task on the microcontroller sends a train of pulses to a mechanical ammeter. The ammeter is then adjusted with a trimpot to read “0” when the chip is unloaded. As other tasks steal CPU time, there’s less time for loadmeter-task to send its pulses, so the meter falls to the left.

Overall it’s a quick and easy bit of code you could add to any project with a spare GPIO pin, that might help you debug. Plus it’s cool to know how hard your project is pushing the silicon.

If you’d like to know more about what your chip is doing, check out this post about the usefulness of in-circuit debugging, or read about Bil Herd’s experiments with ICE and OBD-II.

Reverse-Engineering The Peugeot 207’s CAN Bus

Here’s a classic “one thing led to another” car hack. [Alexandre Blin] wanted a reversing camera for his old Peugeot 207 and went down a rabbit hole which led him to do some extreme CAN bus reverse-engineering with Arduino and iOS. Buying an expensive bezel, a cheap HDMI display, an Arduino, a CAN bus shield, an iPod touch with a ghetto serial interface cable that didn’t work out, a HM-10 BLE module, an iPad 4S, the camera itself, and about a year and a half of working on it intermittently, he finally emerged poorer by about 275€, but victorious in a job well done. A company retrofit would not only have cost him a lot more, but would have deprived him of everything that he learned along the way.

Adding the camera was the easiest part of the exercise when he found an after-market version specifically meant for his 207 model. The original non-graphical display had to make room for a new HDMI display and a fresh bezel, which cost him much more than the display. Besides displaying the camera image when reversing, the new display also needed to show all of the other entertainment system information. This couldn’t be obtained from the OBD-II port but the CAN bus looked promising, although he couldn’t find any details for his model initially. But with over 2.5 million of the 207’s on the road, it wasn’t long before [Alexandre] hit jackpot in a French University student project who used a 207 to study the CAN bus. The 207’s CAN bus system was sub-divided in to three separate buses and the “comfort” bus provided all the data he needed. To decode the CAN frames, he used an Arduino, a CAN bus shield and a python script to visualize the data, checking to see which frames changed when he performed certain functions — such as changing volume or putting the gear in reverse, for example.

The Arduino could not drive the HDMI display directly, so he needed additional hardware to complete his hack. While a Raspberry Pi would have been ideal, [Alexandre] is an iOS developer so he naturally gravitated towards the Apple ecosystem. He connected an old iPod to the Arduino via a serial connection from the Dock port on the iPod. But using the Apple HDMI adapter to connect to the display broke the serial connection, so he had to put his thinking cap back on. This time, he used a HM-10 BLE module connected to the Arduino, and replaced the older iPod Touch (which didn’t support BLE) with a more modern iPhone 4S. Once he had all the bits and pieces working, it wasn’t too long before he could wrap up this long drawn upgrade, but the final result looks as good as a factory original. Check out the video after the break.

It’s great to read about these kinds of hacks where the hacker digs in his feet and doesn’t give up until it’s done and dusted. And thanks to his detailed post, and all the code shared on his GitHub repository, it should be easy to replicate this the second time around, for those looking to upgrade their old 207. And if you’re looking for inspiration, check out this great Homemade Subaru Head Unit Upgrade.

Continue reading “Reverse-Engineering The Peugeot 207’s CAN Bus”

First Look: Macchina M2

In the past few years, we’ve seen a growth in car hacking. Newer tools are being released, which makes it faster and cheaper to get into automotive tinkering. Today we’re taking a first look at the M2, a new device from the folks at Macchina.

The Macchina M1 was the first release of a hacker friendly automotive device from the company. This was an Arduino compatible board, which kept the Arduino form factor but added interface hardware for the protocols most commonly found in cars. This allowed for anyone familiar with Arduino to start tinkering with cars in a familiar fashion. The form factor was convenient for adding standard shields, but was a bit large for using as a device connected to the industry standard OBD-II connector under the dash.

The Macchina M2 is a redesign that crams the M1’s feature set into a smaller form factor, modularizes the design, and adds some new features. With their Kickstarter launching today, they sent us a developer kit to review. Here’s our first look at the device.

Continue reading “First Look: Macchina M2”

Maintenance, Emissions, And Privacy: The OBD Story

The 90s were a pivotal time in world history, and 1996 was no different. You might have spent the year glued to the TV playing Super Mario 64, or perhaps you were busy campaigning for Bill Clinton or Bob Dole, or maybe you were so depressed that Princess Diana and Prince Charles divorced that you spent the whole year locked in your room, a prisoner of your own existential nihilism. Whatever you did, though, it’s likely that one major event passed you by without a thought: The standardization of on-board vehicle diagnostics (in the US), otherwise known as OBD-II.

In the 1970s, vehicles (in some western countries, at least) were subject to ever-increasing restrictions on emissions. Most companies began switching from carburetors to efficient fuel injection systems, but even that wouldn’t be enough for the new standards. Cars began to carry rudimentary computer systems to manage and control the influx of valves, meters, and sensors that became the new norm. And, as one would guess, every car company had their own standard for managing and monitoring these computer systems. Eventually they would settle on the OBD system that we have today.

Continue reading “Maintenance, Emissions, And Privacy: The OBD Story”