Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: CAN packet version mismatch: panda's firmware v0, library v4. Reflash panda. #2111

Open
blackandwhitehat opened this issue Dec 16, 2024 · 0 comments

Comments

@blackandwhitehat
Copy link

blackandwhitehat commented Dec 16, 2024

Flashed Official White Panda with commit bedee40 and it showed a protocol mismatch. Bricked panda bad accidentally flashing firmware that shouldn't be on it, even paw wouldn't recover. Start over with another brand new panda, same exact issue.

┌──(panda_env)─(panda㉿Depot)-[~]
└─$ python pandafwtest.py 
INFO: connecting to panda 290025000e51363338383037
Panda firmware version: DEV-bedee405-DEBUG

┌──(panda_env)─(panda㉿Depot)-[~]
└─$ python test.py
INFO: connecting to panda 290025000e51363338383037
Panda connected and configured.
Error: CAN packet version mismatch: panda's firmware v0, library v4. Reflash panda.
Panda connection closed.

Located check in python/__init__.py line 95

raise RuntimeError(f"{desc} packet version mismatch: panda's firmware v{panda_version}, library v{lib_version}. Reflash panda.")

If I bypass this check in __init__.py I get LIBUSB1 intermittent timeout errors and I'm not sure it's actually sending any data to bus.

┌──(panda_env)─(panda㉿Depot)-[~]
└─$ python test.py
INFO: connecting to panda 290025000e51363338383037
Panda connected and configured.
Message sent successfully.
Panda connection closed.

┌──(panda_env)─(panda㉿Depot)-[~]
└─$ python test.py
INFO: connecting to panda 290025000e51363338383037
Panda connected and configured.
Error: LIBUSB_ERROR_TIMEOUT [-7]
Panda connection closed.

upsidedownlemon on Comma Discord helped me locate last commit before CAN PACKET VERSION = 1

https://github.com/commaai/panda/blob/5f5f30eedc72f62c7a10dec0c57ffeeb7a92faf6/python/__init__.py

Tried to install the older version of pandacan but it failed due to a Libusb1 version error

┌──(panda_env)─(panda㉿Depot)-[~/panda]
└─$ pip install .
Processing /home/panda/panda
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting libusb1==1.6.6 (from pandacan==0.0.9)
  Using cached libusb1-1.6.6.tar.gz (56 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in libusb1 setup command: use_2to3 is invalid.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I manually edited the setup.py and requirements.txt to use libusb1-1.5.0 and it installed successfully.

This resolved the issue and panda works as expected now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant