openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

cabana: socketcan support

Open pd0wm opened this issue 2 years ago • 3 comments

Test on a virtual socketcan device using.

sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
sudo ip link set up vcan0
cangen vcan0 -g 1 -L 8 # Generate some fake data

Start cabana using ./cabana --socketcan vcan0.

TODO:

  • [ ] Test with an actual device? Might need to patch up the panda socketCAN driver.
  • [ ] Fix MacOS build
  • [ ] Support multiple devices simultaneously (socketCAN uses one device per bus)

pd0wm avatar Apr 18 '23 13:04 pd0wm

what would be needed to add support for USB connected black/red pandas on macOS (that does not have socketcan) - I see that Qt supports some CAN adapters https://doc.qt.io/qt-5/qtcanbus-backends.html and there is https://www.mac-can.com that also has plugin interface

martinl avatar May 08 '23 07:05 martinl

nvm, I already found that panda is supported via usb serial interface. I'll go test if it works with macOS

martinl avatar May 08 '23 08:05 martinl

Those are already supported! Just plug it in and select from the startup dialog.

pd0wm avatar May 08 '23 08:05 pd0wm

Tested build on Linux, MacOS and C3.

@adeebshihadeh This is ready for review. I assume the failing CI is due to the changes in install_ubuntu_dependencies.h and will be fixed after merging?

@deanlee Any thoughts?

pd0wm avatar Aug 23 '23 05:08 pd0wm

lgtm!

deanlee avatar Aug 23 '23 07:08 deanlee