Linux USB drivers reverse-engineering

Developer Ben Cox sets out to get old VGA capture cards working on a modern Linux build. Interesting read for people interested in Linux, USB and video technology. Hackster.io reports:

Ben Cox Revives Epiphan’s VGA Capture Cards with Custom Reverse-Engineered Linux Driver
https://www.hackster.io/news/ben-cox-revives-epiphan-s-vga-capture-cards-with-custom-reverse-engineered-linux-driver-4fb8de896605

Having picked up a bulk supply of VGA capture cards for pennies on the dollar, Cox sets out to get them working.. Here is developer blog post:

Writing userspace USB drivers for abandoned devices
https://blog.benjojo.co.uk/post/userspace-usb-drivers

To get information what goes on UBS bus, the developer loaded the usbmon module on the VM’s host machine and used Wireshark to take a packet capture of the USB traffic to and from the device during startup and whilst capturing video. Both tshark and tcpdump can read USB packets inside pcap files. The developer also used NSA’s Ghidra to get an idea of what was going on inside of the real driver.

 

 

 

You can find the code for this driver (and pre-built versions for Linux and OSX) on github: https://github.com/benjojo/userspace-vga2usb/

7 Comments

  1. Tomi Engdahl says:

    VGA Signal In A Browser Window, Thanks To Reverse Engineering
    https://hackaday.com/2019/12/30/vga-signal-in-a-browser-window-thanks-to-reverse-engineering/

    [Ben Cox] found some interesting USB devices on eBay. The Epiphan VGA2USB LR accepts VGA video on one end and presents it as a USB webcam-like video signal on the other. Never have to haul a VGA monitor out again? Sounds good to us! The devices are old and abandoned hardware, but they do claim Linux support

    But when they did arrive, the devices didn’t enumerate as a USB UVC video device as expected. The vendor has a custom driver, support for which ended in Linux 4.9

    By now [Ben] was curious about how all this worked and began digging, aiming to create a userspace driver for the device. He was successful, and with his usual detail [Ben] explains not only the process he followed to troubleshoot the problem but also how these devices (and his driver) work

    Writing userspace USB drivers for abandoned devices
    https://blog.benjojo.co.uk/post/userspace-usb-drivers

    Reply
  2. Tomi Engdahl says:

    A userspace driver implementation of the Epiphan VGA2USB LR
    https://github.com/benjojo/userspace-vga2usb/

    Reply
  3. Tomi Engdahl says:

    Harry Gill’s process involves capturing USB packages via Wireshark and USBPcap, using Rust to replicate the data, and writing a bit of Linux software.

    Developer Uses Rust to Reverse Engineer USB Device for Linux Support
    https://www.hackster.io/news/developer-uses-rust-to-reverse-engineer-usb-device-for-linux-support-686260ce1dd8

    The process involves capturing USB packages via Wireshark and USBPcap, using Rust to replicate the data and writing a bit of Linux software.

    Reply
  4. DiTBho says:

    hi
    anyone interested in a full C-application-driver for Epiphan VGA2USB LR?
    if so, let me know, I am working on it.

    Reply

Leave a Reply to DiTBho Cancel reply

Your email address will not be published. Required fields are marked *

*

*