Synopsis: I made my own scan tool to clear my check engine light.
Background: The other day I set my 2019 Yamaha Tracer on the center stand, put it in gear, and "drove" in place. As many of us have discovered, this triggers a check engine light that is persistent across hard power cycles.
Failed Attempts: I made an adapter to go from the 4-pin Yamaha diagnostic connector to the 16-pin automotive OBD-II connector. I then connected my cheap automotive code reader, but it couldn't establish communication. I tried two other low cost code readers and a high cost Autel scan tool, but none of them could communicate.
My Solution: Being too stubborn to admit defeat and take it to the dealership, I made my own scan tool. I used an Arduino Nano, a Microchip MCP2515, a couple open source CAN hacker libraries, and can-utils packaged for Linux Mint. I was able to see all the Tracer's internal CAN bus communication between devices such as the ECU, the ABS module, and the instrument cluster. I was fascinated to see the CAN messages change in response to inputs such as wheel speed, throttle position, and drive mode selection. Thanks to wikipedia.org/wiki/OBD-II_PIDs, I learned how to query for existing diagnostic trouble codes (send 01 03 CC CC CC CC CC CC using ID 7DF) and clear the DTCs (7DF#0104CCCCCCCCCCCC). And with that, the malfunction indicator lamp was finally off.
Message me if you want more info.