Giter Site home page Giter Site logo

deggory / toyoyta_radar_control_can Goto Github PK

View Code? Open in Web Editor NEW

This project forked from frk2/toyoyta_radar_control_can

0.0 0.0 0.0 2.92 MB

Reverse engineered can bus messages to enable the automotive Radar found on 2016+ Toyotas with TSS (corolla, Rav4, Highlander, camry)

License: MIT License

Python 100.00%

toyoyta_radar_control_can's Introduction

Toyota Radar spoofer and can controller

Reverse engineered can bus messages to enable the automotive Radar found on 2016+ Toyotas with TSS (corolla, Rav4, Highlander, camry). If you got your radar hooked up by are disappointed by invalid tracks, this will help you turn the radar on so you see something!

Requirements

You'll need:

  • Python3
  • pip3 install cantools
  • pip3 install can

Quickstart

you need to run

git submodule update --init

to fetch the forked opendbc repo thats part of this repository.

Make sure that can1 is connected to the RADAR can bus (Pin 5/6 on the radar unit) and can0 to the CAR CAN bus. (pin 3/2)

Just run ./spoof_dsu.py and you should see output on your terminal like:

faraz@faraz-XPS-15-9560:~/Code/toyoyta_radar_control_can$ ./spoof_dsu.py 
Got VALID track at dist: 2.44
Got VALID track at dist: 2.44
Got VALID track at dist: 2.4
Got VALID track at dist: 2.4
Got VALID track at dist: 2.4
Got VALID track at dist: 2.4
Got VALID track at dist: 2.4
Got VALID track at dist: 2.4

Rejoice! Your radar is alive!

How do I wire up this radar?

Heres the pinout to get you started: Radar pinout

Pin Usage
3 Car can High
2 Car can Low
5 Radar can High
6 Radar can Low
8 12V VCC
1 GND

Some CAN help please?

I have used these two CAN adaptors successfully:

You'll need to buy a particle photon and flash it with the SocketCAN application they have for it to work with Socketcan on linux/mac

  • http://canable.io/ - The default SL-CAN implementation sucks! (it errors out my socket can interface after a while). You'll need to reflash the STM with the new candlelight_fw which used the gs_usb driver so it drivers without socketcan. In this mode this adaptor is rock solid.

You can also use comma.ai's Panda if you can hunt down the can pins on the OBD connector

And thats it!

My radar still does not speak!

Ive been told that the 2018 Toyotas might have a different unit (made by Continental instead of Denso) so consider this code fully tested ONLY on the 2017 Denso radar units.

How did you even?

I actually didn't do the hard work here - the fine folks at comma.ai did! I basically connected this radar to a NEO running openpilot then fooled it into thinking that it needs to turn on using @wocsor's Radar Spoofer. I then sniffed out the exact messages openpilot was sending and correlated then to what I THOUGHT it was sending using openpilot code. Keep on doing this for 12 hours and you are bound to stumble upon the right sequence :D

Why did you do this?

Im building a opensource highway autopilot system for my Kia Soul EV using the Polysync OSCC. Its called OpenCaret. I need a radar to do ACC

toyoyta_radar_control_can's People

Contributors

frk2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.