jeanthom / jeanthom/usb2sniffer-cli

libusb support

Open
#4 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
5
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Like the vendor GUI, this CLI tool currently requires the ft60x kernel driver which isn't upstream. Loading an out-of-tree kernel module is not always on option. Fortunately talking to the FT601 to the extent required to get usb2sniffer working is pretty straightforward (given the kernel driver as a starting point which is presumably based on reverse engineering of the closed-source FTDI driver) and can be done from user space using libusb (on Linux at least; no idea about Windows).

I've got it working locally but before I clean it up and send a pull request I'd like to discuss the approach first.

There are two topics worth discussing right now:

1. Whether to make libusb support optional

The build infrastructure is currently pretty bare-bones with no configuration or dependency detection support. Given that libusb 1.0 is readily available in pretty much all distros I'd prefer to keep it that way and simply hard-depend on libusb (on Linux).

2. How to select libusb mode and whether to support multiple FT601s

I currently take anything starting with `/` as a path to the ft60x kernel driver device node; otherwise the string is simply ignored and the first FT601 found by libusb is used. This is a bit hacky but straightforward to implement with no changes to code outside of `fops.c` / `fops.h` and addresses the most common use case (few people will have multiple USB analysers or other FT601 based devices connected).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.