How to Create a New Vehicle Profile

A vehicle profile is a JSON file that tells WiCAN how to communicate with the vehicle. It uses the ELM327 protocol instead of sending raw CAN frames, making it as user-friendly as possible. ELM327 is an AT command-based protocol used by all OBD apps and software. This is also important for creating a profile since most EVs have non-standard PIDs to request data, such as EV battery state of health and other vehicle-specific parameters. These PIDs are not publicly available; however, apps like Car Scanner and Torque have a huge database of these PIDs.

To create a profile for a new vehicle, you should use the Car Scanner app and export the logs to get the correct initializations and try to guess the formula or expression for calculating the parameter.

For this tutorial, we will create a new profile for Hyundai Ioniq 9 and demonstrate how to add the State of Charge (SoC) and one additional parameter using a non-standard PID.

Steps to Create a Profile

  1. Plug in WiCAN into the OBD port.
  2. Connect to WiCAN and go to the device configuration page.
  3. Select the ELM327 protocol and disable MQTT if enabled.
  4. Submit the changes and reboot.
  5. In Car Scanner, click on Settings -> Adapter OBDII ELM327 and select WiFi.
  6. Fill in the WiCAN IP/Port based on your device:
    • WiCAN (standard): IP 192.168.80.1, Port 3333
    • WiCAN Pro: IP 192.168.0.10, Port 35000
  7. On the same page, scroll down and click on Advanced settings.
  8. Select the ECU protocol. Usually, it is CAN (11 bit ID, 500 Kbaud), but sometimes it can be a different protocol. Try different protocols until you are able to connect to the ECU. Note that the supported protocols are only CAN:
    6) ISO 15765-4 CAN (11 bit ID, 500 Kbaud)
    7) ISO 15765-4 CAN (29 bit ID, 500 Kbaud)
    8) ISO 15765-4 CAN (11 bit ID, 250 Kbaud)
    9) ISO 15765-4 CAN (29 bit ID, 250 Kbaud)
    
  9. Once you are able to connect and Car Scanner is reading data, press on the SoC sensor and let it read for a few seconds.
  10. Unplug WiCAN from the OBD adapter so that the last data read by Car Scanner is the SoC data. This will make it easier to find the correct PID.
  11. In Car Scanner, go to Settings -> Adapter OBDII ELM327 -> Export log.

The AT commands will usually look like this. Notice that it first starts by sending some initialization commands. You can refer to the ELM327 datasheet to understand what these commands mean. Note that some commands, such as ATD0 and ATH1, will be ignored by WiCAN, so there is no need to include them in the initialization string. The most important command here is ATSP6, which tells WiCAN to set the protocol to 11 bit ID, 500 Kbaud.

ATD

OK

>ATD0
ATD0
OK

>ATE0
ATE0
OK

>ATH1
OK

>ATSP0
OK

>ATE0
OK

>ATH1
OK

>ATM0
OK

>ATS0
OK

>ATAT1
OK

>ATAL
OK

>ATST32
OK
  1. Now in the logs, scroll down near the end of the log. For Hyundai Ioniq 9, the SoC is requested using PID 2201019. You should also note the value of the SoC during logging to validate your formula.
  2. If you scroll up a little, you'll find that some AT commands were sent to set up for the SoC read on Ioniq 9. For WiCAN, you can simplify and include the essential initialization sequence derived from the profile:
    >ATSP6
    OK
    
    >ATSH7E4
    OK
    
    >ATST96
    OK
    
    >ATFCSH7E4
    OK
    
    >ATFCSD300000
    OK
    
    >ATFCSM0
    OK
    ```
    
    
  3. These are the PID initialization commands (init) that WiCAN will send before reading the parameters for Ioniq 9.

Ioniq 9 Example: Build the Profile from Logs

Below is a minimal Ioniq 9 profile snippet showing how to compute SoC from 2201019 and adding one more parameter (HV battery power HV_W). This matches the attached ioniq9.json.

{
    "car_model": "Hyundai: Ioniq9",
    "init": "ATSP6;ATSH7E4;ATST96;ATFCSH7E4;ATFCSD300000;ATFCSM0;",
    "pids": [
        {
            "pid": "2201019",
            "parameters": {
                "SOC": "B10/2",
                "HV_A": "(65536-([B17:B18]))/10",
                "HV_V": "[B19:B20]/10",
                "HV_W": "([B19:B20]/10)*((65536-([B17:B18]))/10)"
            }
        }
    ]
}

Explanation of the formulas:

  • SOC: Byte B10 divided by 2 gives percentage ($SOC = B10 / 2$).
  • HV_V: Two-byte value B19:B20 divided by 10 gives volts.
  • HV_A: Signed current is encoded as $65536 - B17:B18$, then divided by 10 gives amps.
  • HV_W: Power is $HV_V \times HV_A$.

To validate, send 2201019 repeatedly and verify the response bytes map correctly to the expected SoC and power readings. Compare the decoded values with the app’s live readings.

Full Steps Recap for Ioniq 9

  1. Plug in WiCAN and connect via Car Scanner using WiFi:
    • WiCAN (standard): 192.168.80.1, Port 3333
    • WiCAN Pro: 192.168.0.10, Port 35000
  2. Select protocol ISO 15765-4 CAN (11 bit ID, 500 Kbaud).
  3. Let Car Scanner read SoC for a few seconds; note the observed percentage.
  4. Disconnect to freeze the last log entries.
  5. Export logs and identify the repeating PID 2201019 for SoC.
  6. Use the initialization string shown above in your WiCAN profile.
  7. Implement the SoC formula B10/2. Optionally add HV_W using voltage and current as shown.