This on a Pi 4 running Buster.
A shell script on this machine grabs an image from the attached USB camera once every two minutes using fswebcam. I keep a log of this which records whether or not the grab was successful.
I run logwatch daily with a one day range. For the first time ever, I saw the following kernel messages:
-(Why are there no time stamps on the logwatch message?)
Looking at the actual kernel log (/var/log/kern.log) I see these lines:
In my own webcam log I see this:
Apparently the camera gets disconnected from the USB bus now and then and then reconnects.
What can cause this and is there anything I can do about it?
Although I haven't seen those USB camera messages in logwatch before, I have experienced situations where the camera seems to disconnect and fails to reconnect. To handle that I have a software watchdog that monitors the file that fswebcam saves. If it fails every time over a ten minute period, the watchdog repair script reboots the Pi. This always succeeds in resuming image capture.
I've tried using usbreset but that didn't work.
There must be a better way.
A shell script on this machine grabs an image from the attached USB camera once every two minutes using fswebcam. I keep a log of this which records whether or not the grab was successful.
I run logwatch daily with a one day range. For the first time ever, I saw the following kernel messages:
-
Code:
-------------------- Kernel Begin ------------------------1 Time(s): usb 1-1.1: Manufacturer: HD Camera Manufacturer1 Time(s): usb 1-1.1: New USB device found, idVendor=05a3, idProduct=9230, bcdDevice= 1.001 Time(s): usb 1-1.1: New USB device strings: Mfr=2, Product=1, SerialNumber=01 Time(s): usb 1-1.1: Product: USB 2.0 Camera1 Time(s): usb 1-1.1: USB disconnect, device number 31 Time(s): usb 1-1.1: new high-speed USB device number 6 using xhci_hcd4 Time(s): uvcvideo: Failed to resubmit video URB (-1).1 Time(s): uvcvideo: Found UVC 1.00 device USB 2.0 Camera (05a3:9230)---------------------- Kernel End -------------------------
Looking at the actual kernel log (/var/log/kern.log) I see these lines:
Code:
Nov 23 01:54:14 raspsky kernel: [666944.636268] usb 1-1.1: USB disconnect, device number 6Nov 23 01:54:14 raspsky kernel: [666944.835585] usb 1-1.1: new high-speed USB device number 7 using xhci_hcdNov 23 01:54:14 raspsky kernel: [666945.038675] usb 1-1.1: New USB device found, idVendor=05a3, idProduct=9230, bcdDevice= 1.00
Code:
Sat Nov 23 01:54:14 +07 2024 KoratSky Camera Returned error 255Sat Nov 23 01:54:14 +07 2024 KoratSky Camera Returned error 255Sat Nov 23 01:54:14 +07 2024 KoratSky Camera Returned error 255
What can cause this and is there anything I can do about it?
Although I haven't seen those USB camera messages in logwatch before, I have experienced situations where the camera seems to disconnect and fails to reconnect. To handle that I have a software watchdog that monitors the file that fswebcam saves. If it fails every time over a ten minute period, the watchdog repair script reboots the Pi. This always succeeds in resuming image capture.
I've tried using usbreset but that didn't work.
There must be a better way.
Statistics: Posted by Ratsima — Sat Nov 23, 2024 3:03 am — Replies 0 — Views 36