I have tried recording startup and shutdown now by recording with the command "sleep 10" and doing the manual operation (plugging/unplugging USB) during the sleep delay. Unfortunately, it does not work.
with the intention to plug the printer right after issuing the command.
Note that after repugging the printer will appear under Bus:Device 002:010 so I used /dev/bus/usb/002/010. As the printer is still unplugged when issuing the command there is not yet a /dev/bus/usb/002/010 file and the program exists immediately complaining because of that and does not run "sleep 10".
So any help to record start-up and shutdown of a USB device is appreciated.
I have tried recording startup and shutdown now by recording with the command "sleep 10" and doing the manual operation (plugging/ unplugging USB) during the sleep delay. Unfortunately, it does not work.
For unplugging I did
sudo umockdev-record --ioctl= /dev/bus/ usb/002/ 009=deskjet- 2540-ioctl- shutdown. log sleep 10
and unplugged the USB plug right after pressing Enter. After waiting for the command to exit I did not get a deskjet- 2540-ioctl- shutdown. log file.
For plugging I did
sudo umockdev-record --ioctl= /dev/bus/ usb/002/ 010=deskjet- 2540-ioctl- startup. log sleep 10
with the intention to plug the printer right after issuing the command.
Note that after repugging the printer will appear under Bus:Device 002:010 so I used /dev/bus/ usb/002/ 010. As the printer is still unplugged when issuing the command there is not yet a /dev/bus/ usb/002/ 010 file and the program exists immediately complaining because of that and does not run "sleep 10".
So any help to record start-up and shutdown of a USB device is appreciated.