Code Monkey home page Code Monkey logo

libopenvizsla's Introduction

CMake CodeQL

libopenvizsla

An attempt to reimplement OpenVizsla host software in plain C.

Getting Started

This section describes how to get started with OpenVizsla and Wireshark.

Linux

  1. Build the project as described below
  2. Copy the ovextcap executable to Wiresharks extcap directory
  3. Run Wireshark and start capturing

Windows

  1. Use Zadig to install the libusbK driver for OpenVizsla
  2. Download Windows release
  3. Extract and copy all files from bin directory to Wiresharks extcap directory
  4. Run Wireshark and start capturing

Building

Following components are required to build libopenvizsla:

  • check - unit testing framework for C;
  • cmake - cross-platform open-source build system;
  • gperf - a perfect hash function generator;
  • libftdi - FTDI USB userspace driver;
  • libzip - C library for reading, creating, and modifying zip archives;

Then, the library can be compiled as the following:

mkdir build && cd build
cmake ..
make all test

Development

Any pull-requests to the project are always welcome.

libopenvizsla's People

Contributors

desowin avatar ibokhaled avatar jorgectf avatar laf0rge avatar matwey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libopenvizsla's Issues

Rework cha_loop_transfer

In 09629fb we had to fix race condition issues by disabling data acquisition and data parsing in parallel. We have to revert this behavior in a proper way to allow better performance.

Wireshark extcap

This library is pretty much excellent choice for Wireshark extcap for OpenVizsla. I think so, because it should be possible to just compile a single executable that could simply be copied to Wireshark extcap directory.

As for actual options, I think we could have capture speed (low/full/high) and potentially FPGA firmware selection (use preloaded one, or a file selected by user).

Force FPGA firmware download?

Currently the ov_open() will skip firmware download based on the PORTB_INIT_BIT and PORTB_DONE_BIT state. While this is ok with pretty much the single firmware package floating around, it seems to me that it is prone to problems when (and if) we get multiple firmwares (e.g. with the NAK filter built in and/or streaming pcap directly).

The actual firmware download is pretty fast and I think we could just force FPGA reset and programming on every startup - that way the executable will always work with its bundled firmware package regardless of what other packages/versions might be there.

USB speed selection

Currently, USB speed is just hard coded. Unfortunately, the speed is not auto-detected by the hardware so the library interface should provide an option to specify the expected transfer speed.

Finalise library API

We need to finalise the library API somehow. Only ov_-prefixed functions should be exported. ov.h should be the single one required header file for applications.

Big-endian systems doesn't work correctly.

[  135s] 3/4 Test #2: test_decoder .....................***Failed    0.04 sec
[  135s] Running suite(s): decoder
[  135s] 42%: Checks: 7, Failures: 4, Errors: 0
[  135s] /home/abuild/rpmbuild/BUILD/libopenvizsla-0.1.0/test/decoder.c:36:F:Packet:test_packet_decoder1:0: Assertion 'p.packet.size == 1' failed: p.packet.size == 256, 1 == 1
[  135s] /home/abuild/rpmbuild/BUILD/libopenvizsla-0.1.0/test/decoder.c:46:F:Packet:test_packet_decoder2:0: Assertion 'p.packet.size == 1' failed: p.packet.size == 256, 1 == 1
[  135s] /home/abuild/rpmbuild/BUILD/libopenvizsla-0.1.0/test/decoder.c:62:F:Packet:test_packet_decoder4:0: Assertion 'p.packet.size == 3' failed: p.packet.size == 768, 3 == 3
[  135s] /home/abuild/rpmbuild/BUILD/libopenvizsla-0.1.0/test/decoder.c:73:F:Packet:test_packet_decoder5:0: Assertion 'p.packet.size == 3' failed: p.packet.size == 768, 3 == 3

Add documentation

Something like Doxygen generated docs for ov_ interface would be ok.

The load sample program freezes in cha_sync_stream()

Since a89f723 the load tool is no longer working for me. The software freezes in cha_sync_stream().

In 6480b6d when executing load sample program, the bit_load_firmware() gets executed twice. The first time it is called, it succeeds, the second time it fails with "done bit stuck low after programming".

CMake deps check

Currently, we use pkg-config tool to check if the required deps are present. However, this way is not suitable when Visual Studio CMake generator is used. In order to provide full VS support and add VS to CI we need to redo our CMakeLists.txt.

  • check
  • libftdi1
  • libusb
  • libzip
  • getopts

It would be also great if we could contribute missed CMake modules to upstream projects.

Do not force static check

On distros such as Arch installing check might not install the static library. Building on those distros will fail because of that.

Library license

There is no license information in this repository. It would be good if there was a overall licensing file included and if each and every of the source code file contained a SPDX-License-Identifier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.