Mike Walters Unlocks an Elgato Cam Link 4K for Webcam Use with a Little Firmware Hackery

Looking for a fix rather than a workaround, Walters has created a patched firmware to unlock the Elgato's webcam compatibility.

Gareth Halfacree
4 years ago β€’ Photos & Video / FPGAs
An Elgato Cam Link 4K makes a great webcam alternative, with a little firmware mod. (πŸ“·: Mike Walters)

When an off-the-shelf device doesn't quite work right, you could discard it and buy another β€” or, if you're Mike Walters, you could take it apart and modify the firmware to unlock previously-unavailable functionality.

"A while back I got an Elgato Cam Link 4K, mostly as a reverse engineering target since it's based around the ECP5 FPGA (which is well-supported by open source tools) and it has USB 3 & HDMI interfaces that would be interesting to play with," Walters writes. "However, it works rather well in its intended form β€” as an HDMI capture device v so I've just been using it as-is so far.

"I ran into problems recently when trying to use it for videoconferencing. While it works just fine in OBS, it would not work in Discord/Jitsi/Zoom/etc.: either showing a blank output or not giving an option to use the device at all."

The inability to use the device as a videoconferencing input - a critical failing, given that webcams are in short supply as increasing numbers of people work remotely in a bid to step the spread of SARS-CoV-2 β€” was irksome, but not without a fix: Walters found a Reddit thread detailing a few simple commands which push the captured video through ffmpeg into a dummy webcam output.

"We could just stop here, but I didn't want to have to run that every time I wanted to use a webcam," Walters notes. "Also, I didn't want to waste CPU for ffmpeg to shunt the data around, so let's dig a bit further."

Digging further involves an investigation into the formats available from the capture device, which revealed that while a format compatible with webcam applications is supported it is not actually usable. Building on earlier work by Kate Temkin, Walters was able to investigate the firmware on the device and figure out how to disable the unsupported formats in favour of the target format - but how to run it on the device?

"The USB interface/microcontroller used on the Cam Link is the Cypress FX3," Walters explains. "Conveniently, it reads its firmware from an SPI flash IC on every boot and, if it doesn't read a valid image it will drop into a USB bootloader. I could pop open the case and short out some data pins on the flash IC while plugging in the device. This would force it into the bootloader. Now I could use fx3load from the usb-tools pyfwup project to test out my patched firmware, and woohoo! It no longer has the problematic formats"

After a little trouble getting the modified firmware to stick through power cycling - eventually tracked down to a bug in the camlink code which prevented it from sending the erase commands required to write new firmware to the device β€” and Walters' capture device was up and running.

Walters' full write-up is available on his blog, Assorted Hackery, with more information available on the Apertus wiki.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles