Panda Flashing

From comma wiki
Jump to: navigation, search

If you are asked to flash your panda manually, you can find a possibility to do it over WiFi here.

Automatic Flashing Via EON

The easiest way to flash panda via EON is as follows:

  1. Disconnect Panda from Giraffe
  2. With car powered off, plug Panda into OBD2 Port of car
  3. With EON powered off, connect EON via USB to Panda.
  4. Connecting EON to Panda should cause the EON to power on
  5. Panda will flicker its green LED a few seconds
  6. Flashing is complete when Panda shows red pulsing LED (heartbeat)
  7. Plug Panda back into Giraffe

Notes/exceptions:

  • The procedure above suggests that a green flickering LED on the Panda indicates it is being flashed (programmed) by the EON. But, my grey Panda flickered green all the time when plugged into the car OBD2 port, so at first it wasn't clear that anything was happening after the EON powered up. Then I noticed the green LED went solid for a bit and then back to flickering, and just a few seconds later the Panda gave a happy red pulse, so the period of uncertainty was short.
  • If you have problems flashing via your OBD2 port, a debug board can be used to flash the Panda more reliably. Similarly, any way to give the Panda power without CAN bus data can help the flash succeed. You can do this with a Giraffe with Comma Power, with the Giraffe not plugged in to the car.

Manual Flashing Via EON

  1. Power off vehicle
  2. SSH into EON
  3. run

cd /data/openpilot/panda ; pkill -f boardd ; PYTHONPATH=.. python -c "from panda import Panda; Panda().flash()"

alternatively, this worked better as of 5/13/2019

  1. Power off vehicle
  2. SSH into EON
  3. run

cd /data/openpilot/panda/board && make recover

Manual Flashing with Python over USB

This is the most reliable flashing method. Use this if your Panda WiFi is unavailable

https://github.com/commaai/panda/blob/029c1ec7ba89fbcb94fdac2690378ef4c1a32b43/UPDATING.md

Manual Flashing over WiFi via curl

The easiest way to do this is under Linux. With the help of the Panda Makefiles on Github and a little Help on the #panda slack page, you can find out:

  1. Connect your Panda to power. It's important to do the flashing with 12V power (not USB) and with NO CAN Data (e.g. before you turn on your car) Unless you prevent your CAN/GMLAN buses from sending 0x7F, they must be disconnected before applying power or USB DFU will fail. (See page 69 and 97)
  2. Note your Pandas' network name and password (e.g. with chffr)
  3. Download and unpack Panda Firmware from https://github.com/commaai/panda-artifacts
  4. Connect directly via WiFi to your Panda
  5. Open a Terminal and Change your directory to the download-folder (e.g. cd ~/Downloads )
  6. Use these calls in your terminal, and wait until Panda is flashing it's LEDs until you execute the next step (takes a few seconds)
    1. curl http://192.168.0.10/
    2. curl http://192.168.0.10/espupdate2 --upload-file user2.bin
    3. curl http://192.168.0.10/stupdate --upload-file panda.bin
    4. curl http://192.168.0.10/espupdate1 --upload-file user1.bin
  7. After the flashing of panda.bin the pandas' LEDs should flash (short) even in multiple colours

If anything is still unclear, you can verify if you did your steps right with this walkthrough video.