Hi everyone, I’m trying to control autofocus on my camera setup but I can’t get it working at all. I’ve been digging through the V4L2 tools on Ubuntu and they don’t seem to expose any manual focus value range for the camera. I can see other controls, but nothing for focus. Has anyone managed to control focus on these Arducam modules?
Welcome to the forum. Can you tell us exactly which camera module and USB board you’re using, plus what software stack you’re running? That’ll help narrow down where the focus control is getting lost.
Sure. It’s a Motorized IMX477 (SKU KE3024, Code B0272) connected to a USB UVC Board (SKU KK5006, Code B0278). On the software side I’m using JavaCV (the Java bindings for OpenCV) on Ubuntu. I can control brightness, contrast, and a few other settings fine through JavaCV, and I’ve also checked the control ranges with v4l2-ctl / v4l2 tools. But there’s no manual focus value range exposed anywhere. I attached a couple of photos of the module and board setup.


Thanks for the photos, that helps a lot. Looking at your setup, the root cause is the USB UVC board rather than the camera module itself. The Motorized IMX477 (B0272) does have an autofocus motor, but the USB UVC Board (B0278) doesn’t support autofocus control. That board has no way to access or pass focus commands to the motor programmatically, which is exactly why V4L2 shows no manual focus range. So with this specific combination, software focus control isn’t possible.
That’s a bit disappointing. Is there any OpenCV or JavaCV code sample for this combo, or maybe a workaround to at least set focus manually? I’d even settle for knowing whether autofocus keeps running on some default. I just want to understand what’s actually possible with what I have.
There isn’t a specific OpenCV or JavaCV code sample for controlling focus on the B0272 + B0278 combination. The autofocus will likely keep operating on its default setting, but manual software control can’t be done through the B0278 board. If programmatic focus control is critical for your application, you might want to look at a module that supports autofocus natively over USB, like the Arducam 4K 8MP IMX219 Autofocus USB Camera Module (without microphone): Arducam 4K 8MP IMX219 Autofocus USB Camera Module Without Microphone, 1080P Mini UVC USB2.0 Webcam Board with 3.3ft/1m Cable for Computer, Laptop, Raspberry Pi, Jetson Nano
Thanks for the suggestion. I checked that module, but it isn’t sold at local online stores here in Indonesia, so I’d need to import it. My current setup was bought only from locally available stores, which is partly why I ended up with these parts. Is there really no way to get focus control out of the B0278 board itself?
Correct — the autofocus limitation is caused by the USB UVC Board (B0278), not the camera module. The board simply doesn’t provide access to the autofocus motor, so no amount of tweaking on the Ubuntu/JavaCV/V4L2 side will expose manual focus with that board. If focus control becomes a hard requirement, switching to a USB camera module with native autofocus support (like the IMX219 autofocus USB camera) is the recommended path, even if it means importing it.