{"id":41277505,"url":"https://github.com/steve-m/fx2adc","last_synced_at":"2026-01-23T02:42:58.169Z","repository":{"id":218818829,"uuid":"743723108","full_name":"steve-m/fx2adc","owner":"steve-m","description":"Use USB oscilloscopes (e.g. Hantek) based on Cypress FX2 and AD9288 as general purpose ADC","archived":false,"fork":false,"pushed_at":"2025-02-26T21:40:49.000Z","size":70,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-26T22:28:58.495Z","etag":null,"topics":["adc","sdr","vhs-decode"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steve-m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-15T21:03:56.000Z","updated_at":"2025-02-26T21:40:53.000Z","dependencies_parsed_at":"2024-01-24T01:24:10.537Z","dependency_job_id":"df3a4825-9827-4fca-905c-f72128439f33","html_url":"https://github.com/steve-m/fx2adc","commit_stats":null,"previous_names":["steve-m/fx2adc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/steve-m/fx2adc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steve-m%2Ffx2adc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steve-m%2Ffx2adc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steve-m%2Ffx2adc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steve-m%2Ffx2adc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steve-m","download_url":"https://codeload.github.com/steve-m/fx2adc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steve-m%2Ffx2adc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28679138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"online","status_checked_at":"2026-01-23T02:00:08.296Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adc","sdr","vhs-decode"],"created_at":"2026-01-23T02:42:57.130Z","updated_at":"2026-01-23T02:42:58.163Z","avatar_url":"https://github.com/steve-m.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fx2adc\n\n\nfx2adc is a cross-platform userspace library and set of commandline applications for acquiring a continuous, uninterrupted stream of samples from USB oscilloscopes that are based on the [Cypress FX2](https://www.infineon.com/cms/de/product/universal-serial-bus/usb-2.0-peripheral-controllers/ez-usb-fx2lp-fx2g2-usb-2.0-peripheral-controller/) high-speed USB interface chip  and the [AD9288](https://www.analog.com/media/en/technical-documentation/data-sheets/AD9288.pdf) ADC (or [clones](https://corebai.com/en/usb-kongzhiqi/CBM9002A-100TCG.html) [thereof](http://www.mxtronics.com/n107/n124/n181/n184/c692/attr/2630.pdf)).\n\nWithout hardware modification, these oscilloscopes can provide an 8-bit unsigned stream of samples at 30 MSPS. When an external clock generator is added with a hardware modification, 40 MSPS or even up to 45 MSPS can be reached (depending on the USB host controller and the host machine).\n\nCurrently, the following hardware is supported:\n\n- [Hantek 6022BE](https://sigrok.org/wiki/Hantek_6022BE)\n- [Hantek 6022BL](https://sigrok.org/wiki/Hantek_6022BL)\n- [Hantek PSO2020](https://sigrok.org/wiki/Hantek_PSO2020)\n- [Instrustar ISDS205A](https://sigrok.org/wiki/Instrustar_ISDS205A)\n- [SainSmart DDS120](https://sigrok.org/wiki/SainSmart_DDS120)\n- [YiXingDianZi MDSO](https://sigrok.org/wiki/YiXingDianZi_MDSO)\n\nExcept the Hantek PSO2020, all oscilloscopes listed here have two input channels. However, as the USB 2.0 bandwidth is the bottleneck (around 45 MByte/s), you only can achieve 16 MSPS per channel when both channels are active. Note that through the design of the FX2, you can only either stream CH1, or CH1 + CH2. Streaming CH2 alone is not possible.\n\nCurrently, fx2adc only supports streaming a single channel, but dual channel functionality will be added in the future.\n\n## What can it be used for?\n\nFor the regular use-case of those oscilloscopes there is already existing software like [Sigrok](https://sigrok.org/) or [OpenHantek](https://github.com/OpenHantek/OpenHantek6022/).\nThis project focuses on (ab)using the hardware outside of its original intended purpose:\n\n- Using it as RF capture hardware for [vhs-decode](https://github.com/oyvindln/vhs-decode)\n- Using it as a direct sampling SDR, or even attaching a low-IF tuner chip like the R820T\n- Attaching and configuring an external clock generator like the Si5351 to achieve higher sample rates (up to 45 MSPS) and to synchronize multiple devices\n\n## Installation\n\n### Linux\n\nAs this project shares code with [rtl-sdr](https://osmocom.org/projects/rtl-sdr/wiki/Rtl-sdr) and [osmo-fl2k](https://osmocom.org/projects/osmo-fl2k/wiki), the installation process is almost identical.\n\nTo install the build dependencies on a distribution based on Debian (e.g. Ubuntu), run the following command:\n\n    sudo apt-get install build-essential cmake pkgconf libusb-1.0-0-dev\n\nTo build fx2adc:\n\n    git clone https://github.com/steve-m/fx2adc.git\n    mkdir fx2adc/build\n    cd fx2adc/build\n    cmake ../ -DINSTALL_UDEV_RULES=ON\n    make -j 4\n    sudo make install\n    sudo ldconfig\n\nTo be able to access the USB device as non-root, the udev rules need to be installed (either use -DINSTALL_UDEV_RULES=ON or manually copy fx2adc.rules to /etc/udev/rules.d/).\n\nBefore being able to use the device as a non-root user, the udev rules need to be reloaded:\n\n    sudo udevadm control -R\n    sudo udevadm trigger\n\nFurthermore, make sure your user is a member of the group 'plugdev'.\nTo make sure the group exists and add your user to it, run:\n\n    sudo groupadd plugdev\n    sudo usermod -a -G plugdev \u003cyour username\u003e\n\nIf you haven't already been a member, you need to logout and login again for the group membership to become effective.\n\n\n### Windows\n\nfx2adc can be built with [MSYS2](https://www.msys2.org/). More information will follow, as well as a precompiled binary release.\n\nA libusb compatible driver needs to be installed with [Zadig](https://zadig.akeo.ie/).\n\n### Mac OS X\n\nAs rtl-sdr [works on OS X](https://github.com/macports/macports-ports/blob/master/science/rtl-sdr/Portfile), fx2adc should run as well, although it hasn't been tested yet.\n\n## Applications\n\n### fx2adc_file\n\nThis application records the sample data into a file. The following command captures samples at 30 MSPS to the file capture.u8 until the application is terminated with Ctrl-C:\n\n    fx2adc_file -s 30e6 capture.u8\n\n### fx2adc_tcp\n\nThis application is similar to rtl_tcp, it opens a listening TCP socket (by default on port 1234). For example, you can use the [GNURadio TCP source block](https://wiki.gnuradio.org/index.php?title=TCP_Source) and a UChar to Float block to view the samples and spectrum in real time using GNURadio.\n\n### fx2adc_test\n\nThe purpose of this application is measuring the real sample rate the device outputs (and the sample rate error in PPM). It can be used to test if the device works correctly and if the clock is stable, and if there are any bottlenecks with the USB connection.\n\nExample output:\n\n    » fx2adc_test -p 60\n    Opened Hantek PSO2020\n    Reporting PPM error measurement every 60 seconds...\n    Press ^C after a few minutes.\n    Allocating 15 zero-copy buffers\n    real sample rate: 30002251 current PPM: 75 cumulative PPM: 75\n    real sample rate: 30002373 current PPM: 79 cumulative PPM: 77\n    real sample rate: 30002361 current PPM: 79 cumulative PPM: 78\n    real sample rate: 30002462 current PPM: 82 cumulative PPM: 79\n\n## Credits\n\nfx2adc is developed by Steve Markgraf, and is heavily based on rtl-sdr, osmo-fl2k and libsigrok. Furthermore, it uses a [modified version](https://github.com/steve-m/sigrok-firmware-fx2lafw/tree/fx2adc) of the [fx2lafw](http://sigrok.org/wiki/Fx2lafw).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteve-m%2Ffx2adc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteve-m%2Ffx2adc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteve-m%2Ffx2adc/lists"}