Ok, no one else replied so I had to just start the work on my own. I'll share my learnings so far in case anyone is interested in doing something similar. First and foremost you'll need a cable to connect to the OBD port which is the red capped connector underneath the seat. I ordered this one from amazon
https://a.co/d/8oZR6vU confirmed to work. From there I used an ESP32 dev board
https://a.co/d/9in28Rz and a CAN Bus transceiver
https://a.co/d/75fQKz0 and finally an SD card reader
https://a.co/d/af7i9F2 like that one.
Now, you can google to find out how to hook all those items together and get the basics of the programming figured out. The challenging part was then getting the data into a tool that would help reverse engineer. For that I used
Home which is a great tool but it took some work to figure out how to get the data into that tool. It is designed to work with specific devices and there are some firmware options out there too. I finally figured out that the following log format would work.
CSV File with the following fields:
- Time Stamp
- ID (CAN Frame Message ID)
- Extended (0 or 1 indicating whether the frame is an extended frame or not)
- Dir (Tx or Rx indicating whether the message is a transmit or a receive)
- Bus (Numeric value indicating the bus, R7 you can just use 1)
- LEN (Numeric value indicating the length of bytes being sent in the CAN message)
- D1 - D8 (Individual comma separated values containing the HEX values for each of the CAN data frames)
From there I simply used the online Arduino libraries to capture the CAN data and put it into this format. I started off sending this data over serial and capturing it on my computer using another app I wrote. However, this isn't usable for when you want to ride and capture data to analyze later. So I changed the Arduino code to simply log this to a unique file on the SD card with a .csv extension and the fields as indicated above.
With all of that out of the way it was time to start trying to figure out what all these messages meant. That is where SavvyCAN is helpful. It provides tools to visualize the data and help identify what all these messages mean. It is still early but so far I have the following:
- Throttle position. This comes through with MsgID = 0x216 or decimal value 534. In this message byte 2 will contain a decimal value of the throttle position. The range is 33 - 208. I'm not sure why these values but they work. From there you can calculate throttle position as a percentage. Math formula's for this are online.
- RPM's. This comes through with MsgID = 0x20A or decimal value 534. In this message byte 0 will contain a 2 digit representation of the RPM's. Simply multiply that by 100 and you have your numeric representation of the RPM's.
That's it for now, I need to work on some more items so that I can mount the logger and ride the motorcycle. Hopefully that will help reveal some of the other values I'm looking for. I'd like to get brake application, wheel speed, engine temp, gear, and a few others. Hopefully this helps someone else if they decide to take on a project like this. Warning, it is tedious and a lot of time. However, when you start seeing meaningful values it really does bring a sense of satisfaction.