Writing udev rule for specific interface of USB device
https://askubuntu.com/questions/1560132/writing-udev-rule-for-specific-interface-of-usb-device
I'm using Ubuntu 25.
I have USB device with 8 interfaces as lsusb -t tell me:
/: Bus 001.Port 001: Dev 001, Class='bDeviceClass 0x00 not yet handled', Driver=xhci_hcd/0p, 480M
|__ Port 002: Dev 002, If 0, Class=[unknown], Driver=[none], 12M
|__ Port 002: Dev 002, If 2, Class=[unknown], Driver=usbhid, 12M
|__ Port 006: Dev 003, If 0, Class=[unknown], Driver=usbhid, 1.5M
|__ Port 011: Dev 004, If 0, Class=[unknown], Driver=hub, 480M
|__ Port 001: Dev 006, If 0, Class=[unknown], Driver=hub, 480M
|__ Port 004: Dev 008, If 0, Class=[unknown], Driver=rndis_host, 480M
|__ Port 004: Dev 008, If 1, Class=[unknown], Driver=rndis_host, 480M
|__ Port 004: Dev 008, If 2, Class=[unknown], Driver=[none], 480M
|__ Port 004: Dev 008, If 3, Class=[unknown], Driver=[none], 480M
|__ Port 004: Dev 008, If 4, Class=[unknown], Driver=[none], 480M
|__ Port 004: Dev 008, If 5, Class=[unknown], Driver=cdc_acm, 480M
|__ Port 004: Dev 008, If 6, Class=[unknown], Driver=cdc_acm, 480M
|__ Port 004: Dev 008, If 7, Class=[unknown], Driver=[none], 480M
|__ Port 004: Dev 008, If 8, Class=[unknown], Driver=[none], 480M
I need to make only the interface 4 (Port 004: Dev 008, If 4) to use/be used by an "option" driver. I already added "option" to /etc/modules-load.d/modules.conf, so this module loads on start up. But how do I bind specific interface to it on boot? I don't want to bind everything to "option" driver because it breaks things for me. I thought udev rule can help me, but I have no idea how to write it. Please help.