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

진행중 등록 시간: 5년 전 착불
진행중 착불

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.

C 프로그래밍 C++ 프로그래밍 리눅스 비디오 방송 동영상 서비스

프로젝트 ID: #18419874

프로젝트 소개

1건(제안서) 재택 근무형 프로젝트 서비스 이용 중: 5년 전