869f12321 Hyundai: counter check (#530) a4390713e gitignore for route logs ac1b64e62 Fix CAN Ignition for Black Panda and Uno (#526) 273e3882f When initializing all the CAN busses, make sure the are also cleared (#527) c2bea78f6 Fix python library on Windows (#523) 0a123b181 that too ba6355d4c unused lines c9102c00e Chrysler: use can packer in safety tests (#522) 9874e7335 Abstract steering safety tests for Toyota and Chrysler (#520) 2299ecffc Block 0xe5 (Honda Bosch) at the panda/uno. Only allow static values. (#515) 351730611 Subaru: fix steer torque scaling (#501) 0bc864b3d Make torque-based steering state global (#518) d9355c414 Make cruise_engaged_prev a global + test case for it (#519) 211537641 Abstract sample speed test (#516) 11dc9054f remove unused function e5a586eea Abstract gas interceptor tests (#517) 1dbed65e3 Safety Test Refactor: Honda (#495) 0632710ac base class for different panda safety tests bd98fe603 safety tests: use shorter function name ba59ada0e No ESP in non-white (#514) c3336180b Fix the CAN init fix (#513) 884afa0ef Safety Test Refactor: Chrysler and Volkswagen PQ (#508) d77b72d16 Safety Test Refactor: Nissan (#510) 4c7755c47 Match Panda DFU entry fix in "make recover" process (#509) 0336f625d Pedal gas pressed safety limits (#507) 715b1a169 Hyundai-Kia-Genesis (HKG) (#503) 6f105e827 Safety Test Refactor: Subaru (#502) 57cc954f2 Safety Test Refactor: GM (#504) dd01c3b9c Safety Test Refactor: Hyundai (#505) 592c2c864 add support to can_unique.py for Cabana CSV format. (#506) ccf13b7af No more infinite while loops in CAN init (#499) 6c442b4c3 Safety Test Refactor: Volkswagen MQB (#493) f07a6ee7c panda recover should go through bootstub first (#498) 8cc3a3570 remove cadillac (#496) 62e4d3c36 Chrysler: fix missing button signal on TX (#490) abce8f32b Safety Test Refactor: Toyota + support code (#491) 500370aec Make sure relay faults make it to the health packet (#492) bc90b60f9 toyota: use universal gas pressed bit (#488) 74d10ccd3 Fixed possible race condition (#487) a05361ebc cleanup safety_replay dockerfile (#486) fe73dcc91 Openpilot-tools is deprecated (#484) da8e00f11 TX message guaranteed delivery (#421) d8f618492 Add ISO number for longitudinal limits flag comment 6a60b7811 touch ups 2ce65361d comments on unsafe flags d88013450 remove from there as well 055ea07ee remove that unsafe flag since it isn't implemented and it's unclear how to 4e98bbe8c Apply unsafe allow gas mode to all cars. (#480) 0c2c14949 Fixing libusb busy error (#174) 753c42cf5 Update Board Mac SDK Install script to work on clean mac (#146) b9a9ea395 Unsafe gas disengage mods, fix test compile warning (#481) 08ef92d58 Safety model for Volkswagen PQ35/PQ46/NMS (#474) 51e0a55d6 Support code for unsafe mode unit tests (#478) 5325b62bb current_safety_mode 7908b7224 update updating unsafe mode 98503e866 disable stock honda AEB in unsafe mode (#477) 01b2ccbed one more 9a30265a8 weak steering while not engaged 577f10b1a added options for unsafe mode 83cf7bf4c update comment 4556e7494 enable unsafe mode, toggle for use by forks that so choose de89fcdc4 Nissan leaf (#473) git-subtree-dir: panda git-subtree-split: 869f1232186f440eb388df82b85b88d346899199
Welcome to panda
panda is the nicest universal car interface ever.
It supports 3x CAN, 2x LIN, and 1x GMLAN. It also charges a phone. On the computer side, it has both USB and Wi-Fi.
It uses an STM32F413 for low level stuff and an ESP8266 for Wi-Fi. They are connected over high speed SPI, so the panda is actually capable of dumping the full contents of the busses over Wi-Fi, unlike every other dongle on amazon. ELM327 is weak, panda is strong.
It is 2nd gen hardware, reusing code and parts from the NEO interface board.
Usage (Python)
To install the library:
# pip install pandacan
See this class for how to interact with the panda.
For example, to receive CAN messages:
>>> from panda import Panda
>>> panda = Panda()
>>> panda.can_recv()
And to send one on bus 0:
>>> panda.can_send(0x1aa, "message", 0)
Find user made scripts on the wiki
Note that you may have to setup udev rules for Linux, such as
sudo tee /etc/udev/rules.d/11-panda.rules <<EOF
SUBSYSTEM=="usb", ATTRS{idVendor}=="bbaa", ATTRS{idProduct}=="ddcc", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="bbaa", ATTRS{idProduct}=="ddee", MODE="0666"
EOF
sudo udevadm control --reload-rules && sudo udevadm trigger
Usage (JavaScript)
See PandaJS
Software interface support
As a universal car interface, it should support every reasonable software interface.
Directory structure
- board -- Code that runs on the STM32
- boardesp -- Code that runs on the ESP8266
- drivers -- Drivers (not needed for use with python)
- python -- Python userspace library for interfacing with the panda
- tests -- Tests and helper programs for panda
Programming (over USB)
Debugging
To print out the serial console from the STM32, run tests/debug_console.py
To print out the serial console from the ESP8266, run PORT=1 tests/debug_console.py
Safety Model
When a panda powers up, by default it's in SAFETY_SILENT mode. While in SAFETY_SILENT mode, the buses are also forced to be silent. In order to send messages, you have to select a safety mode. Currently, setting safety modes is only supported over USB.
Safety modes optionally supports controls_allowed, which allows or blocks a subset of messages based on a customizable state in the board.
Code Rigor
When compiled from an EON Dev Kit, the panda FW is configured and optimized (at compile time) for its use in
conjuction with openpilot. The panda FW, through its safety model, provides and enforces the
openpilot Safety. Due to its critical function, it's important that the application code rigor within the board folder is held to high standards.
These are the CI regression tests we have in place:
- A generic static code analysis is performed by Cppcheck.
- In addition, Cppcheck has a specific addon to check for MISRA C:2012 violations. See current coverage.
- Compiler options are relatively strict: the flags
-Wall -Wextra -Wstrict-prototypes -Werrorare enforced on board and pedal makefiles. - The safety logic is tested and verified by unit tests for each supported car variant.
- A recorded drive for each supported car variant is replayed through the safety logic to ensure that the behavior remains unchanged.
- An internal Hardware-in-the-loop test, which currently only runs on pull requests opened by comma.ai's organization members, verifies the following functionalities:
- compiling the code in various configuration and flashing it both through USB and WiFi.
- Receiving, sending and forwarding CAN messages on all buses, over USB and WiFi.
In addition, we run Pylint and Flake8 linters on all python files within the panda repo.
Hardware
Check out the hardware guide
Licensing
panda software is released under the MIT license unless otherwise specified.

