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

En curso Publicado hace 5 años Pagado a la entrega
En curso Pagado a la entrega

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.

Programación en C Programación en C++ Linux Difusión de video Servicios de video

Nº del proyecto: #18419874

Sobre el proyecto

1 propuesta Proyecto remoto Activo hace 5 años