Testing with Emulated DataΒΆ

At this point, we will assume you’ve set up your development environment and continue on to test it.

You can confirm your development environment is set up correctly by compiling the firmware with the default configuration. This build is not configured to read any particular CAN signals or messages, but it allow you to send On-Board Diagnostic (OBD-II) requests and raw CAN messages for experimentation.

Assuming you have a reference VI from Ford, move to the vi-firmware/src directory and compile for the FORDBOARD platform:

vi-firmware/ $ cd src
Compiling for FORDBOARD...
...lots of output...
Compiled successfully for FORDBOARD running under a bootloader.

There will be a lot more output when you run this but it should end with Compiled successfully.... If you got an error, try and follow what it recommends, then look at the troubleshooting section, and finally ask for help on the Google Group.

The compiled firmware is located at src/build/FORDBOARD/vi-firmware-FORDBOARD.bin. Find the instructions for re-flashing your VI on the supported hardware platforms page and flash with this new firmware. For other platforms, the location will be slightly different in the build directory - e.g. for the CHIPKIT platform it will be at src/build/CHIPKIT/vi-firmware-CHIPKIT.hex.

Finally, test that you can receive the emulated data output stream using the OpenXC Python library:

  1. You should already have the OpenXC Python library installed after running the bootstrap.sh script, but if not, install the library with pip. Don’t forget a USB backend.
  2. Attach the programmed VI to your computer with a USB cable. In Windows, install the VI windows driver.
  3. Run openxc-control version from the command line - it should print out the current firmware version of the attached vehicle interface. If you instead get an error about not being able to find the USB device, make sure the VI has power (look for an LED).
  4. If the version check was successful, run openxc-dump to view the raw data stream of emulated vehicle data coming from the VI.