On Windows, a driver is required to use the CAN translator’s USB interface. A driver is available in the conf/windows-driver folder. The driver supports both 32- and 64-bit Windows. The driver is generated using the libusb-win32 project.
The OpenXC Python library, in particular the openxc-dashboard tool, is useful for testing the CAN translator with a regular computer, to verify the data received from a vehicle before introducing an Android device. Documentation for this tool (and the list of required dependencies) is available on the OpenXC vehicle interface testing page.
The repository includes a rudimentary CAN bus emulator:
$ make clean
$ make emulator
The emulator generates fakes values for many OpenXC signals and sends them over USB as if it were plugged into a live CAN bus.
The non-embedded platform specific code in this repository includes a unit test suite. It’s a good idea to run the test suite before committing any changes to the git repository.
The test suite uses the check library.
$ sudo apt-get install check
$ sudo pacman -S check
cantranslator/src $ make clean && make test -s
To view debugging information, first compile the firmware with the debugging flag:
$ make clean
$ DEBUG=1 make
$ make flash
When compiled with DEBUG=1, two things happen:
Debug symbols are available in the .elf file generated in the build directory.
Log messages will be output over a UART port (no hardware flow control is required)
- On the chipKIT Max32, logging will be on UART2 (Pin 16 - Tx, Pin 17 - Rx) at 115200 baud.
- On the Blueboard LPC1768H, logging will be on UART0 (Pin P0.3 - Rx, Pin P0.2 - Tx) at 115200 baud.
View this output using an FTDI cable and any of the many available serial terminal monitoring programs, e.g. screen, minicom, etc.