{"id":26210004,"url":"https://github.com/whiteshadow1234/hackrf-one-for-windows","last_synced_at":"2025-12-17T22:58:41.111Z","repository":{"id":281912084,"uuid":"944376209","full_name":"whiteSHADOW1234/HackRF-One-for-Windows","owner":"whiteSHADOW1234","description":"A practical guide to getting HackRF One up and running on Windows","archived":false,"fork":false,"pushed_at":"2025-03-11T19:21:18.000Z","size":365,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T20:28:06.577Z","etag":null,"topics":["conda-environment","hackrf","hackrf-one","usbipd-win","windows","wsl","wsl-ubuntu","zadig"],"latest_commit_sha":null,"homepage":"","language":"Python","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/whiteSHADOW1234.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":"2025-03-07T08:39:47.000Z","updated_at":"2025-03-11T19:21:22.000Z","dependencies_parsed_at":"2025-03-11T20:28:43.361Z","dependency_job_id":"920cc5ca-6ae4-4dc1-903f-f001ccd60148","html_url":"https://github.com/whiteSHADOW1234/HackRF-One-for-Windows","commit_stats":null,"previous_names":["whiteshadow1234/hackrf-one-for-windows"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteSHADOW1234%2FHackRF-One-for-Windows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteSHADOW1234%2FHackRF-One-for-Windows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteSHADOW1234%2FHackRF-One-for-Windows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteSHADOW1234%2FHackRF-One-for-Windows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whiteSHADOW1234","download_url":"https://codeload.github.com/whiteSHADOW1234/HackRF-One-for-Windows/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243172243,"owners_count":20247912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["conda-environment","hackrf","hackrf-one","usbipd-win","windows","wsl","wsl-ubuntu","zadig"],"created_at":"2025-03-12T07:18:47.252Z","updated_at":"2025-12-17T22:58:41.103Z","avatar_url":"https://github.com/whiteSHADOW1234.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HackRF One for Windows\nA comprehensive tutorial for setting up and using HackRF One on Windows. This repository provides detailed step-by-step instructions, code samples, and troubleshooting tips—filling the gap left by Linux-focused guides. It also integrates modified code from [jamRF_v1.py](https://github.com/tiiuae/jamrf/blob/master/HackRF/jamRF_v1.py)\n\n\u003e [!CAUTION]\n\u003e ### Disclaimer\n\u003e This repository is provided for **educational purposes only**. **Unauthorized transmission of signals on any frequency band is strictly prohibited.** The code is distributed **\"as is,\" without any warranties**, including but not limited to warranties of merchantability, fitness for a particular purpose, or noninfringement. The authors and contributors shall not be held liable for any damages or legal issues arising from the use or misuse of this code. Use it at your own risk, and ensure compliance with all **applicable laws and regulations**. By using or distributing this software, you acknowledge that you have read and understood this disclaimer.\n\n\n## Overview\nHackRF One is a popular, low-cost, open-source software-defined radio (SDR) platform. While many setup guides assume a Linux environment, this project is tailored for Windows users. Whether you prefer using Conda, WSL, or Docker, this guide covers various methods to get you started.\n\n## Features\n- Step-by-step setup guide for HackRF One on Windows\n- Windows-specific code samples and scripts\n- Integration of selected functions from jamRF_v1.py\n- Troubleshooting tips and FAQ\n\n## Requirements\n- **Operating System:** Windows 10 or later\n- **Device:** HackRF One, Micro USB cable (for connecting HackRF to your PC)\n- **Python:** Version 3.6 or higher\n\n\u003e [!NOTE]\n\u003e There are two popular firmware:\n\u003e - (Preferred) **Stock HackRF One firmware** uses a date-based tag in the *YYYY.MM.DD* format (e.g., *2024.02.1*).  \n  To update or verify your firmware, see the official instructions at [Updating Firmware](https://hackrf.readthedocs.io/en/latest/updating_firmware.html)\n\u003e - (Most common preloaded) **Mayhem (PortaPack) firmware** uses semantic versioning in the *vX.X.X* format (e.g., *v2.1.0*).  \n  For details on Mayhem updates, see the [PortaPack Mayhem repository](https://github.com/portapack-mayhem/mayhem-firmware)\n\u003e\n\u003e Sometimes Mayhem (PortaPack) firmware might require using Zadig (as shown in the screenshots under the 2nd step in the conda setup section) to resolve “No HackRF boards found.” errors.\n\n## Contents\n- **[Conda Setup](#conda-setup)**\n- **[Radioconda Setup](#radioconda-setup)**\n- **[WSL Setup](#wsl-setup)**\n- **[Troubleshooting](#troubleshooting)**\n\n## Conda Setup\n1. Prepare Essentials:\n   - Download and install [Git](https://git-scm.com/downloads) and [Miniconda](https://www.anaconda.com/download/success) (or Anaconda).\n2. Connect and Verify HackRF One\n   - Plug in your HackRF One with a micro USB cable.\n   - Open the Device Manager to check if your PC recognizes the device.\n   - If not recognized properly, download and run [Zadig](https://zadig.akeo.ie/):\n      - Click on List All Devices.\n         ![zadig-screenshot-1](images/3-1.png)\n      - From the drop-down menu, select HackRF One.\n         ![zadig-screenshot-2](images/3-2.png)\n      - Click Downgrade WCID Driver to install the driver.\n         ![zadig-screenshot-3](images/3-3.png)\n      - Confirm in Device Manager that the HackRF One now appears correctly.\n         ![zadig-screenshot-4](images/3-4.png)\n\n3. Clone the Repository\n   Open a Command Prompt and run:\n   ```\n   git clone https://github.com/whiteSHADOW1234/HackRF-One-for-Windows.git\n   ```\n   This will download the files `jamRF_v1.py` and `config_v1.yaml`.\n4. Set Up the Python Environment\n   - Launch Visual Studio Code (or your preferred editor) and open the cloned repository. \n   - If you see unresolved package errors (e.g., as shown below), proceed with the following steps:\n   ![vScode-screenshot](images/4-1.png)\n\n   - Open a Command Prompt (by) and run:\n      ```\n      conda create -n hackrf_env -c conda-forge gnuradio gnuradio-osmosdr hackrf -y\n      conda activate hackrf_env\n      ```\n   - Then, in VSCode, change the Python interpreter to `hackrf_env`:\n      - Click on the status bar section that shows the current interpreter and select the one called `hackrf_env`.\n      ![vScode-screenshot](images/4-2.png)\n      - Alternatively, open the Command Palette (`Ctrl + Shift + P` on Windows/Linux or `Cmd + Shift + P` on macOS) and type `Python: Select Interpreter` to choose `hackrf_env`.\n   - And restart the terminal, the error message (`import XXX could not be found`) should now be resolved.\n      ![vScode-screenshot](images/4-3.png)\n\n\u003e [!TIP]\n\u003e You might need to restart VS Code terminal twice to clear all issues.\n\u003e ![vScode-screenshot](images/4-4.png)\n  \n\n5. Verify and Run\n   - In the terminal, run the following command to ensure HackRF One details are displayed.\n      ```\n      \u003e hackrf_info\n      hackrf_info version: 2024.02.1\n      libhackrf version: 2024.02.1 (0.9)\n      Found HackRF\n      Index: 0\n      Serial number: 0000000000000000a18c63dc2b3c6813\n      Board ID Number: 2 (HackRF One)\n      Firmware Version: v2.0.1 (API:1.08)\n      Part ID Number: 0xa000cb3c 0x00614766\n      Hardware Revision: older than r6\n      Hardware supported by installed firmware:\n         HackRF One\n      ```\n\n   - Run `python jamRF_v1.py` in the terminal\n      ```\n      \u003e python jamRF_v1.py\n      1 100\n      JAM!\n\n      The frequency currently jammed is: 2412.0MHz\n      gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.12.0\n      built-in sink types: uhd hackrf bladerf soapy redpitaya file \n      Using HackRF One with firmware v2.0.1\n      Detected Windows OS\n      100\n      pagesize :debug: Setting pagesize to 4096 B\n      top_block_impl :debug: Using default scheduler \"TPB\"\n      UUUUUUUU\n      ```\n\n## Radioconda Setup\n1. Install Prerequisites:\n   - Install [Git](https://git-scm.com/downloads) and [Miniconda](https://www.anaconda.com/download/success) (or Anaconda).\n   - Install [Radioconda](https://github.com/ryanvolz/radioconda?tab=readme-ov-file#download). No special installation steps are needed beyond the defaults.\n\n2. Connect and Verify HackRF One\n   - Plug in your HackRF One with a micro USB cable.\n   - Open the Device Manager to check if your PC recognizes the device.\n   - If HackRF One is not recognized, run [Zadig](https://zadig.akeo.ie/), select List All Devices, choose HackRF One, and click Downgrade WCID Driver.\n\n3. Clone the Repository\n   Open a Command Prompt and run:\n   ```\n   git clone https://github.com/whiteSHADOW1234/HackRF-One-for-Windows.git\n   ```\n   This will download the project files, including `jamRF_v1.py` and `config_v1.yaml`.\n\n4. Verify and Run\n   - In the Radioconda prompt, run the following to verify that your HackRF One is correctly recognized:\n      ```\n      \u003e hackrf_info\n      hackrf_info version: 2024.02.1\n      libhackrf version: 2024.02.1 (0.9)\n      Found HackRF\n      Index: 0\n      Serial number: 0000000000000000a18c63dc2b3c6813\n      Board ID Number: 2 (HackRF One)\n      Firmware Version: v2.0.1 (API:1.08)\n      Part ID Number: 0xa000cb3c 0x00614766\n      Hardware Revision: older than r6\n      Hardware supported by installed firmware:\n         HackRF One\n      ```\n\n   - Then, run the script:\n      ```\n      \u003e cd HackRF-One-for-Windows\n      \u003e python jamRF_v1.py\n      1 100\n      JAM!\n\n      The frequency currently jammed is: 2412.0MHz\n      gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.12.0\n      built-in sink types: uhd hackrf bladerf soapy redpitaya file \n      Using HackRF One with firmware v2.0.1\n      Detected Windows OS\n      100\n      pagesize :debug: Setting pagesize to 4096 B\n      top_block_impl :debug: Using default scheduler \"TPB\"\n      UUUUUUUU\n      ```\n\n## WSL Setup\n1. Install Prerequisites:\n   - Install [Git](https://git-scm.com/downloads) and [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) with a Linux distrobution (take Ubuntu for example).\n   - Install usbipd-win (.msi) from its [GitHub releases](https://github.com/dorssel/usbipd-win/releases).\n2. Connect and Verify HackRF One\n   - Plug in your HackRF One with a micro USB cable.\n   - Open the Device Manager to check if your PC recognizes the device.\n   - If not, run [Zadig](https://zadig.akeo.ie/), select List All Devices, choose HackRF One, and click Downgrade WCID Driver.\n\n3. Clone the Repository\n   Open a Command Prompt and run:\n   ```\n   git clone https://github.com/whiteSHADOW1234/HackRF-One-for-Windows.git\n   ```\n   This will download the files `jamRF_v1.py` and `config_v1.yaml`.\n4. Install Linux Dependencies in WSL:\n   - Open PowerShell and list your WSL distributions\n      ```\n      wsl --list --verbose\n      ```\n   - Launch your chosen Linux distribution:\n      ```\n      wsl -d \u003cYOUR_LINUX_DISTRIBUTION\u003e\n      ```\n   - Install the necessary packages\n      ```\n      sudo apt update\n      sudo apt install gnuradio gr-osmosdr hackrf -y\n      ```\n   - Verify HackRF detection (It might not detect the device like the following output):\n      ```\n      \u003e lsusb\n      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub\n      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub\n      ```\n5. Bind the HackRF USB Port to WSL:\n   - In a new PowerShell window, list connected USB devices:\n      ```\n      \u003e usbipd list\n      Connected:\n      BUSID  VID:PID    DEVICE                                                        STATE\n      2-1    1d50:6089  HackRF One                                                    Not shared\n      2-3    30c9:000e  HP Wide Vision HD Camera                                      Not shared\n      2-10   8087:0026  Intel(R) Wireless Bluetooth(R)                                Not shared\n\n      Persisted:\n      GUID                                  DEVICE\n    \n      ```\n   - Bind and attach HackRF (replace \u003cBUSID\u003e with your HackRF’s bus ID):\n      ```\n      \u003e usbipd bind --busid 2-1\n      \u003e usbipd list\n      Connected:\n      BUSID  VID:PID    DEVICE                                                        STATE\n      2-1    1d50:6089  HackRF One                                                    Shared\n      2-3    30c9:000e  HP Wide Vision HD Camera                                      Not shared\n      2-10   8087:0026  Intel(R) Wireless Bluetooth(R)                                Not shared\n\n      Persisted:\n      GUID                                  DEVICE\n      \n      \n      \u003e usbipd attach --wsl --busid 2-1\n      \u003e usbipd list\n      Connected:\n      BUSID  VID:PID    DEVICE                                                        STATE\n      2-1    1d50:6089  HackRF One                                                    Attached\n      2-3    30c9:000e  HP Wide Vision HD Camera                                      Not shared\n      2-10   8087:0026  Intel(R) Wireless Bluetooth(R)                                Not shared\n\n      Persisted:\n      GUID                                  DEVICE\n      ```\n   - Confirm the attachment by rechecking in the old window with:\n      ```\n      \u003e lsusb\n      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub\n      Bus 001 Device 002: ID 1d50:6089 OpenMoko, Inc. Great Scott Gadgets HackRF One SDR\n      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub\n      ```\n6. Test and Run\n   - In WSL, run the following command to ensure HackRF is recognized.\n      ```\n      $ hackrf_info\n      hackrf_info version: unknown\n      libhackrf version: unknown (0.6)\n      Found HackRF\n      Index: 0\n      Serial number: 0000000000000000a18c63dc2b3c6813\n      Board ID Number: 2 (HackRF One)\n      Firmware Version: v2.0.1 (API:1.08)\n      Part ID Number: 0xa000cb3c 0x00614766\n      ```\n   - Navigate to the cloned repository and execute the script\n      ```\n      $ python3 jamRF_v1.py\n      1 100\n      JAM!\n\n      The frequency currently jammed is: 2412.0MHz\n      gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.1.1\n      built-in sink types: uhd hackrf bladerf soapy redpitaya freesrp file\n      [INFO] [UHD] linux; GNU C++ version 11.2.0; Boost_107400; UHD_4.1.0.5-3\n      libusb: warning [libusb_exit] device 2.1 still referenced\n      libusb: warning [libusb_exit] device 1.2 still referenced\n      libusb: warning [libusb_exit] device 1.1 still referenced\n      Using HackRF One with firmware v2.0.1\n      Detected Linux OS\n      100\n      UUUUUUUUUU\n      ```\n\n## Troubleshooting\n1. Device Not Found\n   - **Error:**\n      ```\n      Exception has occurred: RuntimeError\n      Failed to use '0' as HackRF device index: not enough devices\n      File \"C:\\Users\\\u003cUSER_NAME\u003e\\Desktop\\HackRF-One-for-Windows\\jamRF_v1.py\", line 130, in jam\n         osmosdr_sink = osmosdr.sink(\"hackrf=0\")\n                        ^^^^^^^^^^^^^^^^^^^^^^^^\n      File \"C:\\Users\\\u003cUSER_NAME\u003e\\Desktop\\HackRF-One-for-Windows\\jamRF_v1.py\", line 271, in \u003cmodule\u003e\n         jam(freq, waveform, power, t_jamming)\n      RuntimeError: Failed to use '0' as HackRF device index: not enough devices\n      ```\n   - **Solution:**\n   \n      Try switching to a different USB port or update the USB driver.\n2. Device Misidentification\n   - **Observation:**\n   \n      When running `usbipd list`, HackRF appears as a `USBIP Shared Device` (and similarly in **Device Manager**) instead of `HackRF One`.\n   - **Solution:**\n   \n      Update the USB driver, unplug and replug the HackRF, or use a different USB port.\n\n3. DLL Errors\n   - **Error:**\n      ```\n      python jamRF_v1.py\n      Traceback (most recent call last):\n      File \"C:\\Users\\\u003cUSER_NAME\u003e\\miniconda3\\envs\\hackrf_env\\Lib\\site-packages\\gnuradio\\blocks\\__init__.py\", line 18, in \u003cmodule\u003e\n         from .blocks_python import *\n      ImportError: DLL load failed while importing blocks_python: 找不到指定的模組。\n\n      During handling of the above exception, another exception occurred:\n\n      Traceback (most recent call last):\n      File \"C:\\Users\\\u003cUSER_NAME\u003e\\Desktop\\WiFi-Jamming\\jamRF_v1.py\", line 19, in \u003cmodule\u003e\n         from gnuradio import blocks\n      File \"C:\\Users\\\u003cUSER_NAME\u003e\\miniconda3\\envs\\hackrf_env\\Lib\\site-packages\\gnuradio\\blocks\\__init__.py\", line 22, in \u003cmodule\u003e\n         from .blocks_python import *\n      ImportError: DLL load failed while importing blocks_python: 找不到指定的模組。\n      ```\n   - **Solution:**\n   \n      Remove any conflicting conda environments or WSL distrobutions to ensure only one is accessing the HackRF device.\n\n4. Access Denied error, even when running as Administrator.\n   - **Error:**\n      ```\n      $ hackrf_info\n      hackrf_info version: unknown\n      libhackrf version: unknown (0.6)\n      Found HackRF\n      Index: 0\n      hackrf_open() failed: Access denied (insufficient permissions) (-1000)\n      ```\n   - **Solution 1:**\n   \n      Remove any conflicting conda environments or WSL distrobutions to ensure only one is accessing the HackRF device.\n   - **Solution 2:**\n   \n      Try running `sudo hackrf_info`.\n5. `avahi_service_browser_new()` Failed\n   - **Error:**\n      ```\n      python3 jamRF_v1.py\n      1 100\n      JAM!\n\n      The frequency currently jammed is: 2412.0MHz\n      gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.1.1\n      built-in sink types: uhd hackrf bladerf soapy redpitaya freesrp file\n      [INFO] [UHD] linux; GNU C++ version 11.2.0; Boost_107400; UHD_4.1.0.5-3\n      [ERROR] avahi_service_browser_new() failed: Bad state\n      libusb: warning [libusb_exit] device 2.1 still referenced\n      libusb: warning [libusb_exit] device 1.2 still referenced\n      libusb: warning [libusb_exit] device 1.1 still referenced\n      Using HackRF One with firmware v2.0.1\n      100\n      vmcircbuf_prefs::get :error: /home/\u003cUSER_NAME\u003e/.gnuradio/prefs/vmcircbuf_default_factory: No such file or directory\n      gr::vmcircbuf :error: vmcircbuf_createfilemapping: createfilemapping is not available\n      ```\n   - **Solution:**\n   \n      Install `avahi-daemon` by executing `sudo apt install avahi-daemon -y` in the WSL distrobution will fix.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhiteshadow1234%2Fhackrf-one-for-windows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhiteshadow1234%2Fhackrf-one-for-windows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhiteshadow1234%2Fhackrf-one-for-windows/lists"}