# Keep the built-in card reader off the hands' USB hub.
#
# A Generic USB3.0 card reader (05e3:0749) sits on the same hub branch as the two
# CH340 hand adapters (measured: reader at 1-2.2.4, hands at 1-2.2.1.1 and 1-2.2.3).
# With no card in it, it power-cycles continuously — 851 cycles/hour were measured —
# and every cycle re-enumerates the whole branch. That is what renumbers /dev/ttyUSB*
# under the hands and produces the dashboard's "port drift" warning; under load it has
# also dropped the hands mid-session.
#
# inspire_g1 survives the renumbering (it pins each hand by USB PATH, not by ttyUSB
# number), so this is about stopping the churn, not about which hand is which.
#
# Deauthorizing tells the kernel to stop talking to the device. It is reversible:
#   echo 1 | sudo tee /sys/bus/usb/devices/<path>/authorized
# and it only affects the card reader — nothing else on the robot uses it.
#
# Install:
#   sudo cp udev/99-inspire-hub-cardreader.rules /etc/udev/rules.d/
#   sudo udevadm control --reload
#   # apply now, without a replug:
#   for d in /sys/bus/usb/devices/*/; do \
#     [ "$(cat $d/idVendor 2>/dev/null)" = "05e3" ] && \
#     [ "$(cat $d/idProduct 2>/dev/null)" = "0749" ] && \
#     echo 0 | sudo tee $d/authorized; done
#
# Remove: delete this file, reload, and re-authorize as above.
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05e3", ATTR{idProduct}=="0749", ATTR{authorized}="0"
