# CANable 2.0 USB-CAN adapter (gs_usb driver)
# Exposes the adapter as can0 via the SocketCAN subsystem.
# Issue: https://gitea.vayrette.com/seb/saltylab-firmware/issues/643
#
# Bitrate is set by can-bringup.service (1 Mbps DroneCAN for Here4 GPS, bd-p47c).
# This rule only assigns the interface name and tags it for systemd; it does NOT
# bring up the interface — that is handled by can-bringup.service.
#
# Install:
#   sudo cp 70-canable.rules /etc/udev/rules.d/
#   sudo udevadm control --reload && sudo udevadm trigger
#
# CANable 2.0 USB IDs (Geschwister Schneider / candleLight firmware):
#   idVendor  = 1d50  (OpenMoko)
#   idProduct = 606f  (candleLight / gs_usb)
#
# Verify with: lsusb | grep -i candl
#              ip link show can0

SUBSYSTEM=="net", ACTION=="add", \
    ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="606f", \
    NAME="can0", \
    TAG+="systemd"
