I am using raspberry pi 3 and edimax Wi-Fi dongle. I have some rules defined inside /etc/udev/rules.d/99-com.rules like what to do when edimax wifi dongle is connected/disconnected
Vendor id I obtained after running lsusb is as below
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Accordingly I added the below rules
KERNELS=="[1-9]*-[0-9]*", SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="7392", RUN+="/home/pi/dongleon.sh &"
KERNELS=="[1-9]*-[0-9]*", SUBSYSTEMS=="usb", ACTION=="remove", ATTRS{idVendor}=="7392", RUN+="/home/pi/dongleoff.sh &"
Now I don't want any other USB plugged into raspberry pi ports to work. I want to allow only edimax Wi-Fi dongle and block all other usb devices.
Can some one please let me know how to achieve this.