The Use Case
Let’s say you have a Suzuki GSX-R 1000, and you want to eavesdrop on the communication between the engine control unit (ECU) and the dashboard. First, pull over and get off the bike. Never hack a two-wheeled vehicle while riding it! (The same rule applies to jet skis, by the way. For obvious reasons.) To accomplish this, your setup might look a lot like the one in the image below, except that there’d probably be a vehicle involved. A vehicle, and less weird white furniture…
Lab setup for the mini::bike showcase
The lab setup above doesn’t show much. There’s no running engine and no peripherals doing anything. But it does show a mini::stack consisting of a mini::base and a mini::bike, wired with open lines through a breadboard to both the ECU and the dashboard.
The Example
The first step—the one we are documenting here and the one for which we are providing sample code in our GitHub repository—is to dump out the communication from the bus to the serial console:
And there you go. You just dumped status information from the bus of your Suzuki to your serial console. From here, you could use the mini::stack to convert the information to a CAN signal and send it out to another device, such as a data logger.
Be Advised
Our boards do not have an automotive certification. While they are built to last, and the engineering is solid, the components are not "automotive grade." What we have presented above is a laboratory example and is not fit for real-world application. Nor should you try to use this hardware on the open road (even if your vehicle has four wheels). Always be aware that vehicles are dangerous, and make sure you don’t harm yourself or others when tinkering with them.
The Github link doesn't work. Curious if the creator of this page could re-share the code?