VIM4 UVC handling

Hi, i experiment issue with basic uvc usb3.0 cameras.if i plug them on the usb2 port, i get them working …at usb2 speed.
When i plug them on usb3 ports, they simply don’t show up. another type of camera such as Flir is ok in USB3 on lsusb on the VIM4, the port is working.
it seems to be related to some software issue.

Does anyone has already used an uvc device on the USB3 port of the vim4.If yes, on which OS? and was it needed to make some software setup.
thanks all!

@bertrand_HAHN
I don’t have a USB 3.0 camera, so I can’t verify it at the moment. Based on the information you provided earlier, it seems that the USB 3.0 communication on your board is abnormal (probably the board is abnormal).

@bertrand_HAHN I bought a UVC camera that supports USB 3.0 and it has been verified to be OK.

cat /sys/kernel/debug/usb/devices
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
P:  Vendor=0603 ProdID=8612 Rev= 0.10
S:  Manufacturer=NOVATEK 
S:  Product=USBCamera 
S:  SerialNumber=510550000000100
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr= 96mA
A:  FirstIf#= 0 IfCount= 2 Cls=0e(video) Sub=03 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=125us
I:* If#= 1 Alt= 0 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms

Hello, many thanks to trying to find a solution. happy to see that it is not a software issue or something.I doesn’t help but it closes some doors!!
maybe the issue is related to my board version: i’ve the old one:
image
could you please verify you made the test on the new one, or push one step further (now you have the camera:)) to test on both basic and new version.

Somewhere on the forum, someone is reporting same issues solved by a new board version.
many thanks for your concerns, this is why i push for vim boards to my teams.but i need the usb3 uvc… Thanks!!

Also, could you send a simple
image

just to see if the os is dealing with it fine.It tryed many os.but i kept my day to day ubuntu:

thanks .

Hello @bertrand_HAHN

We tested a USB 3.0 UVC on New VIM4 with latest release vim4-ubuntu-22.04-gnome-linux-5.15-fenix-1.6.9-240618.img.xz, and it works well.

root@Khadas:~# cat /sys/kernel/debug/usb/devices | grep "Manufacturer=NOVATEK" -A 10 -B 3
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
P:  Vendor=0603 ProdID=8612 Rev= 0.10
S:  Manufacturer=NOVATEK 
S:  Product=USBCamera 
S:  SerialNumber=510550000000100
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr= 96mA
A:  FirstIf#= 0 IfCount= 2 Cls=0e(video) Sub=03 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=125us
I:* If#= 1 Alt= 0 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
root@Khadas:~# 
root@Khadas:~# 
root@Khadas:~# lsusb 
Bus 002 Device 002: ID 0603:8612 Novatek Microelectronics Corp. USBCamera 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 2717:5010 Xiaomi Inc. Mi Wireless Combo
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@Khadas:~# 
root@Khadas:~# 
root@Khadas:~# cat /etc/fenix-release 
# PLEASE DO NOT EDIT THIS FILE
BOARD=VIM4
VENDOR=Amlogic
VERSION=1.6.9
ARCH=arm64
INITRD_ARCH=arm64
IMAGE_VERSION=1.6.9-240618
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-vims-u-boot-2019.01-v1.6.9-release
LINUX_GIT_VERSION=khadas-vims-linux-5.15-v1.6.9-release
FENIX_GIT_VERSION=v1.6.9
#############################################
root@Khadas:~# 
root@Khadas:~# uname -a
Linux Khadas 5.15.119 #1.6.9 SMP PREEMPT Tue Jun 18 14:48:12 CST 2024 aarch64 aarch64 aarch64 GNU/Linux
root@Khadas:~# 
root@Khadas:~# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"
root@Khadas:~# 

But we also reproduce the issue on the old VIM4, it is deteced in lsusb on USB 3.0 bus, but we can’t get data from it. We will check this issue.

@ivan.li please help to check.

Hello, sorry to anoying you but please do the v4l test:
sudo apt get install v4l2-utils
and
image

v4l2-ctl --list-devices

I really need to be sure that it is related to the basic VIM4, and it goes ok on the VIM4-NPU
if you can see the UVC camera on /dev/video0 device, it is fine perfect!

many thanks for the time spent. if it works on the NPU and not on the BASIC, it can be earable.
some people are speaking the fact that wifi is perturbating the USB3 bus. i don’t know if it is relevant.
Also, i don’t really understand the overlay, maybe there is a device to activate?
Or maybe the kernel was’nt built with UVC or V4L support?

There is plenty of things that i don’t even understand, this is why the simple fact that /dev/video0 is present on VIM4-NPU will do the job for me!

many thanks.

BH

This is only an issue with using 2.4G Wi-Fi and USB-3, the issue is related to the USB-3 specification itself and not a flaw of the device.

Yes i was really not convinced, even if i tried to shut down the wifi…
anyway.I’m waiting for the VIM4-NPU v42ctl device list to see if uvc is effectivelly ok on this new boad to purshase one.
Regards

Hello @bertrand_HAHN

We have solved this problem, use OOWOW to install the firmware indicated in the picture.
http://docs.khadas.com/software/oowow/user-manual

Hello Sir, glad to see the solution coming…and yes, you make it real, the video0 device is now seen under usb3. v4l2-cnt commands are working and the UVC cameras are now able to provide USB3 speeds:

CORRECTION, GSTREAMER IS DEFINITLY WORKING
Side quest, on this ubuntu image, gstreamer is bad, there is some conflicting versions issue, here what i did to fix:

sudo apt purge gstreamer
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-ugly gstreamer1.0-tools gstreamer1.0-gl gstreamer1.0-gtk3

When you remove gstreamer, you also remove the destop.Before this, not even the videotestsrc was working and the v4l2src was giving some permission and buffer errors.(even on usb2)

In all cases, i want to say that we are very satisfyed with khadas team who took care of the issue and fixed it, yes UVC is a part of base linux distribution and it need to work, but they made the job of getting it ok on the VIM4basic.

A big thanks!

1 Like

So the gstreamer works without any changes, right?

Hello, yes. i don’t know what a did, but a freh reinstall of the image gave me gstreamer back.
but
fpsdisplaysink is still missing.

BH

1 Like

Yes, this is a known issue.