greatscottgadgets / cynthion

USB test instrument
https://greatscottgadgets.com/cynthion/
BSD 3-Clause "New" or "Revised" License
71 stars 19 forks source link

OpenBSD: Cynthion does not connect to hardware #135

Open fcbsd opened 2 months ago

fcbsd commented 2 months ago

I am running Cynthion on OpenBSD (OpenBSD heather.crowsons.com 7.5 GENERIC.MP#82 amd64) and I am getting the "No Apollo device or stub interface found" when running cynthion info , while I appreciate that OpenBSD probably not a supported platform, I would like to know how cynthion attaches to the device - looking through the code for 1d50 does not show any obvious place where the connection is made...any hints would be appreciated.

Further info:

heather:fred ~: grep "Cynthion" /var/log/messages |tail -1                                                
Jul 12 14:26:31 heather /bsd: ugen2 at uhub2 port 4 "Cynthion Project USB Analyzer" rev 2.00/1.04 addr 9
heather:fred ~: usbdevs -v |grep Cynthion
addr 09: 1d50:615b Cynthion Project, USB Analyzer
heather:fred ~: .local/bin/cynthion info
No Apollo device or stub interface found.
martinling commented 2 months ago

We haven't tested on OpenBSD, and we don't really have the resources to officially support it, but I see no fundamental reason that most of our tools shouldn't work there, as the platform is supported by libusb and the associated Python USB libraries. You will have issues if you want to run Packetry though, because that's using nusb, which doesn't have an OpenBSD backend as yet.

Returning to your specific issue, the code you're looking for is in the Apollo project, the Python side of which is a dependency of the cynthion package. You should be able to run the apollo command line tool that was installed with it.

Basically, it's looking for either an Apollo device - i.e. the MCU on the Cynthion, which will enumerate if you push the PROGRAM button - or a special "stub" interface that can be exposed by USB devices running from the FPGA, which supports asking the device to hand control back to the MCU.

Why it can't find it will be down to some issue with listing, opening and accessing USB devices and interfaces on them.

fcbsd commented 2 months ago

thanks I'll take a look