USB Camera on GPIO (VIM3)

I have a USB camera that I want to use via the GPIO pins but I am struggling :sweat:
I am running android on the device, but I have ubuntu installed right now because I was attempting to use the gpio command

Anyone here know how to get this working? :grin:
First image is from the connector from the camera, and the second is…yeah you know, the VIM3 :stuck_out_tongue:

This may sound silly, but your color coding is ticking me off :sweat_smile:
I Think your webcam pins are connected to the wrong GPIO…

I am not sure with your wiring, please check if you have this accordingly…


I totally get that, it ticks me off as well :sweat_smile:
Yeah, I connected them as you posted
and it corresponds to the description from the camera (first image)

I have a GPIO connected USB camera. I will try it on the VIM3 tonight.
My DIY GPIO USB camera works on the VIM3 running VIMx.Ubuntu-xfce-bionic_Linux-4.9_arm64_V20191231.emmc.kresq, installed by Krescue.
If you run lsusb, does the camera show? Check to insure D- and D+ are not the wrong way around.

I got the camera working for a little bit, got a few seconds of image before it just froze, but I think that is a connector issue with the camera module itself…
Seems like it is detected as a USB device but I cannot get any image out anymore >_>

RIP camera I guess ? :neutral_face:

Might be, I can hear the IR cutout filter turn on and off, and the light sensor for the IR cutout filter works fine, just no image :stuck_out_tongue:
I also have the camera from the store here and I cannot get any image from that either so not sure what that is about… :sweat_smile:

Is the camera being registered as a keypad? :face_with_monocle:

Image from udevadm

last one from dmesg | grep “usb”

Seems to be some kind of usb issue, but I am not a wizard :exploding_head:

Out of all the commands you could have entered…, you choose to not try lsusb :joy:

I have done that too :stuck_out_tongue: :rofl:
took a pic of it now just for you

Hmm, @binbash
Check bus 1 and device 4, there is no tag, seems bizzare…

According to this it should be the LTE module :blush:

I tried connecting the same camera but with a USB cable and that works perfectly, Here is the pastebin from the udevadm using the USB cable

pastebin: password: kk150rkh9D

is there some issue with the driver when using the GPIO?

@binbash usb uses differential signal, these differential signals are very sensitive to length of the wires. USB-DP wire and USB-DM wire should be of same length (if using high speed like 480MBps the tolerance is much lower). Use wires of equal length and in twisted pair configuration, this might help

I was using this cable, it is a bit shorter than the original USB cable, could that have been the issue all along?

Here is the original USB cable

those jumper wires is the issue… you could try making the data lines as twisted pair

1 Like

Hei together,
A few days ago I asked a question about the USB camera.
I now have a USB 2.0 camera with UVC standard.
I would like to connect this to the GPIO bus as described.
However, we use Andriod.
is that possible …?

Hello, The camera connects to the GPIO’s USB pins, should work in Android as well. In fact, I am almost certain I have used the GPIO USB while running Android. The camera will show up in Android as it would for USB connected camera connected to any of the USB ports.

Hei, many thanks for this tipp!
I will try it so fast as possible.
Until now, we used the Khadas MIPI OS08A-10 Camera.
This Camera was still working but there was much interferences
with a longer cable connection between Camera and VIM3 pro board.
This is the reason for trying to change to a USB based Camera!
Normaly follow we the Order “Never Change a running System”
but the System works perfect, only the Camera make problems!
Klaus from Norway

1 Like

Yeah… the jumperwires where the issue, soldered some connectors to a USB cable and it worked flawlessly :grin:

Thank you all for helping me out :blush: