/usr/local/etc/devd.conf
#=========================================================================#
# devd.conf
#=========================================================================#
#=========================================================================#
# ducky one 2 mini
#=========================================================================#
attach 100 {
device-name "uhid[0-9]+";
match "vendor" "0x0416"; # (1)
match "product" "0x0123"; # (2)
#
# Do not add -d flag ! if you do it devd will never detach to background
# because usbhidaction will run in foreground !
#
# Remember you can add arguments after /etc/usbhidaction.conf like
# action "/usr/bin/usbhidaction -f $device-name -c /etc/usbhidaction.conf /dev/mixer1 2"
#
action "/usr/bin/usbhidaction -f $device-name -c /usr/local/etc/usbhidaction.conf";
};
Sounds familiar...which would trigger some action based on the VID/PID of a particular USB device when it is inserted.
??Sounds familiar...
I had never even come across tethering USB 8 years ago.Did you click it?
Same question from 8 years ago.
Same author.
notify 20 {
match "system" "ETHERNET";
match "type" "IFATTACH";
match "subsystem" "ue[0-9]+";
action "/sbin/dhclient $subsystem";
};
service devd restart. service devd stop && devd -dI just tried this but something doesn't work.To summarize:
Create this file and populate it.
/usr/local/etc/devd/usb_tethering.conf
ThenCode:notify 20 { match "system" "ETHERNET"; match "type" "IFATTACH"; match "subsystem" "ue[0-9]+"; action "/sbin/dhclient $subsystem"; };service devd restart.
Running devd with the -d flag will show it in action.
service devd stop && devd -d
If you have any errors it will tell on startup what file and line numbers that have issues.
No other settings are needed. Create a devd rule configuration file in the proper location and restart devd.
cat usb_tethering.conf:-notify 20 {
match "system" "ETHERNET";
match "type" "IFATTACH";
match "subsystem" "ue[0-9}+";
action "/sbin/dhclient $subsystem";
};
Where should I look?
Running devd with the -d flag will show it in action.
service devd stop && devd -d
I can't get the sequence right.Then hotplug the stick and watch the console messages.
Do you see parsing usb_tethering.conf ?I just get a lot of 'parsing /etc/...conf' messages.
Do you see parsing usb_tethering.conf ?
# service devd stop && devd -dStopping devd.
Waiting for PIDS: 64207.
Parsing /etc/devd.conf
setting wifi-driver-regex=(ath|ath[0-9]+k|bwi|bwn|ipw|iwlwifi|iwi|iwm|iwn|malo|mwl|mt79|mtw|otus|ral|rsu|rtw|rtwn|rum|run|uath|upgt|ural|urtw|wpi|wtap|zyd)[0-9]+
Parsing files in /etc/devd
Parsing /etc/devd/syscons.conf
Parsing /etc/devd/uath.conf
Parsing /etc/devd/power_profile.conf
Parsing /etc/devd/zfs.conf
Parsing /etc/devd/snd.conf
Parsing /etc/devd/devmatch.conf
Parsing /etc/devd/dhclient.conf
Parsing /etc/devd/iwmbtfw.conf
Parsing /etc/devd/asus.conf
Parsing /etc/devd/nvmf.conf
Parsing /etc/devd/moused.conf
Parsing /etc/devd/autofs.conf
Parsing /etc/devd/hyperv.conf
Parsing /etc/devd/rtlbtfw.conf
Parsing /etc/devd/ulpt.conf
Parsing /etc/devd/bluetooth.conf
Parsing files in /usr/local/etc/devd
Parsing /usr/local/etc/devd/automount_devd.conf
Parsing /usr/local/etc/devd/cups.conf
Parsing /usr/local/etc/devd/usb_tethering.conf
YesAm I correct in thinking that after inserting a USB cable into my smartphone and selecting Tethering USB, this should automatically run dhclient ue0 ?
Processing event '+axge0 at bus=0 hubaddr=1 port=18 devaddr=4 interface=0 ugen=ugen0.4 vendor=0x0b95 product=0x1790 devclass=0x00 devsubclass=0x00 devproto=0x00 sernum="00C70A20" release=0x0200 mode=host intclass=0xff intsubclass=0xff intprotocol=0x00 on uhub0'
Pushing table
setting *=+axge0 at bus=0 hubaddr=1 port=18 devaddr=4 interface=0 ugen=ugen0.4 vendor=0x0b95 product=0x1790 devclass=0x00 devsubclass=0x00 devproto=0x00 sernum="00C70A20" release=0x0200 mode=host intclass=0xff intsubclass=0xff intprotocol=0x00 on uhub0
setting _=axge0 at bus=0 hubaddr=1 port=18 devaddr=4 interface=0 ugen=ugen0.4 vendor=0x0b95 product=0x1790 devclass=0x00 devsubclass=0x00 devproto=0x00 sernum="00C70A20" release=0x0200 mode=host intclass=0xff intsubclass=0xff intprotocol=0x00 on uhub0
setting timestamp=1782256833.683211
setting vm_guest=none
setting device-name=axge0
setting bus=0
setting hubaddr=1
setting port=18
setting devaddr=4
setting interface=0
setting ugen=ugen0.4
setting vendor=0x0b95
setting product=0x1790
setting devclass=0x00
setting devsubclass=0x00
setting devproto=0x00
setting sernum=00C70A20
setting release=0x0200
setting mode=host
setting intclass=0xff
setting intsubclass=0xff
setting intprotocol=0x00
setting bus=uhub0
Processing attach event
Testing device-name=axge0 against ^ed50$, invert=0
Testing device-name=axge0 against ^ukbd0$, invert=0
Testing device-name=axge0 against ^ubt[0-9]+$, invert=0
Testing device-name=axge0 against ^(ath|ath[0-9]+k|bwi|bwn|ipw|iwlwifi|iwi|iwm|iwn|malo|mwl|mt79|otus|ral|rsu|rtw|rtwn|rum|run|uath|upgt|ural|urtw|wpi|wtap|zyd)[0-9]+$, invert=0
Popping table