Udev rule on Raspberry Pi to recognize USB thumb drive and play a video

Në Vazhdim Postuar 5 vite mё parё Paguhet në dorëzim
Në Vazhdim Paguhet në dorëzim

SENARIO:

I have a quantity of 40 USB thumb drives. I want to divide them into four groups, A, B C, and D. When I plug ANY of the thumb drives in from group A into ANY of the USB ports on the Pi, I’d like it to play video: /Home/Pi/[login to view URL], when I plug ANY of the thumb drives in from group B, I’d like it to play video /Home/Pi/[login to view URL], when I plug ANY of the thumb drives in from group C, I’d like it to play video /Home/Pi/[login to view URL], when I plug ANY of the thumb drives in from group D, I’d like it to play video /Home/Pi/[login to view URL],. I’d like to use “udev” to do this and use the Opxplayer to play the videos.

REQUIREMENT:

#1. Create the rule file that I will place in “/etc/udev/rules.d/” that will detect each of the 40 USB thumb drives and launch the script.

#2. Write the 4 Python scripts that will run the 4 videos, I assume it is as simple as this (using [login to view URL] as an example): #!/usr/bin/python Omxplayer /Home/Pi/[login to view URL]

#3. Tell me how to capture the unique info from each of the 40 USB thumb drives so I can modify the rule file. Assuming this is some combination of “lsusb” and “dmesg” and then use what the “SerialNumber” to identify each thumb drive? Assume they are all the same brand/model, so I don’t think idProduct and idVendor will work.

Programim C Programim në gjuhën C++ Linux Transmetim video Shërbime video

ID Projekti: #18419874

Rreth projektit

1 propozim Projekti në distancë Aktiv 5 vite mё parё