When I connect my USB printer an event appears something like ugen1.2 <Hewlett Packard> at usbus 1 Unfortunately I can not process any matches with this event. In system log it appears like kernel event, but devd does not want to process this event in any way I've try. I think it can be processed when ulpt driver is compiled and used, but i don't realy need it, because printer is working flawlessly without ulpt Actually I am trying to implement firmware download in to the printer that looked like this in devd.conf # firmware for HP Laserjet 1020 printer attach 100 { device-name "ulpt[0-9]+"; match "vendor" "0x03f0"; match "product" "0x2b17"; action "cat /usr/local/share/foo2zjs/firmware/sihp1020.dl > /dev/$device-name"; }; new implementaion should be # firmware for HP Laserjet 1020 printer attach 100 { device-name "ugen[0-9]+"; match "vendor" "0x03f0"; match "product" "0x2b17"; action "cat /usr/local/share/foo2zjs/firmware/sihp1020.dl > /dev/usb/1.2.1"; }; I've googled a lot and tried different methods also, no one works. I need to download firmware to the printer every time it connected / turned on
Finally got it working. I don't know but вумв restart does not have effect, reboot is required. # hp # hp1020 notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x03f0"; match "product" "0x2b17"; action "cat /usr/local/share/foo2zjs/firmware/sihp1020.dl > /dev/usb/1.2.1"; };
Hi, Maybe using "dd if=XXX of=XXX bs=512" is better. What is the maxpacket size of the endpoint in question? --HPS
Hi, I see in your action you hardcode the USB device. Use $cdev instead, and substitute the last digit! action "dd if=/usr/local/share/foo2zjs/firmware/sihp1020.dl of=/dev/usb/1.2.1"; /dev/usb/1.2.1 can be obtained like this in the devd config file: realpath /dev/$cdev | sed -e "s/\.0/.1/g" Address 1.0 does not exist, so the last .0 will always be matched. --HPS