Automate/AutoPID: Mapping between WiCAN and Torque byte indexes #663
philipkocanda
started this conversation in
Show and tell
Replies: 1 comment 3 replies
-
|
Hi Phillip, this is really useful! I'm working on a python script to (semi-)automatically port. I think I've gotten most of it but I still don't understand the occasional 7th digit in WiCAN PIDs (where Torque has 6). Do you? For example, the WiCAN State of Charge Display PID for an Ioniq 5/6 is 2201057 whereas in Torque it's just 220105. Any idea what this is? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Porting over PIDs from Torque mappings found online can be frustrating because they do not align with WiCAN's automate feature - this requires guessing where the correct byte will be. Guess no more - you can use my little look up table instead and save yourself some time and effort. Explanation below the table.
ISO-TP Index: Pure ISO-TP payload index.
WiCAN Index: Index in CAN frame data payload. This is what's used by WiCAN for byte addressing (Automate/AutoPID feature). Because of this it includes the ISO-TP PCI bytes of each frame (one or two bytes, depending on ISO-TP frame type). This is what causes the difference between WiCAN and Torque and what makes porting over known PIDs more difficult.
Torque 1 column: For UDS requests with 1 sub function byte. For instance:
21 01,22 00, etc.Torque 2 column: For UDS requests with 2 sub function bytes. For instance:
22 F1 90(read VIN),22 F1 97(read ECU name).Deeper explanation
Remember the stack we’re typically working with is:
CAN → ISO-TP → UDS
WiCAN operates on the raw CAN data payload, while other tools like Torque and CarScanner typically are ISO-TP and UDS aware. Which is what we’re often most interested in when connected to OBD2.
Why I made this
What my typical use-case is: I want to add PIDs to my vehicle profile, and most of them you find online use the Torque-style letters, for instance:
Hyundai Kona and Kia e-Niro BMS PIDs
Hyundai Ioniq 28 kWh VMCU PIDs
I hope I’m not misunderstanding anything too badly here, not an experienced car hacker by any means. I did verify the mapping however with my Ioniq (2017) and various online resources using the Torque letter coding.
Beta Was this translation helpful? Give feedback.
All reactions