hjoon0510 / research-journal

기록일지 (문제, 이슈, 에러, 스크린샷, 작업내용, 해결방법 등을 기록하는 저장소입니다.)
Apache License 2.0
1 stars 0 forks source link

20200929 (Logitech USB Camera) #103

Open hjoon0510 opened 3 years ago

hjoon0510 commented 3 years ago

이곳은 프로젝트의 작업 내용들을 기록 및 보관하는 곳입니다. 수행한 작업들을 체계적으로 기록하면 문제들을 효과적으로 해결이 가능하고, 반복되는 실수들을 최소화하는데 큰 도움을 제공합니다.

작업내용

로지텍 usb 를 쓰면 카메라가 정상동작하지 않는다

문제원인

pi@raspberrypi:/var/www/html/hongik-human/covid/social-distance-detector $ ./run.sh camera
[INFO] loading YOLO from disk...
[INFO] accessing video stream...
VIDIOC_STREAMON: No space left on device

real    0m2.467s
user    0m0.696s
sys     0m1.091s
pi@raspberrypi:/var/www/html/hongik-human/covid/social-distance-detector $ ls
image.jpg    memo-social-distancing.txt  pedestrians.mp4  run.sh                       yolo-coco
image01.jpg  output.avi                  pyimagesearch    social_distance_detector.py
pi@raspberrypi:/var/www/html/hongik-human/covid/social-distance-detector $ ./run.sh camera
[INFO] loading YOLO from disk...
[INFO] accessing video stream...

해결방법

이상.

leemgs commented 3 years ago
$ lsusb | grep Logitech
Bus 001 Device 004: ID 046d:08b2 Logitech, Inc. QuickCam Pro 4000

$ dmesg | grep "Not enough"
[  116.556190] usb 1-1.3: Not enough bandwidth for new device state.
[  116.556342] usb 1-1.3: Not enough bandwidth for altsetting 9
[  116.707593] usb 1-1.3: Not enough bandwidth for new device state.
[  116.707746] usb 1-1.3: Not enough bandwidth for altsetting 9
[  116.860108] usb 1-1.3: Not enough bandwidth for new device state.
[  116.860259] usb 1-1.3: Not enough bandwidth for altsetting 8
pi@raspberrypi:~/covid/social-distance/social-distance-detector $
다음 명령을 실행하여 웹캠이 최대 사용량을 요청하는 대신 대역폭 사용량을 계산하도록 제안했습니다.

sudo rmmod uvcvideo
sudo modprobe uvcvideo quirks=128

sudo rmmod uvcvideo
sudo modprobe uvcvideo quirks=640

v4l2-ctl -d /dev/video0 --list-formats
v4l2-ctl -d 0 -V
v4l2-ctl --list-formats-ext