-
Notifications
You must be signed in to change notification settings - Fork 9.1k
panda Flashing
With the ignition off but the device on, reboot the device through the Settings menu.
Set a timer for two minutes on your phone after it's done booting to the startup screen and see if the No Panda
message goes away at the end of it.
Sometimes giving the device time to flash itself with the car off can work. If not, continue with the rest of this.
See SSH for more information.
cd /data/openpilot/panda/board
On newer code...
Kill OP first (tmux a
and Ctrl+C
)
./recover.py
pkill -f boardd; cd /data/openpilot/panda/board; make; reboot
Note: C2's (comma two) built-in panda requires 12V over "OBD-C" (ie. USB-C).
Doing this a few times may unstick a panda that isn't flashing properly.
This alternative command can be ran if flashing the panda via the standard process proves unsuccessful.
cd /data/openpilot/panda ; pkill -f boardd ; PYTHONPATH=.. python -c "from panda import Panda; Panda().flash()"
Run the command, lsusb
and look for a line like the following to see if the panda shows as a connected usb device:
Bus 001 Device 005: ID bbaa:ddcc
Note: Does not work on 3X
If you see that line among the five lines of output; good. Try the above recovery steps, but try harder.
If not, power down your c3 and wait at least 20 minutes for the power to fully drain. The panda should start on the next boot, perhaps into DFU mode, and connect.
In some cases, the problem with your panda may be due to code that only runs when CAN traffic is present.
You can disconnect your C2 or C3 from your car and instead plug it into an appropriate alternative 12V power source (15W or more; C3 can also take 5V), so the panda can start and none of the CAN traffic-related code will run.
(You'll need to ensure the power source is sufficient and being delivered through a USB-A to USB-C adapter. High power USB-C to USB-C will not work.)
If your comma three's internal panda needs to be reflashed, and the other methods above do not work, attempt the following:
./panda/tests/reflash_internal_panda.py
Or manually:
You can ignore any output about the device resource being busy.
echo 124 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio124/direction
echo 1 > /sys/class/gpio/gpio124/value
echo 134 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio134/direction
echo 1 > /sys/class/gpio/gpio134/value
echo 0 > /sys/class/gpio/gpio124/value
With these done you should see "STM Device in DFU mode" or something similar when you run lsusb
on C3. Then you should be able to run the recover.py script in the panda folder. It may still be held in DFU after the flash, in which case run the following to get it out of DFU.
echo 1 > /sys/class/gpio/gpio124/value
echo 0 > /sys/class/gpio/gpio134/value
echo 0 > /sys/class/gpio/gpio124/value
Power down the C3/C3X for 5 minutes. After reboot panda should be recovered.
Make driving chill. Buy a comma 3X with a car harness today!