P1 CAN Vehicle Data
Use P1 to read vehicle data and export it to a CSV file.
Items Used
1x P1
1x Car with OBD-II port
Download P1 Vehicle Data Python Program
After connecting to P1 via SSH, run the command below to download the python program and save it to ~/scripts. (If using putty to SSH, just right click to paste!)
Install Pip
Run the commands below to install the "Pip" package manager and reboot.
Install Python-CAN Library
Run the commands below to install the python-can library and reboot.
Collecting Data
First, start your car, then plug P1 into the OBD-II port and run the data collection program using the command below. (Make sure you're in the home directory beforehand by running the command "cd".) P1 will prompt for a password as the program sets up the CAN0 bus. After entering the password data collection will begin until the program is halted by pressing CTRL-C.
Retrieving Data
To download the CSV file from P1, the command below can be used to host an HTTP server on the port specified, this can then be visited in a web browser (from a computer on the same LAN) and the file(s) downloaded.
Example Results
Last updated