ELP usb camera
-
I actually followed that guide and the camera is still not working. The log is complaining something about the camera input not correct as shown here.
cap.driver: "uvcvideo" cap.card: "HD USB Camera: HD USB Camera" cap.bus_info: "usb-0000:01:00.0-1.3" cap.capabilities=0x84A00001 ------------------------ [1:ml1] [NTC] [VID] [Sep 29 17:21:30] v4l2_get_capability: - VIDEO_CAPTURE [1:ml1] [NTC] [VID] [Sep 29 17:21:30] v4l2_get_capability: - STREAMING [1:ml1] [NTC] [VID] [Sep 29 17:21:30] v4l2_select_input: name = "Camera 1", type 0x00000002, status 00000000 [1:ml1] [NTC] [VID] [Sep 29 17:21:30] v4l2_select_input: - CAMERA [1:ml1] [ERR] [VID] [Sep 29 17:21:30] v4l2_select_input: Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy [1:ml1] [ERR] [ALL] [Sep 29 17:21:30] mlp_capture: Video device fatal error - Closing video device [1:ml1] [NTC] [VID] [Sep 29 17:21:30] vid_close: Cleaning up V4L2 device [1:ml1] [NTC] [VID] [Sep 29 17:21:30] v4l2_cleanup: Closing video device /dev/video0 [1:ml1] [NTC] [ALL] [Sep 29 17:21:37] mlp_actions: End of event 3
-
Also its not showing a name of the camera as a device, but I know its the 32e4: since it goes away when I unplug it
Bus 002 Device 002: ID 2357:0601 TP-Link Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 32e4:8830 Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
-
maybe motion is keeping the camera busy if you've already tried installing that?
-
I only installed motion, not sure what else would be keeping it busy.
-
I am using motion on Pi but with the Pi camera - so things may be a bit different but ....
Can I suggest that you
-
unplug the usb camera
-
make sure motion is off
sudo systemctl stop motion -
plug the usb camera back in and see if it is "seen" by the OS (I assume you are using debian buster ?) using one or a combination of
lsusb
dmesg | grep -i usb
ls /dev -
assuming that the usb camera is "seen" and shows up as /dev/video0 - check that the motion config file /etc/motion/motion.config has a line with videodevice /dev/video0
-
If all is well - restart motion
sudo systemctl start motion
If this is instructions on how to "suck eggs" please disregard.
-
-
Looks like it was found.
dmesg | grep -i usb 1: New USB device fo[ 0.128801] usbcore: registered new interface driver usbfs [ 0.128857] usbcore: registered new interface driver hub [ 0.128982] usbcore: registered new device driver usb [ 1.191613] usbcore: registered new interface driver r8152 [ 1.191677] usbcore: registered new interface driver lan78xx [ 1.191744] usbcore: registered new interface driver smsc95xx [ 1.192212] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1 [ 1.195748] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04 [ 1.195765] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.195780] usb usb1: Product: xHCI Host Controller [ 1.195794] usb usb1: Manufacturer: Linux 5.4.51-v7l+ xhci-hcd [ 1.195808] usb usb1: SerialNumber: 0000:01:00.0 [ 1.196390] hub 1-0:1.0: USB hub found [ 1.197053] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2 [ 1.197075] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed [ 1.197515] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04 [ 1.197531] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.197546] usb usb2: Product: xHCI Host Controller [ 1.197560] usb usb2: Manufacturer: Linux 5.4.51-v7l+ xhci-hcd [ 1.197574] usb usb2: SerialNumber: 0000:01:00.0 [ 1.198117] hub 2-0:1.0: USB hub found [ 1.200339] usbcore: registered new interface driver uas [ 1.200441] usbcore: registered new interface driver usb-storage [ 1.209395] usbcore: registered new interface driver usbhid [ 1.209406] usbhid: USB HID core driver [ 1.560558] usb 1-1: new high-speed USB device number 2 using xhci_hcd [ 1.743251] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21 [ 1.743268] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0 [ 1.743283] usb 1-1: Product: USB2.0 Hub [ 1.745310] hub 1-1:1.0: USB hub found [ 1.890814] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd [ 1.921749] usb 2-1: New USB device found, idVendor=2357, idProduct=0601, bcdDevice=30.00 [ 1.921766] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6 [ 1.921781] usb 2-1: Product: USB 10/100/1000 LAN [ 1.921795] usb 2-1: Manufacturer: TP-LINK [ 1.921808] usb 2-1: SerialNumber: 000001000000 [ 2.091325] usb 2-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd [ 59.510562] usb 1-1.3: new high-speed USB device number 3 using xhci_hcd [ 59.664628] usb 1-1.3: New USB device found, idVendor=32e4, idProduct=8830, bcdDevice= 1.00 [ 59.664648] usb 1-1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=3 [ 59.664665] usb 1-1.3: Product: HD USB Camera [ 59.664680] usb 1-1.3: Manufacturer: HD USB Camera [ 59.664694] usb 1-1.3: SerialNumber: 2020040501 [ 59.729505] uvcvideo: Found UVC 1.00 device HD USB Camera (32e4:8830) [ 59.740595] input: HD USB Camera: HD USB Camera as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0/input/input1 [ 59.741127] usbcore: registered new interface driver uvcvideo [ 59.741141] USB Video Class driver (1.1.1) [110273.729856] usb 1-1.3: USB disconnect, device number 3 [110289.379592] usb 1-1.3: new high-speed USB device number 4 using xhci_hcd [110289.532788] usb 1-1.3: New USB device found, idVendor=32e4, idProduct=8830, bcdDevice= 1.00 [110289.532797] usb 1-1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=3 [110289.532804] usb 1-1.3: Product: HD USB Camera [110289.532810] usb 1-1.3: Manufacturer: HD USB Camera [110289.532815] usb 1-1.3: SerialNumber: 2020040501 [110289.535595] uvcvideo: Found UVC 1.00 device HD USB Camera (32e4:8830) [110289.544150] input: HD USB Camera: HD USB Camera as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0/input/input2 [289864.432365] usb 2-1: USB disconnect, device number 2 [289864.922629] usb 2-1: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd [289864.953396] usb 2-1: New USB device found, idVendor=2357, idProduct=0601, bcdDevice=30.00 [289864.953412] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6 [289864.953425] usb 2-1: Product: USB 10/100/1000 LAN [289864.953438] usb 2-1: Manufacturer: TP-LINK [289864.953450] usb 2-1: SerialNumber: 000001000000 [289865.113055] usb 2-1: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd [289865.274136] usbcore: registered new interface driver cdc_ether [344417.271957] usb 1-1.3: USB disconnect, device number 4 [344530.420204] usb 1-1.3: new high-speed USB device number 5 using xhci_hcd [344530.583587] usb 1-1.3: New USB device found, idVendor=32e4, idProduct=8830, bcdDevice= 1.00 [344530.583606] usb 1-1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=3 [344530.583623] usb 1-1.3: Product: HD USB Camera [344530.583638] usb 1-1.3: Manufacturer: HD USB Camera [344530.583653] usb 1-1.3: SerialNumber: 2020040501 [344530.587243] uvcvideo: Found UVC 1.00 device HD USB Camera (32e4:8830) [344530.606258] input: HD USB Camera: HD USB Camera as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0/input/input3
My dev folder has many video lines.. video0 through video16
So now I think my camera is actually video1. It seems happier on the log. How can I tell what the URL will be for the camera stream to work with DWC? I understand it has to be an image sequence. Do I need to set the url in the motion.conf properly for that? Can someone give me an example?
thanks again everyone
Jason
-
@jaygrovr said in ELP usb camera:
How can I tell what the URL will be for the camera stream to work with DWC?
The URL should be the IP of the Pi with the port you've configured.
-
The port is set in /etc/motion/motion.conf
I cannot remember the default (8080? 8081?). Look for the line like this
# The port number for the live stream. stream_port 8081
You can then access it with http://[IP]:8081 (in the example above)
-
Yes, I did both of those things, but i cant get it to work on both the local pi screen and the web page on another pc, either local port or remote, it seems like it has to be one or another. there is an option in the motion setup "stream_localhost" has to be on for it to work locally on attached PI screen and has to be off to work on a remote web browser. How do i make it work on both at the same time? Also the update rate seems to be about 1hz or worse.
jason
-
I have
stream_localhost off
and use a browser to connect. You can use the browser on the Pi to do the same thing (but not sure what the utility is there).
Frame rate is set in the motion.conf (15fps default from memory) but this is not the browser refresh rate (closer to 1 per sec). I have not tried to set-up for full real-time streaming since the bandwidth required would be quite high.
-
Stuartofmt, thank you. So you get an image on both a local PI screen and another pc browsing in? What URL did you provide to the DWC configuration?