Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenViszla backend #157

Open
smunaut opened this issue Aug 5, 2024 · 4 comments
Open

OpenViszla backend #157

smunaut opened this issue Aug 5, 2024 · 4 comments
Labels
enhancement potential new feature help wanted help from community wanted and appreciated

Comments

@smunaut
Copy link

smunaut commented Aug 5, 2024

And in general, support for more than a single backend.

I know virtually nothing about Rust, but just reading the code a bit, it does seem like there is the beginning of separation but there is still "single backend" parts in the UI AFAICT (that directly refer to cynthion without any other choice / support to select something else).

@martinling martinling added the enhancement potential new feature label Aug 5, 2024
@martinling
Copy link
Member

martinling commented Aug 5, 2024

So the situation right now is this.

The architecture has been designed to make it easy in principle to add support for other capture backends. And in a way there's already two backends, in the sense that both Cynthion capture and pcap loading work quite similarly: both just feed raw timestamped packets into the same decoder/storage engine.

But what we don't have yet is an API for defining new backends. And that API, when we do create it, is probably going to be more complicated than just turning the public API surface of cynthion.rs into a trait definition. It will need to cover not just device discovery and capture, but also presenting different UI elements for other devices, according to what capture settings they offer.

The reasons we haven't done this work yet are:

  1. Our priority has been, and will continue to be, supporting Cynthion.
  2. Trying to generalize from a single example rarely leads to good results.

Realistically, we are not going to be able to allocate developer time to writing backends for devices other than Cynthion. But we would like to have them, and not having an API to develop them to is obviously going to hinder that.

So I'm going to make the following offer to anyone who wants to contribute:

If you want to add support for OpenViszla (or any other OSHW capture device), please go ahead and do so by making a branch where you replace the Cynthion backend with your own. If you need to modify the UI too, e.g. to add controls for additional capture settings, please go ahead and do that as well.

Then, once you have a version of Packetry that works with your device only, submit a draft PR, and I hereby volunteer to take care of the rest.

I'll look at what the differences are between your backend and the Cynthion one, define an API that abstracts across them, and then put together a new PR which adds support for your backend in addition to the Cynthion one. I'll then need you to test and review that new PR to ensure it still works correctly with your device.

@laf0rge
Copy link

laf0rge commented Aug 6, 2024

@asdfuser from our team at @sysmocom has rust development experience and will (as low priority task, so hold your breath) look into support for ice40-usbtrace using the approach specified above.

Let's see how that goes, and once a backend abstraction materializes we can potentially also look at OpenVizsla.

@martinling martinling added the help wanted help from community wanted and appreciated label Aug 8, 2024
@martinling
Copy link
Member

The backend API and iCE40-usbtrace backend have just been merged in #193. Thanks to @asdfuser for developing the initial backend, @laf0rge and @sysmocom for supporting that work, @smunaut for testing and debugging and @miek for final review.

If anyone would like to add an OpenViszla backend, it should now be a lot easier to do.

I'm expecting that it will still be necessary to make API changes to support additional features - both as additional backends are developed, and as we add new features to the Cynthion analyzer gateware.

So the API shouldn't be seen as set in stone, and I'm happy to discuss changes as needed, but I expect what's there will suffice for basic OpenViszla support.

@laf0rge
Copy link

laf0rge commented Oct 11, 2024

@asdfuser has a number of higher-priority tasks for the time being, but in general, @sysmocom is still willing to also support the development of an OpenVizsla backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement potential new feature help wanted help from community wanted and appreciated
Projects
None yet
Development

No branches or pull requests

3 participants