trying to get Logitech C930e working with TX2

I can’t seem to get a C930e working with a TX2. Here is what I’ve done so far:

-From an Ubuntu 16.04 host, installed JetPack 3.3 and flashed a new TX2 with the options recommended by the JetPack installer. No errors were encountered during the host install or the TX2 flash.

-Got the basics working with the TX2 (verified internet access, ran a few of the NVIDIA samples successfully)

-Did a

sudo apt-get update

and

sudo apt-get upgrade

In retrospect this may have been a mistake? Am I supposed to do this with a TX2?

-Connected a C930e to the same USB hub as my mouse and keyboard

-Did a

lsusb

output shows

Logitech, Inc. Webcam C930e

among others so I know the webcam is at least being seen

-Installed cheese and ran it, the box that is supposed to have the webcam picture is blank and on the command line I get the error:

(cheese:11680): cheese-WARNING **: Device '/dev/video0' cannot capture in the specified format: gtsv 4l2object.c(3482): gst_v4l2_object_set_format_full (): /GstCameraBin:camera/GstWrapperCameraBinSrc:camera_source/GstBin:bin18:GstV4l2Src:v4l2src1:
Tried to capture in YU12, but device returned format BG10

-I installed fswebcam and tried to run it, I get this error:

--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Adjusting resulution from 384x288 to 2592x1944.
Error setting pixel format.
VIDIOC_S_FMT: Invalid Argument

-I’m not sure if video for linux is pre-installed with the TX2 (I’m not at all new to vision development or Ubuntu but I am new to the TX2 at this point), so I did:

apt-cache search v4l2

and based on the listing from that I installed

sudo apt-get install v4l-utils
sudo apt-get install libv4l-dev

Then I tried running cheese and fswebcam again and received the same errors as before.

Suggestions?

Edit:
I’m not sure if this matters, but if I do

v4l2-ctl --list-formats

I get

ioctl: VIDIOC_ENUM_FMT
    Index        : 0
    Type         : Video Capture
    Pixel Format : 'BG10'
    Name         : 10-bit Bayer BGBG/GRGR

Edit2:

I opened another C930e and connected it to an Ubuntu 18.04 host, than ran cheese and it worked fine. I then swapped the two C930e s and got the same result (either works on 18.04 host, neither on 16.04 TX2). Another thing I should mention is that if I do

v4l2-ctl --list-formats

on the 18.04 host where they both work, I get completely different output:

ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'YUYV'
	Name        : YUYV 4:2:2

	Index       : 1
	Type        : Video Capture
	Pixel Format: 'MJPG' (compressed)
	Name        : Motion-JPEG

It seems like the 16.04 TX2 is not seeing the camera correctly. Suggestions?

Edit3:

On a Windows 10 machine I updated the firmware of the C930e to the latest firmware version 8.0.916 then tested on the Windows 10 machine, the C930e works fine. Then I tested on a regular desktop install of Ubuntu 16.04, the C930e works fine with cheese. Then after having updated the firmware in the C930e I tested on the TX2 16.04 again, still does not work, same errors as above. Please help.

Edit4:

I’ve used C930e s with USB hubs before, but to eliminate the C930e being connected through the USB hub on the way to the TX2 as a possible cause, I disconnected the USB hub from the TX2, connected the C930e directly to the sole USB port on the TX2, then ssh ed into the TX2 with the X option

ssh -X nvidia@999.999.999.999

but of course I used the actual IP address of the TX2 on my network rather than all 9s. I was able to successfully ssh in from an Ubuntu 18.04 host but when I ran fswebcam I still got the same error as above so I’ve confirmed the USB hub is not the problem.

Edit5:

I decided to check the /dev directory for video devices:

ls -l /dev

Among of course many other lines I get these:

crw-rw----+ 1 root   video    81,   2 Dec  4 16:30 video0
crw-rw----+ 1 root   video    81,   3 Dec  4 16:46 video1

I gather video0 is the built in camera on the TX2 dev board and video1 is the C930e? It seems this output is as it should be so I’m not sure where to look next.

Edit6:

Ok, this gets even weirder. I realized that these applications default to /dev/video0 and that seems to be the build in camera, so I decided to try fswebcam with video1:

fswebcam -d /dev/video1 test_image.jpg

This actually worked and saved the single image successfully. There are still problems however. If I do:

cheese -d /dev/video1

I get:

Segmentation fault (core dumped)

So things I’m not sure of at this point are:
-What test application can I successfully get streaming video with if not cheese?
-When running cheese with no command line parameters as previously, why did it not work with the TX2 dev board camers?

I think I’m going to write a quick OpenCV test program and try that next.

Hi,
Your Logitech C930e is at /dev/video1. Please try below pipelines:

gst-launch-1.0 v4l2src device=/dev/video1 ! "video/x-raw, width=1920, height=1080, format=I420" ! queue ! xvimagesink
$ gst-launch-1.0 v4l2src device=/dev/video1 ! "image/jpeg,width=1920,height=1080" ! jpegdec ! queue ! xvimagesink

Reference link:
https://devtalk.nvidia.com/default/topic/1044424/