TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC

Tesla CAN bus logging/display with Raspberry Pi

Discussion in 'Model S' started by ben.krasnow, Feb 20, 2017.

  1. ben.krasnow

    ben.krasnow Member

    Jan 25, 2017
    SF Bay Area
    I posted a video about my project in which I use a Raspberry Pi to display realtime CAN bus data in the car's own web browser.

    Let me know if you have any questions. -Ben

    Shortcut to the links:

    I show how to collect detailed CAN bus data from a Tesla Model S, and display it in the car's own web browser!

    Complete Raspberry Pi with CAN bus shield and 12V buck converter: Raspberry Pi 3 System With CAN Bus Interface

    Diagnostic connector pinout (scroll through the images):
    EVTV Motor Verks Store: Tesla Model S and Model X CAN Monitor, OEM Electric Vehicle Items, TeslaCANKit

    Tesla diagnostic connector: Tesla Diagnostic Cable For MS/MX (Sept 2015 and up) - Bare Wire Version

    RPi CAN bus tutorial: CANned Pi: (Part1)

    Get node.js installed on the RPi: Guide to Installing Node.js on a Raspberry Pi | thisDaveJ

    I used, which is a module that installs into node.js:

    Basic sequence to setup the server on the Pi:
    sudo ip link set can0 type can bitrate 500000 listen-only on
    sudo ip link set can0 up

    candump -cae can0,0:0,#FFFFFFFF

    candump -cae can0,0:0,#FFFFFFFF | grep 106 | awk -Winteractive '{ print $10}' | node app.js

    Tesla CAN bus reverse engineering: wk057's SkieNET

    I will post the node.js code on my blog:
    Ben Krasnow
    • Like x 6
    • Helpful x 1
    • Informative x 1
    • Love x 1
  2. davidc18

    davidc18 Active Member

    Apr 25, 2015
    Ft. Lauderdale
    Looking forward to part 2
  3. Skysurfer

    Skysurfer Member

    Aug 14, 2016
    Very nice work. Thank you for posting this! I have been searching for a decent Linux CAN setup for doing analysis on my Model S. This will certainly improve over the current Android setup I have and looks like I may be able to feed in some old captures I have for better analysis.

    Looking forward to the ultimate graphing/performance monitor you are working on!

    Wonder what the best solution is to keep the Raspberry Pi firewalled from the internet connection? Maybe acting as a bridge or some other clever routing manipulation can accomplish this.
  4. Drewflux

    Drewflux Member

    Aug 25, 2015
    Great work Ben. I enjoyed your first video. I have a question on getting the web browser to connect. After the initial connection, could you remove the usb tethering?

Share This Page

  • About Us

    Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.
  • Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.