Compare commits

..

2 commits

Author SHA1 Message Date
Michael Ossmann
0299f70a36 add full path
Some checks failed
Build / host (ubuntu-latest) (push) Failing after 11s
Build / firmware (HACKRF_ONE, ubuntu-latest) (push) Failing after 29s
Build / firmware (JAWBREAKER, ubuntu-latest) (push) Failing after 29s
Check code style / clang-format (push) Failing after 7s
Check code style / clang-format-1 (push) Failing after 5s
Build / firmware (RAD1O, ubuntu-latest) (push) Failing after 32s
Check code style / clang-format-2 (push) Failing after 10s
Check code style / clang-format-3 (push) Failing after 8s
Build / firmware (JAWBREAKER, macos-latest) (push) Has been cancelled
Build / firmware (RAD1O, macos-latest) (push) Has been cancelled
Build / host (macos-latest) (push) Has been cancelled
Build / firmware (HACKRF_ONE, macos-latest) (push) Has been cancelled
2022-09-28 18:36:16 -04:00
Michael Ossmann
cb9b7c0b14 CI: add single-device hackrf_transfer tests 2022-09-28 18:32:08 -04:00
379 changed files with 46351 additions and 186307 deletions

View file

@ -1,5 +1,6 @@
name: Bug Report
description: Submit a bug report
title: "[Bug Report]: "
labels: ["bug report"]
body:
- type: markdown

View file

@ -1,5 +1,6 @@
name: Documentation
description: Make a request regarding HackRF documentation
title: "[Documentation]: "
labels: ["documentation"]
body:
- type: markdown

View file

@ -1,5 +1,6 @@
name: Feature Request
description: File a feature request
title: "[Feature Request]: "
labels: ["enhancement"]
body:
- type: markdown

View file

@ -1,5 +1,6 @@
name: Question
description: Ask a question not covered by current hackrf.rtfd.io documentation
title: "[Question]: "
labels: ["question"]
body:
- type: markdown

View file

@ -1,11 +1,23 @@
name: Technical Support Request
description: File a technical support request
title: "[Tech Support]: "
labels: ["technical support"]
assignees:
- straithe
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this technical support request form! Please note that technical support requests can expect a response time of two weeks.
- type: dropdown
id: troubleshooting-documentation
attributes:
label: Have you read the HackRF [troubleshooting documentation](https://hackrf.readthedocs.io/en/latest/troubleshooting.html)?
options:
- "yes"
- "no"
validations:
required: true
- type: textarea
id: expected-outcome
attributes:

View file

@ -9,286 +9,118 @@ on:
- cron: 1 12 * * 1
env:
# Override OSX architecture detection. Required for CMake versions < 3.19.2.
CMAKE_OSX_ARCHITECTURES: arm64
BUILD_TYPE: Release
jobs:
host:
strategy:
matrix:
os: ['macos', 'ubuntu', 'windows']
cmake: ['3.10.0', '3.21.7', '4.2.6', 'latest']
compiler: ['gcc', 'msvc']
exclude:
# MSVC only runs on Windows.
- os: 'macos'
compiler: 'msvc'
- os: 'ubuntu'
compiler: 'msvc'
# We can't use the oldest CMake versions on Windows.
- os: 'windows'
cmake: '3.10.0'
# The in-between CMake versions aren't so intersting with GCC.
- compiler: 'gcc'
cmake: '3.21.7'
- compiler: 'gcc'
cmake: '4.2.6'
include:
# Shell selection
- os: 'macos'
shell: 'bash'
- os: 'ubuntu'
shell: 'bash'
- os: 'windows'
compiler: 'msvc'
shell: 'pwsh'
- os: 'windows'
compiler: 'gcc'
shell: 'msys2'
# MSVC version selection
- cmake: '3.21.7'
msvc: '17.14'
- cmake: '4.2.6'
msvc: 'latest'
- cmake: 'latest'
msvc: 'latest'
# CMake generator selection
- os: 'macos'
generator: 'Unix Makefiles'
- os: 'ubuntu'
generator: 'Unix Makefiles'
- compiler: 'msvc'
cmake: '3.21.7'
generator: 'Visual Studio 17 2022'
- compiler: 'msvc'
cmake: '4.2.6'
generator: 'Visual Studio 18 2026'
- compiler: 'msvc'
cmake: 'latest'
generator: 'Visual Studio 18 2026'
- os: 'windows'
compiler: 'gcc'
generator: 'MSYS Makefiles'
# Additional CMake arguments
- os: 'windows'
compiler: 'msvc'
cmake_args: >-
-DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
--install-prefix=$env:GITHUB_WORKSPACE/install
- os: 'windows'
compiler: 'gcc'
cmake_args: >-
--install-prefix=/usr/local
# CMake 3.10 uses --build with --target install
- cmake: '3.10.0'
install_cmd: --build
install_args: --target install
# Later versions just use --install
- cmake: '3.21.7'
install_cmd: --install
- cmake: '4.2.6'
install_cmd: --install
- cmake: 'latest'
install_cmd: --install
# We need sudo on MacOS and Ubuntu only
- os: macos
sudo: sudo
- os: ubuntu
sudo: sudo
os: ['macos-latest', 'ubuntu-latest']
# Don't cancel all builds when one fails
fail-fast: false
runs-on: ${{ matrix.os }}-latest
defaults:
run:
shell: '${{ matrix.shell }} {0}'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Setup cmake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmake }}
if: matrix.shell != 'msys2'
- name: Install MSVC (Windows)
uses: k3DW/setup-msvc@v1
with:
vs-version: ${{ matrix.msvc }}
if: matrix.compiler == 'msvc' && matrix.msvc != 'latest'
- uses: actions/checkout@v2
- name: Install dependencies (macOS)
run: brew install fftw
if: matrix.os == 'macos'
if: matrix.os == 'macos-latest'
- name: Install dependencies (Ubuntu)
run: |
sudo apt update
sudo apt install libfftw3-dev libusb-1.0-0-dev
if: matrix.os == 'ubuntu'
if: matrix.os == 'ubuntu-latest'
- name: Install dependencies (Windows)
run: vcpkg install --triplet=x64-windows libusb fftw3 pthreads pkgconf
if: matrix.os == 'windows' && matrix.shell != 'msys2'
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/host/build
- name: Setup MSYS (Windows)
if: matrix.os == 'windows' && matrix.shell == 'msys2'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: >-
git
make
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-toolchain
mingw-w64-ucrt-x86_64-libusb
mingw-w64-ucrt-x86_64-fftw
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/host/build
run: cmake $GITHUB_WORKSPACE/host/ -DCMAKE_BUILD_TYPE=$BUILD_TYPE
# Build libhackrf and hackrf-tools together
- name: Build
working-directory: ${{runner.workspace}}/host/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Configure & Build
run: |
cmake -E make_directory host/build
cd host/build
cmake .. -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=Release ${{matrix.cmake_args}}
cmake --build . --config Release
- name: Create Build Environment (libhackrf)
run: cmake -E make_directory ${{runner.workspace}}/host/libhackrf/build
# Build libhackrf ONLY
- name: Configure CMake (libhackrf)
shell: bash
working-directory: ${{runner.workspace}}/host/libhackrf/build
run: cmake $GITHUB_WORKSPACE/host/libhackrf/ -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Configure & Build (libhackrf)
run: |
cmake -E make_directory host/libhackrf/build
cd host/libhackrf/build
cmake .. -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }}
cmake --build . --config Release
- name: Build (libhackrf)
working-directory: ${{runner.workspace}}/host/libhackrf/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Install (libhackrf)
working-directory: ${{runner.workspace}}/host/libhackrf/build
shell: bash
run: |
${{ matrix.sudo }} cmake ${{ matrix.install_cmd }} host/libhackrf/build ${{ matrix.install_args }} --config Release
sudo cmake --install . --config $BUILD_TYPE
# Build hackrf-tools ONLY
- name: Create Build Environment (hackrf-tools)
run: cmake -E make_directory ${{runner.workspace}}/host/hackrf-tools/build
- name: Configure & Build (hackrf-tools)
run: |
cmake -E make_directory host/hackrf-tools/build
cd host/hackrf-tools/build
cmake .. -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }}
cmake --build . --config Release
- name: Configure CMake (hackrf-tools)
shell: bash
working-directory: ${{runner.workspace}}/host/hackrf-tools/build
run: cmake $GITHUB_WORKSPACE/host/hackrf-tools/ -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Install (hackrf-tools)
run: |
${{ matrix.sudo }} cmake ${{ matrix.install_cmd }} host/hackrf-tools/build ${{ matrix.install_args }}
# Publish the contents of install/bin (which should be the combination libhackrf and host-tools) for Windows
- name: Publish Artifacts (Windows)
uses: actions/upload-artifact@v4
with:
name: hackrf-tools-windows
path: ${{github.workspace}}/install/bin
if: matrix.os == 'windows' && matrix.cmake == 'latest' && matrix.shell == 'pwsh'
- name: Build (hackrf-tools)
working-directory: ${{runner.workspace}}/host/hackrf-tools/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
firmware:
strategy:
matrix:
os: ['macos', 'ubuntu', 'windows']
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O', 'PRALINE', 'UNIVERSAL']
cmake: ['3.12.0', 'latest']
exclude:
- os: 'windows'
cmake: '3.12.0'
# GitHub doesn't give us many macOS runners, so don't build for every board.
# We just need to know that building firmware works on macOS. Use PRALINE
# since that's the most complicated one due to FPGA bitstreams.
- os: 'macos'
board: 'HACKRF_ONE'
- os: 'macos'
board: 'JAWBREAKER'
- os: 'macos'
board: 'RAD1O'
os: ['macos-latest', 'ubuntu-latest']
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O']
# Don't cancel all builds when one fails
fail-fast: false
runs-on: ${{ matrix.os }}-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup cmake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmake }}
if: matrix.os != 'windows'
- name: Install Arm GNU Toolchain
uses: carlosperate/arm-none-eabi-gcc-action@v1
if: matrix.os != 'windows'
- name: Install dependencies (macOS)
run: |
brew install dfu-util
python3 -m venv environment && source environment/bin/activate
python3 -m pip install PyYAML
if: matrix.os == 'macos'
brew tap armmbed/formulae
brew install arm-none-eabi-gcc dfu-util
pip3 install PyYAML
if: matrix.os == 'macos-latest'
- name: Install dependencies (Ubuntu)
run: |
python3 -m venv environment && source environment/bin/activate
python3 -m pip install PyYAML
sudo apt install dfu-util
if: matrix.os == 'ubuntu'
sudo apt install dfu-util gcc-arm-none-eabi
if: matrix.os == 'ubuntu-latest'
- name: Build libopencm3
shell: bash
working-directory: ${{github.workspace}}/firmware/libopencm3/
run: |
source ../../environment/bin/activate
make
if: matrix.os != 'windows'
run: make
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/firmware/build
if: matrix.os != 'windows'
run: cmake -E make_directory ${{runner.workspace}}/firmware/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/firmware/build
run: cmake $GITHUB_WORKSPACE/firmware/ -DCMAKE_BUILD_TYPE=Release -DBOARD=${{ matrix.board }}
if: matrix.os != 'windows'
working-directory: ${{runner.workspace}}/firmware/build
run: cmake $GITHUB_WORKSPACE/firmware/ -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBOARD=${{ matrix.board }}
- name: Build
working-directory: ${{github.workspace}}/firmware/build
working-directory: ${{runner.workspace}}/firmware/build
shell: bash
run: |
source ../../environment/bin/activate
cmake --build . --config Release
if: matrix.os != 'windows'
run: cmake --build . --config $BUILD_TYPE
- name: Setup MSYS (Windows)
if: matrix.os == 'windows'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
git
make
mingw-w64-ucrt-x86_64-arm-none-eabi-gcc
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-dfu-util
mingw-w64-ucrt-x86_64-python-yaml
- name: Build with MSYS (Windows)
if: matrix.os == 'windows'
shell: msys2 {0}
run: |
mkdir firmware/build
cd firmware/build
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DBOARD=${{ matrix.board }} ..
make

View file

@ -16,7 +16,7 @@ jobs:
- check: 'firmware/hackrf_usb'
exclude: ''
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v2
- name: Run clang-format-action
uses: jidicula/clang-format-action@v4.6.2
with:

View file

@ -1,96 +0,0 @@
name: Check includes
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
includes-check:
runs-on: ubuntu-latest
container:
image: "debian:13"
options: --user 0
strategy:
matrix:
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O', 'PRALINE', 'UNIVERSAL']
cmake: ['3.12.0', 'latest']
# Don't cancel all builds when one fails
fail-fast: false
steps:
- name: Make it work on debian
run: |
apt update
apt install -y git python3 python3-pip python3-venv nodejs unzip
# actions/checkout insists on putting the checkout in the
# working directory rather than ${{ github.workspace }}.
#
# This may just be because the 'runner' user does not exist
# in the docker image at startup.
#
# also see: https://github.com/actions/runner/issues/878
useradd -ms /bin/bash runner
ln -s /__w /home/runner/work
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: true
- name: Setup cmake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmake }}
- name: Install Arm GNU Toolchain
uses: carlosperate/arm-none-eabi-gcc-action@v1
- name: Install dependencies
run: |
python3 -m venv environment && source environment/bin/activate
python3 -m pip install PyYAML
apt install -y iwyu
iwyu --version
- name: Build libopencm3
working-directory: ${{github.workspace}}/firmware/libopencm3/
run: |
source ../../environment/bin/activate
make
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/firmware/build
- name: Configure CMake
working-directory: ${{github.workspace}}/firmware/build
run: cmake ${{github.workspace}}/firmware/ -DCMAKE_BUILD_TYPE=Release -DBOARD=${{ matrix.board }} -DCHECK_INCLUDES=1
- name: Build
working-directory: ${{github.workspace}}/firmware/build
run: |
source ../../environment/bin/activate
output="$(cmake --build . --config Release 2>&1)"
while IFS= read -r line
do
if [[ "${line}" == "Warning: include-what-you-use"* ]]; then
exit_code=1
dump=1
echo
elif [[ "${line}" == "---" ]]; then
dump=0
echo
fi
if [[ ${dump} == "1" ]]; then
echo "${line}"
fi
done <<< ${output}
if [[ ${exit_code} == "1" ]]; then
echo "Includes check failed for board target: ${{ matrix.board }}"
else
echo "Includes check succeeded for board target: ${{ matrix.board }}"
fi
echo $(include-what-you-use --version)
exit ${exit_code}

1
.gitignore vendored
View file

@ -6,7 +6,6 @@
*.srec
host/build/
host/**/build
install/
# Operating system spew
.DS_Store

View file

@ -1,24 +0,0 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the OS, Python version and other tools
build:
os: ubuntu-22.04
tools:
python: "3.12"
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Build PDF for docs
formats:
- pdf
python:
install:
- requirements: docs/requirements.txt

View file

@ -1,18 +1,12 @@
# Environment for HackRF HIL testing with Jenkins CI
FROM ubuntu:22.04
USER root
# Sandbox test environment for HackRF
FROM ubuntu:20.04
CMD ["/bin/bash"]
# Copy usb hub script from Jenkins' container
COPY --from=gsg-jenkins /startup/hubs.py /startup/hubs.py
COPY --from=gsg-jenkins /startup/.hubs /startup/.hubs
RUN ln -s /startup/hubs.py /usr/local/bin/hubs
# Override interactive installations and install software dependencies
ENV DEBIAN_FRONTEND=noninteractive
# Override interactive installations and install prerequisites
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
curl \
dfu-util \
gcc-arm-none-eabi \
git \
@ -21,19 +15,9 @@ RUN apt-get update && apt-get install -y \
pkg-config \
python3 \
python3-pip \
python3-yaml \
usbutils \
python-is-python3 \
&& rm -rf /var/lib/apt/lists/*
# Install USB hub PPPS dependencies
RUN pip3 install numpy python-dotenv git+https://github.com/CapableRobot/CapableRobot_USBHub_Driver --upgrade
RUN curl -L https://github.com/mvp/uhubctl/archive/refs/tags/v2.5.0.tar.gz > uhubctl-2.5.0.tar.gz \
&& mkdir uhubctl-2.5.0 \
&& tar -xvzf uhubctl-2.5.0.tar.gz -C uhubctl-2.5.0 --strip-components 1 \
&& rm uhubctl-2.5.0.tar.gz \
&& cd uhubctl-2.5.0 \
&& make \
&& make install
RUN pip3 install git+https://github.com/CapableRobot/CapableRobot_USBHub_Driver --upgrade
# Inform Docker that the container is listening on port 8080 at runtime
EXPOSE 8080

173
Jenkinsfile vendored
View file

@ -1,130 +1,38 @@
import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException
def docker_args = '''--group-add=20 --group-add=46 --device-cgroup-rule="c 189:* rmw" \
--device-cgroup-rule="c 166:* rmw" -v /dev/bus/usb:/dev/bus/usb \
-v /tmp/req_pipe:/tmp/req_pipe -v /tmp/res_pipe:/tmp/res_pipe'''
def h1_test = '''python3 ci-scripts/hackrf_test.py --ci --log log \
--hostdir host/build/hackrf-tools/src/ \
--fwupdate firmware/hackrf_usb/build/ \
--tester 0000000000000000325866e629a25623 \
--eut RunningFromRAM --unattended --rev r4'''
def hpro_test = '''python3 ci-scripts/hackrf_pro_test.py --ci --log log \
--hostdir host/build/hackrf-tools/src \
--fwupdate firmware/hackrf_usb/build \
--tester 0000000000000000a06063c82338145f \
--eut RunningFromRAM -p --rev r1.2'''
pipeline {
agent any
agent {
dockerfile {
args '--group-add=46 --device-cgroup-rule="c 189:* rmw" -v /dev/bus/usb:/dev/bus/usb'
}
}
stages {
stage('Build Docker Image') {
options {
timeout(time: 20, unit: 'MINUTES')
}
stage('Build (Host)') {
steps {
sh 'docker build -t hackrf https://github.com/greatscottgadgets/hackrf.git'
sh './ci-scripts/install-host.sh'
}
}
stage('Test HackRF One with BOARD=HACKRF_ONE') {
agent {
docker {
image 'hackrf'
reuseNode true
args docker_args
}
}
options {
timeout(time: 20, unit: 'MINUTES')
}
stage('Build (Firmware)') {
steps {
runCommand("Install Host Tools", './ci-scripts/install_host.sh', 3, 1, 'MINUTES')
runCommand("Build HackRF One Firmware", './ci-scripts/build_firmware.sh HACKRF_ONE', 3, 1, 'MINUTES')
lock('HIL_hubs') {
script {
allOff()
runTest("Check Host", 'h1_eut', './ci-scripts/test_host.sh')
runTest("HackRF One HIL Test", 'h1_tester h1_eut', h1_test)
runTest("SGPIO Debug Test", 'h1_eut', 'python3 ci-scripts/test_sgpio_debug.py')
}
}
sh './ci-scripts/install-firmware.sh'
}
}
stage('Test HackRF One with BOARD=UNIVERSAL') {
agent {
docker {
image 'hackrf'
reuseNode true
args docker_args
}
}
options {
timeout(time: 20, unit: 'MINUTES')
}
stage('Test') {
steps {
runCommand("Install Host Tools", './ci-scripts/install_host.sh', 3, 1, 'MINUTES')
runCommand("Build Universal Firmware", './ci-scripts/build_firmware.sh UNIVERSAL', 3, 1, 'MINUTES')
lock('HIL_hubs') {
script {
allOff()
runTest("Check Host", 'h1_eut', './ci-scripts/test_host.sh')
runTest("HackRF One HIL Test", 'h1_tester h1_eut', h1_test)
runTest("SGPIO Debug Test", 'h1_eut', 'python3 ci-scripts/test_sgpio_debug.py')
}
sh './ci-scripts/configure-hubs.sh --off'
retry(3) {
sh './ci-scripts/test-host.sh'
}
}
}
stage('Test HackRF Pro with BOARD=PRALINE') {
agent {
docker {
image 'hackrf'
reuseNode true
args "$docker_args"
}
}
options {
timeout(time: 20, unit: 'MINUTES')
}
steps {
runCommand("Install Host Tools", './ci-scripts/install_host.sh', 3, 1, 'MINUTES')
runCommand("Build Praline Firmware", './ci-scripts/build_firmware.sh PRALINE', 3, 1, 'MINUTES')
lock('HIL_hubs') {
script {
allOff()
runTest("Check Host", 'hpro_eut', './ci-scripts/test_host.sh')
runTest("HackRF Pro HIL Test", 'hpro_tester hpro_eut', hpro_test)
}
}
}
}
stage('Test HackRF Pro with BOARD=UNIVERSAL') {
agent {
docker {
image 'hackrf'
reuseNode true
args "$docker_args"
}
}
options {
timeout(time: 20, unit: 'MINUTES')
}
steps {
runCommand("Install Host Tools", './ci-scripts/install_host.sh', 3, 1, 'MINUTES')
runCommand("Build Universal Firmware", './ci-scripts/build_firmware.sh UNIVERSAL', 3, 1, 'MINUTES')
lock('HIL_hubs') {
script {
allOff()
runTest("Check Host", 'hpro_eut', './ci-scripts/test_host.sh')
runTest("HackRF Pro HIL Test", 'hpro_tester hpro_eut', hpro_test)
}
retry(3) {
sh './ci-scripts/test-firmware-program.sh'
}
sh './ci-scripts/test-firmware-flash.sh'
sh './ci-scripts/test-transfer-single.sh'
}
}
}
post {
always {
sh './ci-scripts/configure-hubs.sh --reset'
sh 'rm -rf testing-venv/'
cleanWs(cleanWhenNotBuilt: false,
deleteDirs: true,
disableDeferredWipeout: true,
@ -132,46 +40,3 @@ pipeline {
}
}
}
def allOff() {
// Allow up to 3 retries, 20 seconds each, for the USB hub port power server to respond appropriately
runCommand('USB hub port power server command', "hubs all off", 3, 20, 'SECONDS')
}
def reset(devices) {
// Allow up to 3 retries, 20 seconds each, for the USB hub port power server to respond appropriately
runCommand('USB hub port power server command', "hubs ${devices} reset", 3, 20, 'SECONDS')
}
def runCommand(title, cmd, retries, time, unit) {
retry(retries) {
try {
timeout(time: time, unit: unit) {
sh "${cmd}"
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "${title} timeout reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
}
def runTest(title, devices, cmd) {
retry(3) {
// reset() retains it's own internal retries
reset(devices)
sh 'sleep 1s'
// run the test with 0 internal retries and 3 external retries to ensure resets between runs
runCommand(title, cmd, 0, 5, 'MINUTES')
}
}

View file

@ -15,7 +15,7 @@ Information on HackRF and purchasing HackRF: https://greatscottgadgets.com/hackr
# Documentation
Documentation for HackRF can be viewed on [Read the Docs](https://hackrf.readthedocs.io/en/latest/). The raw documentation files for HackRF are in the [docs folder](https://github.com/mossmann/hackrf/tree/master/docs) in this repository and can be built locally by installing [Sphinx Docs](https://www.sphinx-doc.org/en/master/usage/installation.html) and running `make html`. Documentation changes can be submitted through pull request and suggestions can be made as GitHub issues.
Documentation for HackRF can be viewed on [Read the Docs](https://hackrf.readthedocs.io/en/latest/). The raw documenation files for HackRF are in the [docs folder](https://github.com/mossmann/hackrf/tree/master/docs) in this repository and can be built locally by installing [Sphinx Docs](https://www.sphinx-doc.org/en/master/usage/installation.html) and running `make html`. Documentation changes can be submitted through pull request and suggestions can be made as GitHub issues.
To create a PDF of the HackRF documentation from the HackRF repository while on Ubuntu:
* run `sudo apt install latexmk texlive-latex-extra`
@ -27,7 +27,7 @@ To create a PDF of the HackRF documentation from the HackRF repository while on
# Getting Help
Before asking for help with HackRF, check to see if your question is listed on the [troubleshooting page](https://hackrf.readthedocs.io/en/latest/troubleshooting.html).
Before asking for help with HackRF, check to see if your question is listed in the [FAQ](https://hackrf.readthedocs.io/en/latest/faq.html).
For assistance with HackRF general use or development, please look at the [issues on the GitHub project](https://github.com/greatscottgadgets/hackrf/issues). This is the preferred place to ask questions so that others may locate the answer to your question in the future.

52
appveyor.yml Normal file
View file

@ -0,0 +1,52 @@
os: Visual Studio 2017
clone_depth: 1
configuration:
- Release
init:
- C:\"Program Files (x86)"\"Microsoft Visual Studio 14.0"\VC\vcvarsall.bat %PLATFORM%
install:
# Dependencies for libHackRF
- appveyor DownloadFile "https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.7z" -FileName "C:\libusb.7z"
- 7z x -y "C:\libusb.7z" -o"C:\libusb"
- appveyor DownloadFile "http://mirrors.kernel.org/sourceware/pthreads-win32/pthreads-w32-2-9-1-release.zip" -FileName "C:\pthreads-w32-release.zip"
- 7z x -y "C:\pthreads-w32-release.zip" -o"C:\pthreads"
- appveyor DownloadFile "http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip" -FileName "C:\pkg-config_win32.zip"
- 7z x -y "C:\pkg-config_win32.zip" -o"C:\pkg-config"
# FFTW for hackrf_sweep
- curl -fsS -o "C:\fftw-3.3.5.zip" "ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip"
- 7z x -y "C:\fftw-3.3.5.zip" -o"C:\fftw"
- cd c:\fftw
- ps: lib /machine:x64 /def:libfftw3f-3.def
# ARM GCC for firmware builds
# - appveyor DownloadFile "https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-win32.zip" -FileName "C:\gcc-arm-none-eabi-win32.zip"
# - 7z x -y "C:\gcc-arm-none-eabi-win32.zip" -o"C:\gcc-arm-none-eabi"
# - set PATH=%PATH%;c:\gcc-arm-none-eabi\bin
build_script:
# Host library and tools
- mkdir c:\projects\hackrf\host\build
- cd c:\projects\hackrf\host\build
- cmake -G "Visual Studio 14 2015 Win64" \
-DLIBUSB_LIBRARIES="C:\libusb\MS64\dll\libusb-1.0.lib" \
-DLIBUSB_INCLUDE_DIR="C:\libusb\include\libusb-1.0" \
-DTHREADS_PTHREADS_INCLUDE_DIR=c:\pthreads\Pre-built.2\include \
-DTHREADS_PTHREADS_WIN32_LIBRARY=c:\pthreads\Pre-built.2\lib\x64\pthreadVC2.lib \
-DPKG_CONFIG_EXECUTABLE="C:\pkg-config\bin\pkg-config.exe" \
-DFFTW_INCLUDES=C:\fftw \
-DFFTW_LIBRARIES=C:\fftw\libfftw3f-3.lib \
..
- msbuild HackRF.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# Firmware
# - cd c:\projects\hackrf\
# - git submodule init
# - git submodule update
# - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER && firmware/appveyor.sh"'
after_build:
- 7z a %APPVEYOR_BUILD_FOLDER%\HackRF-Windows-%APPVEYOR_REPO_COMMIT%.zip %APPVEYOR_BUILD_FOLDER%\host\build\libhackrf\src\Release\* %APPVEYOR_BUILD_FOLDER%\host\build\hackrf-tools\src\Release\*
artifacts:
- path: HackRF-Windows-%APPVEYOR_REPO_COMMIT%.zip
name: HackRF-Windows-%APPVEYOR_REPO_COMMIT%

View file

@ -1,9 +0,0 @@
#!/bin/bash
set -e
git submodule init
git submodule update
cd firmware/hackrf_usb
rm -rf build
cmake -DBOARD=$1 -B build
cmake --build build
cd ../..

3
ci-scripts/configure-hubs.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
usbhub --disable-i2c --hub D9D1 power state --port 1,2,3,4 $1
usbhub --disable-i2c --hub 624C power state --port 1,2,3,4 $1

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

8
ci-scripts/install-firmware.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
git submodule init
git submodule update
mkdir firmware/hackrf_usb/build
cd firmware/hackrf_usb/build
cmake ..
make
cd ../../..

6
ci-scripts/install-host.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
mkdir host/build
cd host/build
cmake ..
make
cd ../..

View file

@ -1,6 +0,0 @@
#!/bin/bash
set -e
cd host
cmake -B build
cmake --build build
cd ..

View file

@ -1,37 +0,0 @@
#!/usr/bin/python3
import sys
import subprocess
PASS, FAIL = range(2)
EUT = "RunningFromRAM"
def check_debug(target, register, reg_val):
hackrf_debug = subprocess.run(["host/build/hackrf-tools/src/hackrf_debug",
f"--{target}", "--register", register,
"--read", "--device", EUT],
capture_output=True, encoding="UTF-8")
if reg_val in hackrf_debug.stdout:
print(f"hackrf_debug --{target} passed.")
return PASS
else:
print(f"hackrf_debug --{target} failed.")
return FAIL
def main():
results = [
check_debug("si5351c", "2", "0x03"),
check_debug("max2837", "3", "0x1b9"),
check_debug("rffc5072", "2", "0x9055"),
]
if FAIL not in results:
sys.exit(PASS)
else:
sys.exit(FAIL)
if __name__ == "__main__":
main()

View file

@ -3,7 +3,7 @@ host/build/hackrf-tools/src/hackrf_spiflash -w firmware/hackrf_usb/build/hackrf_
EXIT_CODE="$?"
if [ "$EXIT_CODE" == "1" ]
then
echo "No HackRF found! Disconnected? Exiting.."
echo "No GreatFET found! Disconnected? Exiting.."
exit $EXIT_CODE
elif [ "$EXIT_CODE" == "0" ]
then
@ -13,6 +13,6 @@ then
echo "Host tool installation failed! Exiting.."
exit $EXIT_CODE
else
echo "Unknown error"
echo "god have mercy on your soul"
exit $EXIT_CODE
fi
fi

View file

@ -1,6 +1,7 @@
#!/bin/bash
dfu-util --device 1fc9:000c --alt 0 --download firmware/hackrf_usb/build/hackrf_usb.dfu
usbhub --disable-i2c --hub D9D1 power state --port 2 --reset
sleep 1s
dfu-util --path 1-2.2 --alt 0 --download firmware/hackrf_usb/build/hackrf_usb.dfu
EXIT_CODE="$?"
if [ "$EXIT_CODE" == "0" ]
then
@ -15,6 +16,6 @@ then
echo "dfu-util installation failed! Exiting.."
exit $EXIT_CODE
else
echo "Unhandled exception"
echo "god have mercy on your soul"
exit $EXIT_CODE
fi
fi

View file

@ -1,4 +1,6 @@
#!/bin/bash
#!/bin/bash
usbhub --disable-i2c --hub D9D1 power state --port 2 --reset
sleep 1s
host/build/hackrf-tools/src/hackrf_info
EXIT_CODE="$?"
if [ "$EXIT_CODE" == "1" ]
@ -16,4 +18,4 @@ then
else
echo "god have mercy on your soul"
exit $EXIT_CODE
fi
fi

View file

@ -0,0 +1,55 @@
#!/bin/bash
echo "Single-device hackrf_transfer tests:"
echo "Testing single sample transmit: -c0"
COMMAND=host/build/hackrf-tools/src/hackrf_transfer
timeout -s2 -k1 2 ${COMMAND} -a0 -x0 -c0 -n1 >/tmp/stdout.$$ 2>/tmp/stderr.$$
EXIT_CODE="$?"
if [ "$EXIT_CODE" == "124" ]
then
cat /tmp/stderr.$$
echo "Command timed out (SIGINT after 2 seconds)."
exit $EXIT_CODE
elif [ "$EXIT_CODE" == "137" ]
then
cat /tmp/stderr.$$
echo "Command timed out (SIGKILL after 3 seconds)."
exit $EXIT_CODE
elif [ "$EXIT_CODE" != "0" ]
then
cat /tmp/stderr.$$
echo "unexpected exit code"
exit $EXIT_CODE
else
echo "hackrf_transfer command completed."
fi
grep -q "Couldn't transfer any bytes for one second." /tmp/stderr.$$
if [ "$?" == "0" ]
then
cat /tmp/stderr.$$
exit 1
fi
grep -q "average power -inf dBfs" /tmp/stderr.$$
if [ "$?" != "0" ]
then
cat /tmp/stderr.$$
"unexpected power level"
exit 2
fi
grep -q "^ 0.0 MiB" /tmp/stderr.$$
if [ "$?" != "0" ]
then
cat /tmp/stderr.$$
"unexpected total data transferred"
exit 3
fi
if [ -s "/tmp/stdout.$$" ]
then
cat /tmp/stderr.$$
"unexpected stdout:"
cat /tmp/stdout.$$
exit 4
fi

View file

@ -1,127 +0,0 @@
#!/usr/bin/python3
import subprocess
import time
import sys
from os import environ
EUT = environ.get('EUT')
TESTER = environ.get('TESTER')
PASS, FAIL = range(2)
def write_bytes():
tx_bytes = b'\x7f\x00\x59\x59\x00\x7f\xa7\x59\x81\x00\xa7\xa7\x00\x81\x59\xa7'
with open("/tmp/binary100", "wb") as bin_file:
for i in range(62500): # 1MB file size
bin_file.write(tx_bytes)
def capture_signal(sweep_range, tx_gain, rx_lna_gain, rx_vga_gain, freq=None,
if_freq=None, lo_freq=None, image_reject=0):
test_type = sys.argv[1]
if test_type == "tx":
transmitter = EUT
receiver = TESTER
elif test_type == "rx":
transmitter = TESTER
receiver = EUT
else:
print(f"Invalid command-line argument: {test_type}. Use tx or rx")
sys.exit(1)
if if_freq == None:
transmit = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_transfer",
"-d", transmitter, "-R", "-t", "/tmp/binary100",
"-a", "0", "-x", tx_gain, "-f", freq],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
transmit = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_transfer",
"-d", transmitter, "-R", "-t", "/tmp/binary100",
"-a", "0", "-x", tx_gain, "-i", if_freq,
"-o", lo_freq, "-m", image_reject],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
time.sleep(1)
sweep = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_sweep",
"-d", receiver, "-N", "2", "-w", "333333",
"-f", sweep_range, "-a", "0", "-l", rx_lna_gain,
"-g", rx_vga_gain],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sweep.wait()
transmit.terminate()
transmit.wait()
# parse the hackrf_sweep output
data, stderr = sweep.communicate()
data = data.decode("utf-8")
data = data.split("\n")
print(data[4])
data = data[4] # Note: using data from the 2nd sweep until issue #1230 is resolved.
data = data.split(", ")
data = data[6:21]
bins = [float(bin) for bin in data]
return bins
def check_signal(freq, bins):
signal = bins.pop(1)
signal_threshold = -25
max_power = -10
result = PASS
if signal < signal_threshold:
print(f"Signal not strong enough at {freq} MHz")
result = FAIL
elif signal > max_power:
print(f"Received signal exceeded maximum power at {freq} MHz")
result = 1
for bin in bins:
if bin > max_power or bin > signal:
print(f"Non-target bin power exceeded max power threshold at {freq} MHz")
result = FAIL
break
return result
def main():
write_bytes()
tester_hub_on = subprocess.Popen(["hubs", "hackrf", "reset"])
tester_hub_on.wait()
time.sleep(1)
eut_clkout_on = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_clock",
"-o", "1", "-d", EUT])
tester_clkout_off = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_clock",
"-o", "0", "-d", TESTER])
eut_clkout_on.wait()
tester_clkout_off.wait()
_9_5Mhz_data = capture_signal(sweep_range="9:29", tx_gain="38", rx_lna_gain="16",
rx_vga_gain="16", if_freq="2628250000",
lo_freq="2620000000", image_reject="1")
_915_5Mhz_data = capture_signal(sweep_range="915:935", tx_gain="38", rx_lna_gain="16",
rx_vga_gain="16", if_freq="2540750000",
lo_freq="3455000000", image_reject="1")
_2665_5Mhz_data = capture_signal(sweep_range="2665:2685", tx_gain="26", rx_lna_gain="16",
rx_vga_gain="16", freq="2664250000")
_5999_5Mhz_data = capture_signal(sweep_range="5999:6019", tx_gain="37", rx_lna_gain="32",
rx_vga_gain="40", if_freq="2540750000",
lo_freq="3460000000", image_reject="2")
lp1_result = check_signal(9.5, _9_5Mhz_data)
lp2_result = check_signal(915.5, _915_5Mhz_data)
bp_result = check_signal(2665.5, _2665_5Mhz_data)
hp_result = check_signal(5999.5, _5999_5Mhz_data)
results = [lp1_result, lp2_result, bp_result, hp_result]
if FAIL in results:
sys.exit(FAIL)
else:
sys.exit(PASS)
if __name__ == "__main__":
main()

View file

@ -1,87 +0,0 @@
#!/usr/bin/python3
import os
import sys
import subprocess
from pathlib import Path
FILENAME = f"/tmp/rx_100kB_{str(os.getpid())}"
def program_device():
# build new firmware with SGPIO_DEBUG mode enabled
print("Programming device...")
fw_dir = os.getcwd() + "/firmware/hackrf_usb/build"
del_dir = subprocess.run(["rm", "-rf", "firmware/hackrf_usb/build"])
mk_dir = subprocess.run(["mkdir", "firmware/hackrf_usb/build"])
cmake = subprocess.run(["cmake", "-D", "SGPIO_DEBUG=1", ".."],
cwd=fw_dir, stdout=subprocess.DEVNULL)
make = subprocess.run(["make"],
cwd=fw_dir, stdout=subprocess.DEVNULL)
program = subprocess.run(["./ci-scripts/test-firmware-program.sh"],
stdout=subprocess.DEVNULL)
def capture():
shortfall_count = -1
capture_tries = 0
while shortfall_count != 0:
print("Capturing data...")
rx_100kB = subprocess.run(["host/build/hackrf-tools/src/hackrf_transfer",
"-r", FILENAME, "-d", "RunningFromRAM",
"-n", "50000", "-s", "20000000"],
capture_output=True, encoding="UTF-8")
print(rx_100kB.stdout)
print(rx_100kB.stderr)
print(f"Wrote capture data to file: {FILENAME}")
debug_state_proc = subprocess.run(["host/build/hackrf-tools/src/hackrf_debug", "--state"],
capture_output=True, encoding="UTF-8")
print(debug_state_proc.stdout)
print(debug_state_proc.stderr)
capture_tries += 1
debug_state = debug_state_proc.stdout.split("\n")
shortfalls_line = [s for s in debug_state if s.startswith("Number of shortfalls")]
shortfall_count = [int(c) for c in shortfalls_line[0].split() if c.isdigit()][0]
if capture_tries == 10:
print("Unable to transmit data with 0 shortfalls. " \
"This is not indicative of a device failure. " \
"Likely an issue with the testing infrastructure.")
sys.exit(1)
def check_bytes():
print(f"Checking length of {FILENAME}")
rx_data = Path(FILENAME).read_bytes()
if len(rx_data) != 100000: # file should be 100k bytes when using 50k samples
print(f"ERROR: Only {str(len(rx_data))} bytes found in file, expected 100k.")
sys.exit(1)
else:
print("Correct file size found.")
# check that each byte = prev_byte + 1 except at wraparound bounds
print("Checking bytes...")
for i in range(1, len(rx_data)):
if rx_data[i-1] != rx_data[i] - 1:
if not (rx_data[i] == 0 and rx_data[i-1] == 255):
print(f"ERROR: Incorrect data value found at location {str(i)} in {FILENAME}:")
# print up to 5 values starting from at most 1 value before error occurence
j = -1
while j < 4:
if i + j < len(rx_data) and i + j > -1:
print(f"{str(i+j)} : {str(rx_data[i+j])}")
j = j + 1
sys.exit(1)
print("Successfully validated all bytes in file.\nSGPIO debug test passed.")
def main():
program_device()
capture()
check_bytes()
if __name__ == "__main__":
main()

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

After

Width:  |  Height:  |  Size: 238 KiB

Before After
Before After

View file

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1280"
height="720"
viewBox="0 0 338.66666 190.50001"
version="1.1"
id="svg8"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="block-diagram.svg"
inkscape:export-filename="block-diagram.png"
inkscape:export-filename="C:\Users\Martin\Documents\hackrf\docs\images\block-diagram.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
inkscape:export-ydpi="96">
<defs
id="defs2">
<marker
@ -163,9 +163,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.70710678"
inkscape:cx="603.16209"
inkscape:cy="390.32295"
inkscape:zoom="1"
inkscape:cx="633.92814"
inkscape:cy="396.56459"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
@ -173,18 +173,17 @@
units="px"
inkscape:snap-text-baseline="true"
showguides="true"
inkscape:window-width="1916"
inkscape:window-height="1005"
inkscape:window-x="1600"
inkscape:window-y="54"
inkscape:window-width="1920"
inkscape:window-height="1137"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:snap-object-midpoints="false"
inkscape:snap-bbox="false"
inkscape:snap-page="true"
inkscape:bbox-nodes="true"
inkscape:snap-nodes="true"
inkscape:snap-others="true"
inkscape:pagecheckerboard="0">
inkscape:snap-others="true">
<inkscape:grid
type="xygrid"
id="grid833"
@ -236,6 +235,11 @@
height="80.433342"
x="203.20001"
y="21.166662" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 213.78333,40.216668 1e-5,15.875 h 12.7 l -1e-5,39.158334 23.28334,0"
id="path2723"
sodipodi:nodetypes="ccccc" />
<g
id="g4744"
transform="matrix(0,1,1,0,182.03336,-118.53334)">
@ -1452,6 +1456,29 @@
x="206.37503"
y="28.575012"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:5.82083px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583">MAX2837 </tspan></text>
<g
id="g2581"
transform="translate(12.699999,16.933341)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2575"
width="12.699997"
height="8.4666672"
x="194.73335"
y="27.516672" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="201.08334"
y="33.866669"
id="text2579"><tspan
sodipodi:role="line"
id="tspan2577"
x="201.08334"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.264583"
rotate="0 0 0 0">LPF</tspan></text>
</g>
<g
id="g2689"
transform="translate(12.700006,4.2333395)">
@ -1542,6 +1569,54 @@
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 259.29169,42.333333 257.17502,41.275 v 2.116667 z"
id="path2697" />
<g
id="g2805"
transform="matrix(-1,0,0,1,427.56669,33.866685)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2799"
width="12.700001"
height="8.4666672"
x="194.73335"
y="27.516666" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none"
x="-201.33759"
y="33.866669"
id="text2803"
transform="scale(-1,1)"><tspan
sodipodi:role="line"
id="tspan2801"
x="-201.33759"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none"
rotate="0 0 0 0">LPF</tspan></text>
</g>
<g
id="g2813"
transform="matrix(-1,0,0,1,427.56669,46.566685)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2807"
width="12.700001"
height="8.4666672"
x="194.73335"
y="27.516666" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="-201.33759"
y="33.866669"
id="text2811"
transform="scale(-1,1)"><tspan
sodipodi:role="line"
id="tspan2809"
x="-201.33759"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.264583"
rotate="0 0 0 0">LPF</tspan></text>
</g>
<g
id="g2819"
transform="matrix(-1,0,0,1,427.56669,33.866685)">
@ -1762,7 +1837,7 @@
id="tspan3054"
x="207.43335"
y="99.483337"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">21702740 MHz</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">21502750 MHz</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583"
@ -2511,22 +2586,22 @@
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583"
x="281.23917"
x="281.51669"
y="41.274998"
id="text3678"><tspan
sodipodi:role="line"
x="281.23917"
x="281.51669"
y="41.274998"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan3676">TX_IF</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583"
x="281.00922"
x="280.45834"
y="70.90834"
id="text3682"><tspan
sodipodi:role="line"
x="281.00922"
x="280.45834"
y="70.90834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan3680">RX_IF</tspan></text>
@ -2770,17 +2845,17 @@
x="16.933332"
y="177.39795"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.1;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583"
id="tspan810">12170 MHz: 515 dBm</tspan><tspan
id="tspan810">12150 MHz: 515 dBm</tspan><tspan
sodipodi:role="line"
x="16.933332"
y="180.30836"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.1;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583"
id="tspan812">21702740 MHz: 1315 dBm</tspan><tspan
id="tspan812">21502750 MHz: 1315 dBm</tspan><tspan
sodipodi:role="line"
x="16.933332"
y="183.21878"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.1;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583"
id="tspan816">27404000 MHz: 05 dBm</tspan><tspan
id="tspan816">27504000 MHz: 05 dBm</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.1;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583"
sodipodi:role="line"
id="tspan822"
@ -3200,7 +3275,7 @@
id="path4820" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 31.913522,143.93334 2.11667,1.05834 v -2.11667 z"
d="m 31.750002,143.93334 2.11667,1.05834 v -2.11667 z"
id="path4822" />
<text
xml:space="preserve"
@ -3528,7 +3603,7 @@
id="tspan1878"
x="226.48334"
y="147.10834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">&gt; 2740 MHz</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">&gt; 2750 MHz</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583"
@ -3539,7 +3614,7 @@
id="tspan1882"
x="226.48334"
y="164.04167"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">&lt; 2170 MHz</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">&lt; 2150 MHz</tspan></text>
<path
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 247.65003,118.53335 27.51665,-1e-5"
@ -3733,74 +3808,74 @@
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="281.00922"
x="281.51669"
y="87.841675"
id="text1778"><tspan
sodipodi:role="line"
x="281.00922"
x="281.51669"
y="87.841675"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1776">MIX_BYPASS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="270.42587"
x="270.93335"
y="176.74168"
id="text1782"><tspan
sodipodi:role="line"
x="270.42587"
x="270.93335"
y="176.74168"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1780">RX</tspan></text>
<path
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.52916668;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.52916668,0.52916668;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 270.66875,177.79994 h 8.73118 v -61.38327"
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 270.93337,177.80001 h 8.46666 v -61.38334"
id="path1786"
sodipodi:nodetypes="ccc" />
<path
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.52916668;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.52916668,0.52916668;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 190.23542,177.80001 H 254 v -14.81666"
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 190.50002,177.80001 h 63.5 v -14.81666"
id="path1788"
sodipodi:nodetypes="ccc" />
<path
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.52916699;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.52916699,0.52916699;stroke-dashoffset:0.2645835;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 198.96668,177.80001 V 162.98335"
id="path1790" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="189.99254"
x="190.50002"
y="176.74168"
id="text1794"><tspan
sodipodi:role="line"
x="189.99254"
x="190.50002"
y="176.74168"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1792">LP</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="63.2225"
x="63.500004"
y="185.20834"
id="text1798"><tspan
sodipodi:role="line"
x="63.2225"
x="63.500004"
y="185.20834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1796">TX_AMP</tspan></text>
<path
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529174;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529174, 0.529174;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 63.235418,186.26668 H 131.23333 V 162.98335"
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 63.500004,186.26668 67.733346,0 v -23.28333"
id="path1800"
sodipodi:nodetypes="ccc" />
<path
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.52916699;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.52916699,0.52916699;stroke-dashoffset:0.2645835;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 84.666674,186.26668 V 162.98335"
id="path1802"
sodipodi:nodetypes="cc" />
<path
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.52916668;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.52916668,0.52916668;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 281.25209,88.899987 h 19.31457 V 44.450004"
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 281.51667,88.900008 H 300.5667 V 44.450004"
id="path1804" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
@ -3867,18 +3942,18 @@
sodipodi:nodetypes="ccc" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 57.150004,150.28335 H 39.952084"
d="M 57.150004,150.28335 H 40.216668"
id="path2613"
sodipodi:nodetypes="cc" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583"
x="39.775093"
x="40.216667"
y="149.22501"
id="text2617"><tspan
sodipodi:role="line"
id="tspan2615"
x="39.775093"
x="40.216667"
y="149.22501"
style="font-weight:bold;text-align:start;text-anchor:start;stroke-width:0.264583">3.3V 50mA</tspan></text>
<ellipse
@ -3918,88 +3993,87 @@
</g>
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 39.952084,158.75002 h 21.431253 v -2.11667"
id="path2634"
sodipodi:nodetypes="ccc" />
d="m 40.21667,158.75002 h 21.166667 v -2.11667"
id="path2634" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583"
x="39.581306"
x="40.216667"
y="157.69168"
id="text2638"><tspan
sodipodi:role="line"
id="tspan2636"
x="39.581306"
x="40.216667"
y="157.69168"
style="font-weight:bold;text-align:start;text-anchor:start;stroke-width:0.264583">!ANT_BIAS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="62.992538"
x="63.5"
y="178.85834"
id="text1611"><tspan
sodipodi:role="line"
x="62.992538"
x="63.5"
y="178.85834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1609">RX_AMP</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="63.2225"
x="63.5"
y="182.03334"
id="text1615"><tspan
sodipodi:role="line"
x="63.2225"
x="63.5"
y="182.03334"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1613">AMP_BYPASS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="189.99254"
x="190.50002"
y="173.56668"
id="text1619"><tspan
sodipodi:role="line"
x="189.99254"
x="190.50002"
y="173.56668"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1617">HP</tspan></text>
<path
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529204;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529204, 0.529204;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 143.66875,186.26666 h 21.43123 v -23.28331"
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529, 0.529;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 143.93334,186.26668 h 21.16667 v -23.28333"
id="path1621"
sodipodi:nodetypes="ccc" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="143.65584"
x="143.93335"
y="185.20834"
id="text1625"><tspan
sodipodi:role="line"
x="143.65584"
x="143.93335"
y="185.20834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1623">TX_MIX_BP</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="143.29797"
x="143.93335"
y="178.85834"
id="text1629"><tspan
sodipodi:role="line"
x="143.29797"
x="143.93335"
y="178.85834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1627">!MIX_BYPASS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="143.42587"
x="143.93335"
y="182.03334"
id="text1633"><tspan
sodipodi:role="line"
x="143.42587"
x="143.93335"
y="182.03334"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1631">RX_MIX_BP</tspan></text>
@ -4101,11 +4175,6 @@
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 225.42502,88.900005 -2.11667,-1.05834 v 2.11667 z"
id="path2876" />
<path
style="font-variation-settings:normal;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 213.78334,39.952084 1e-5,16.139584 h 12.7 l -1e-5,39.158335 h 23.28334"
id="path2723"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 225.42502,93.133338 -2.11667,-1.05834 v 2.11667 z"
@ -4174,91 +4243,65 @@
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:6.90875px;line-height:0.85;font-family:'League Gothic';-inkscape-font-specification:'League Gothic Bold';text-align:end;text-anchor:end;stroke-width:0.172719"
id="tspan3429">GADGETS</tspan></text>
</g>
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 16.933335,136.52501 h 1.058333 v -2.11667 h 2.116667 v 2.11667 h 2.116667 v -2.11667 h 2.116666 v 2.11667 h 2.116666 v -2.11667 h 2.116669 v 2.11667 h 1.058334"
id="path1717" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 16.933336,153.45836 h 1.058333 v -2.11667 h 2.116667 v 2.11667 h 2.116667 v -2.11667 h 2.116666 v 2.11667 h 2.116666 v -2.11667 h 2.116669 v 2.11667 h 1.058334"
id="path1719" />
<g
id="g3853"
transform="translate(-0.23745481,-0.10144164)">
id="g3853">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="129.11667"
y="135.99582"
y="134.40834"
id="text1551"><tspan
sodipodi:role="line"
x="129.11667"
y="135.99582"
y="134.40834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1553">Diagram Revision: C</tspan><tspan
id="tspan1553">Diagram Revision: A</tspan><tspan
sodipodi:role="line"
x="129.11667"
y="139.88292"
y="138.29544"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:5.29167px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1559" /></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="129.11667"
y="131.23338"
id="text1551-3"><tspan
sodipodi:role="line"
x="129.11667"
y="131.23338"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1553-6">Hardware Revision: r1-r8</tspan><tspan
sodipodi:role="line"
x="129.11667"
y="135.12048"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:5.29167px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1559-7" /></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="129.11667"
y="140.75832"
y="138.64168"
id="text1563"><tspan
sodipodi:role="line"
id="tspan1561"
x="129.11667"
y="140.75832"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583">© Great Scott Gadgets 2022-2023</tspan><tspan
y="138.64168"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583">© Great Scott Gadgets 2022</tspan><tspan
sodipodi:role="line"
x="129.11667"
y="144.72707"
y="142.61043"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan3512" /></text>
<rect
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.299903;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3475"
width="71.947708"
height="24.481998"
x="127.00948"
y="125.59979" />
width="71.966675"
height="19.050007"
x="127.00001"
y="129.11667" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:0;font-family:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583"
x="129.10376"
y="144.88519"
y="142.76855"
id="text3532"><tspan
sodipodi:role="line"
id="tspan3530"
x="129.10376"
y="144.88519"
y="142.76855"
style="font-weight:bold;line-height:1.1;text-align:start;text-anchor:start;stroke-width:0.264583">This design may be copied &amp; used</tspan><tspan
sodipodi:role="line"
x="129.10376"
y="147.79561"
y="145.67897"
style="font-weight:bold;line-height:1.1;text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan3534">under the terms of CERN-OHL-P v2</tspan></text>
<g
id="g3819"
transform="translate(0,2.1166668)">
id="g3819">
<g
transform="matrix(0.0574526,0,0,-0.0574526,161.22832,155.90395)"
id="g3012"
@ -4349,76 +4392,13 @@
</g>
</g>
</g>
<g
id="g2581"
transform="translate(12.699999,16.933341)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2575"
width="12.699997"
height="8.4666672"
x="194.73335"
y="27.516672" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="201.08334"
y="33.866669"
id="text2579"><tspan
sodipodi:role="line"
id="tspan2577"
x="201.08334"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.264583"
rotate="0 0 0 0">LPF</tspan></text>
</g>
<g
id="g2805"
transform="matrix(-1,0,0,1,427.56669,33.866685)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2799"
width="12.700001"
height="8.4666672"
x="194.73335"
y="27.516666" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none"
x="-201.33759"
y="33.866669"
id="text2803"
transform="scale(-1,1)"><tspan
sodipodi:role="line"
id="tspan2801"
x="-201.33759"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none"
rotate="0 0 0 0">LPF</tspan></text>
</g>
<g
id="g2813"
transform="matrix(-1,0,0,1,427.56669,46.566685)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2807"
width="12.700001"
height="8.4666672"
x="194.73335"
y="27.516666" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="-201.33759"
y="33.866669"
id="text2811"
transform="scale(-1,1)"><tspan
sodipodi:role="line"
id="tspan2809"
x="-201.33759"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.264583"
rotate="0 0 0 0">LPF</tspan></text>
</g>
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 16.933335,136.52501 h 1.058333 v -2.11667 h 2.116667 v 2.11667 h 2.116667 v -2.11667 h 2.116666 v 2.11667 h 2.116666 v -2.11667 h 2.116669 v 2.11667 h 1.058334"
id="path1717" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 16.933336,153.45836 h 1.058333 v -2.11667 h 2.116667 v 2.11667 h 2.116667 v -2.11667 h 2.116666 v 2.11667 h 2.116666 v -2.11667 h 2.116669 v 2.11667 h 1.058334"
id="path1719" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 263 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 831 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

View file

@ -1,4 +1,4 @@
sphinx==7.2.6
sphinx_rtd_theme==2.0.0
readthedocs-sphinx-search==0.3.2
jinja2==3.1.6
sphinx==1.8.5
sphinx_rtd_theme==1.0.0
readthedocs-sphinx-search==0.1.1
jinja2==3.0.0

View file

@ -13,8 +13,11 @@ In the current HackRF design, there is a CPLD which manages the interface betwee
Frequently Asked Questions
~~~~~~~~~~~~~~~~~~~~~~~~~~
Why not use GPDMA to transfer samples through SGPIO?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It would be great if we could, as that would free up lots of processor time. Unfortunately, the GPDMA scheme in the LPC43xx does not seem to support peripheral-to-memory and memory-to-peripheral transfers with the SGPIO peripheral.

View file

@ -1,8 +1,8 @@
Enclosure Options
~~~~~~~~~~~~~~~~~
Commercial versions of both HackRF Pro and HackRF One from Great Scott Gadgets ship with an injection molded plastic enclosure but are also designed to fit two optional enclosures:
The commercial version of HackRF One from Great Scott Gadgets ships with an injection molded plastic enclosure, but it is designed to fit two optional enclosures:
* Hammond 1455J1201: Both HackRF Pro and HackRF One fit this extruded aluminum enclosure and other similar models from Hammond Manufacturing. In order to use the enclosure's end plates, you will have to drill them. An end plate template can be found in the HackRF One KiCad layout.
* Hammond 1455J1201: HackRF One fits this extruded aluminum enclosure and other similar models from Hammond Manufacturing. In order to use the enclosure's end plates, you will have to drill them. An end plate template can be found in the HackRF One KiCad layout.
* Acrylic sandwich: You can also use a laser cut acrylic enclosure with either HackRF Pro or HackRF One. This is a good option for access to the expansion headers. A design can be found in the HackRF hardware directory. Use any laser cutting service or purchase from a `reseller <https://greatscottgadgets.com/hackrf/acrylic-case/>`__.
* Acrylic sandwich: You can also use a laser cut acrylic enclosure with HackRF One. This is a good option for access to the expansion headers. A design can be found in the HackRF One hardware directory. Use any laser cutting service or purchase from a `reseller <http://greatscottgadgets.com/acrylic_case/>`__.

View file

@ -1,7 +1,55 @@
Expansion Interface
~~~~~~~~~~~~~~~~~~~
The common HackRF expansion interface consists of headers P20, P22, and P28. These headers are present on both HackRF Pro and HackRF One, and support hardware add-ons including PortaPack and Opera Cake.
The HackRF One expansion interface consists of headers P9, P20, P22, and P28. These four headers are installed on the commercial HackRF One from Great Scott Gadgets.
P9 Baseband
^^^^^^^^^^^
A direct analog interface to the high speed dual ADC and dual DAC.
.. list-table ::
:header-rows: 1
:widths: 1 1
* - Pin
- Function
* - 1
- GND
* - 2
- GND
* - 3
- GND
* - 4
- RXBBQ-
* - 5
- RXBBI-
* - 6
- RXBBQ+
* - 7
- RXBBI+
* - 8
- GND
* - 9
- GND
* - 10
- TXBBI-
* - 11
- TXBBQ+
* - 12
- TXBBI+
* - 13
- TXBBQ-
* - 14
- GND
* - 15
- GND
* - 16
- GND
P20 GPIO
^^^^^^^^
@ -17,15 +65,15 @@ Providing access to GPIO, ADC, RTC, and power.
* - 1
- VBAT
* - 2
- RTC_ALARM (One) / PB_5 (Pro)
- RTC_ALARM
* - 3
- VCC (One) / 3V3AUX (Pro)
- VCC
* - 4
- WAKEUP
* - 5
- GPIO3_8
* - 6
- GPIO3_0 (One) / GPIO3_9 (Pro)
- GPIO3_0
* - 7
- GPIO3_10
* - 8
@ -73,7 +121,7 @@ I2S, SPI, I2C, UART, GPIO, and clocks.
* - Pin
- Function
* - 1
- CLKOUT (One) / P2 (Pro)
- CLKOUT
* - 2
- CLKIN
* - 3
@ -85,21 +133,21 @@ I2S, SPI, I2C, UART, GPIO, and clocks.
* - 6
- I2C1_SDA
* - 7
- SPIFI_MISO (One) / PB_1 (Pro)
- SPIFI_MISO
* - 8
- SPIFI_SCK (One) / PB_3 (Pro)
- SPIFI_SCK
* - 9
- SPIFI_MOSI (One) / PA_4 (Pro)
- SPIFI_MOSI
* - 10
- GND
* - 11
- VCC (One) / 3V3AUX (Pro)
- VCC
* - 12
- I2S0_RX_SCK (One) / PA_3 (Pro)
- I2S0_RX_SCK
* - 13
- I2S0_RX_SDA (One) / I2S0_TX_SDA (Pro)
- I2S_RX_SDA
* - 14
- I2S0_RX_MCLK (One) / PB_0 (Pro)
- I2S0_RX_MCLK
* - 15
- I2S0_RX_WS
* - 16
@ -121,7 +169,7 @@ I2S, SPI, I2C, UART, GPIO, and clocks.
* - 24
- SDA
* - 25
- CLK6 (One) / AUX_CLK2 (Pro)
- CLK6
* - 26
- SCL
@ -139,7 +187,7 @@ SDIO, GPIO, clocks, and CPLD.
* - Pin
- Function
* - 1
- VCC (One) / 3V3AUX (Pro)
- VCC
* - 2
- GND
* - 3
@ -163,69 +211,25 @@ SDIO, GPIO, clocks, and CPLD.
* - 12
- GND
* - 13
- GCK2 (One) / P5_6 (Pro)
- GCK2
* - 14
- GCK1 (One) / P5_7 (Pro)
- GCK1
* - 15
- Trigger out: B1AUX14 (One) / TRIGGER.OUT (Pro)
- B1AUX14 (trigger output)
* - 16
- Trigger in: B1AUX13 (One) / TRIGGER.IN (Pro)
- B1AUX13 (trigger input)
* - 17
- CPLD_TCK
* - 18
- BANK2F3M2 (One) / PE_0 (Pro)
- BANK2F3M2
* - 19
- CPLD_TDI (One) / I2S0_RX_SDA (Pro)
- CPLD_TDI
* - 20
- BANK2F3M6 (One) / P9_1 (Pro)
- BANK2F3M6
* - 21
- BANK2F3M12 (One) / P5_3 (Pro)
- BANK2F3M12
* - 22
- BANK2F3M4 (One) / P1_7 (Pro)
P9 Baseband (HackRF One)
^^^^^^^^^^^^^^^^^^^^^^^^
A direct analog interface to the high speed dual ADC and dual DAC.
.. list-table ::
:header-rows: 1
:widths: 1 1
* - Pin
- Function
* - 1
- GND
* - 2
- GND
* - 3
- GND
* - 4
- RXBBQ-
* - 5
- RXBBI-
* - 6
- RXBBQ+
* - 7
- RXBBI+
* - 8
- GND
* - 9
- GND
* - 10
- TXBBI-
* - 11
- TXBBQ+
* - 12
- TXBBI+
* - 13
- TXBBQ-
* - 14
- GND
* - 15
- GND
* - 16
- GND
- BANK2F3M4
Additional unpopulated headers and test points are available for test and development, but they may be incompatible with some enclosure or expansion options.

View file

@ -1,26 +1,12 @@
========================
External Clock Interface
========================
===========================================
External Clock Interface (CLKIN and CLKOUT)
===========================================
.. _external_clock_interface:
HackRF Pro
~~~~~~~~~~
HackRF One produces a 10 MHz clock signal on CLKOUT. The signal is a 3.3 V, 10 MHz square wave intended for a high impedance load.
HackRF Pro has two configurable SMA ports, P1 and P2. By default, P1 is configured as CLKIN and P2 as CLKOUT. The default behaviour of these signals is as described for HackRF One below.
A second CLKIN signal is available on header P22 pin 2. Unlike HackRF One, HackRF Pro's P22_CLKIN is a separate signal from P1_CLKIN. To enable P22_CLKIN instead of P1_CLKIN use ``hackrf_clock -c p22``.
Various internal signals can be connected to P1 or P2 instead of the default CLKIN and CLKOUT signals. Use ``hackrf_clock -1`` or ``hackrf_clock -2`` to select a different signal.
HackRF One
~~~~~~~~~~
HackRF One produces a 10 MHz clock signal on the CLKOUT SMA port. The signal is a 3.3 V, 10 MHz square wave intended for a high impedance load.
The CLKIN SMA port on HackRF One is a high impedance input that expects 3.3 V square wave at 10 MHz. Do not exceed 3.3 V or drop below 0 V on this input. Do not connect a clock signal at a frequency other than 10 MHz (unless you modify the firmware to support this). You may directly connect the CLKOUT port of one HackRF One to the CLKIN port of another HackRF.
The CLKIN signal is also connected to header P22 pin 2. Unlike HackRF Pro, HackRF One has only one CLKIN signal shared between P22 pin 2 and the CLKIN port. Do not connect input signals to both CLKIN and P22 pin 2 simultaneously.
The CLKIN port on HackRF One is a high impedance input that expects 3.3 V square wave at 10 MHz. Do not exceed 3.3 V or drop below 0 V on this input. Do not connect a clock signal at a frequency other than 10 MHz (unless you modify the firmware to support this). You may directly connect the CLKOUT port of one HackRF One to the CLKIN port of another HackRF One.
HackRF One uses CLKIN instead of the internal crystal when a clock signal is detected on CLKIN. The switch to or from CLKIN only happens when a transmit or receive operation begins.

155
docs/source/faq.rst Normal file
View file

@ -0,0 +1,155 @@
.. _faq:
================================================
FAQ
================================================
What is the Transmit Power of HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF One's absolute maximum TX power varies by operating frequency:
* 1 MHz to 10 MHz: 5 dBm to 15 dBm, generally increasing as frequency increases (see this `blog post <https://greatscottgadgets.com/2015/05-15-hackrf-one-at-1-mhz/>`__)
* 10 MHz to 2150 MHz: 5 dBm to 15 dBm, generally decreasing as frequency increases
* 2150 MHz to 2750 MHz: 13 dBm to 15 dBm
* 2750 MHz to 4000 MHz: 0 dBm to 5 dBm, decreasing as frequency increases
* 4000 MHz to 6000 MHz: -10 dBm to 0 dBm, generally decreasing as frequency increases
Through most of the frequency range up to 4 GHz, the maximum TX power is between 0 and 10 dBm. The frequency range with best performance is 2150 MHz to 2750 MHz.
Overall, the output power is enough to perform over-the-air experiments at close range or to drive an external amplifier. If you connect an external amplifier, you should also use an external bandpass filter for your operating frequency.
Before you transmit, know your laws. HackRF One has not been tested for compliance with regulations governing transmission of radio signals. You are responsible for using your HackRF One legally.
----
What is the Receive Power of HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The maximum RX power of HackRF One is -5 dBm. Exceeding -5 dBm can result in permanent damage!
In theory, HackRF One can safely accept up to 10 dBm with the front-end RX amplifier disabled. However, a simple software or user error could enable the amplifier, resulting in permanent damage. It is better to use an external attenuator than to risk damage.
----
What is the minimum signal power level that can be detected by HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This isn't a question that can be answered for a general purpose SDR platform such as HackRF. Any answer would be very specific to a particular application. For example, an answerable question might be: What is the minimum power level in dBm of modulation M at frequency F that can be detected by HackRF One with software S under configuration C at a bit error rate of no more than E%? Changing any of those variables (M, F, S, C, or E) would change the answer to the question. Even a seemingly minor software update might result in a significantly different answer. To learn the exact answer for a specific application, you would have to measure it yourself.
HackRF's concrete specifications include operating frequency range, maximum sample rate, and dynamic range in bits. These specifications can be used to roughly determine the suitability of HackRF for a given application. Testing is required to finely measure performance in an application. Performance can typically be enhanced significantly by selecting an appropriate antenna, external amplifier, and/or external filter for the application.
----
Is HackRF full-duplex?
~~~~~~~~~~~~~~~~~~~~~~
HackRF One is a half-duplex transceiver. This means that it can transmit or receive but not both at the same time.
----
Why isn't HackRF One full-duplex?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF One is designed to support the widest possible range of SDR applications in a single, low cost, portable device. Many applications do not require full-duplex operation. Full-duplex support would have made HackRF larger and more expensive, and it would have required an external power supply. Since full-duplex needs can be met by simply using a second HackRF One, it made sense to keep the device small, portable, and low cost for everyone who does not require full-duplex operation.
----
How could the HackRF One design be changed to make it full-duplex?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The HackRF One hardware design is actually full-duplex (at lower sample rates) from the USB connection through the ADC/DAC. The RF section is the only part of the design that cannot support full-duplex operation. The easiest way to make HackRF One full-duplex would be to create an add-on board that duplicates the RF section and also provides an external power input (from a wall wart, for example) for the additional power required. This would also require software effort; the firmware, CPLD, libhackrf, and other host software would all need work to support full-duplex operation.
If you were to try to redesign the RF section on HackRF One to support full-duplex, the main thing to focus on would be the MAX2837 (intermediate frequency transceiver). This part is half-duplex, so you would either need two of them or you would have to redesign the RF section to use something other than the MAX2837, likely resulting in a radically different design. If you used two MAX2837s you might be able to use one RFFC5071 instead of two RFFC5072s.
----
Are those connectors SMA or RP-SMA?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some connectors that appear to be SMA are actually RP-SMA. If you connect an RP-SMA antenna to HackRF One, it will seem to connect snugly but won't function at all because neither the male nor female side has a center pin. RP-SMA connectors are most common on 2.4 GHz antennas and are popular on Wi-Fi equipment. Adapters are available.
----
.. _bigspike:
What is the big spike in the center of my received spectrum?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you see a large spike in the center of your FFT display regardless of the frequenecy you are tuned to, you are seeing a DC offset (or component or bias). The term "DC" comes from "Direct Current" in electronics. It is the unchanging aspect of a signal as opposed to the "alternating" part of the signal (AC) that changes over time. Take, for example, the signal represented by the digital sequence:
.. code-block:: sh
-2, -1, 1, 6, 8, 9, 8, 6, 1, -1, -2, -1, 1, 6, 8, 9, 8, 6, 1, -1, -2, -1, 1, 6, 8, 9, 8, 6, 1, -1
This periodic signal contains a strong sinusoidal component spanning from -2 to 9. If you were to plot the spectrum of this signal, you would see one spike at the frequency of this sinusoid and a second spike at 0 Hz (DC). If the signal spanned from values -2 to 2 (centered around zero), there would be no DC offset. Since it is centered around 3.5 (the number midway between -2 and 9), there is a DC component.
Samples produced by HackRF are measurements of radio waveforms, but the measurement method is prone to a DC bias introduced by HackRF. It's an artifact of the measurement system, not an indication of a received radio signal. DC offset is not unique to HackRF; it is common to all quadrature sampling systems.
There was a bug in the HackRF firmware (through release 2013.06.1) that made the DC offset worse than it should have been. In the worst cases, certain Jawbreakers experienced a DC offset that drifted to a great extreme over several seconds of operation. This bug has been fixed. The fix reduces DC offset but does not do away with it entirely. It is something you have to live with when using any quadrature sampling system like HackRF.
A high DC offset is also one of a few symptoms that can be caused by a software version mismatch. A common problem is that people run an old version of gr-osmosdr with newer firmware.
----
What gain controls are provided by HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF (both Jawbreaker and One) provides three different analog gain controls on RX and two on TX.
The three RX gain controls are at these stages:
- RF ("amp", 0 or 14 dB)
- IF ("lna", 0 to 40 dB in 8 dB steps)
- baseband ("vga", 0 to 62 dB in 2 dB steps)
The two TX gain controls are at these stages:
- RF (0 or 14 dB)
- IF (0 to 47 dB in 1 dB steps)
----
Why is the RF gain setting restricted to two values?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF has two RF amplifiers close to the antenna port, one for TX and one for RX. These amplifiers have two settings: on or off. In the off state, the amps are completely bypassed. They nominally provide 14 dB of gain when on, but the actual amount of gain varies by frequency. In general, expect less gain at higher frequencies. For fine control of gain, use the IF and/or baseband gain options.
----
Why are the LEDs on HackRF different colours?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Each LED is a single color. There are no multi-colored LEDs on HackRF One. Adjacent LEDs are different colors in order to make them easier to distinguish from one another. The colors do not mean anything.
----
Where can I purchase HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF is designed and manufactured by Great Scott Gadgets. We do not sell low volumes of HackRFs to people individually; instead we have agreements with specific resellers. Please see our reseller list on the Great Scott Gadgets website for availability: `http://greatscottgadgets.com/hackrf/ <http://greatscottgadgets.com/hackrf/>`__.
HackRF is open source hardware, so you can also build your own.

View file

@ -4,4 +4,4 @@ Firmware Development Setup
Firmware build instructions are included in the repository under firmware/README:
`https://github.com/greatscottgadgets/hackrf/blob/master/firmware/README <https://github.com/greatscottgadgets/hackrf/blob/master/firmware/README>`__
`https://github.com/mossmann/hackrf/blob/master/firmware/README <https://github.com/mossmann/hackrf/blob/master/firmware/README>`__

View file

@ -1,118 +0,0 @@
================================================
Gateware
================================================
One of the significant hardware changes in :ref:`HackRF Pro <hackrf_pro>` is the replacement of the CPLD with a FPGA. While the older CPLD primarily provided glue logic between the MCU and RF front end, the FPGA in HackRF Pro introduces more logic and DSP capability. This enables offloading digital signal processing tasks from the MCU.
FPGAs are highly flexible devices whose behavior is defined by *gateware*: hardware descriptions that configure the internal logic fabric. HackRF Pro gateware is written in `Amaranth HDL <https://amaranth-lang.org/>`__, a Python-based hardware description language.
The specific FPGA device used in HackRF Pro is the Lattice iCE40UP5K, which features
5280 LUT4s and 8 dedicated DSP (multiply-accumulate) blocks. We rely on the `open-source iCE40 FPGA toolchain <https://github.com/YosysHQ/icestorm>`__ to build the required bitstreams that are bundled in the firmware.
All gateware source code lives under `firmware/fpga/` in the HackRF repository. Top-level designs reside in `firmware/fpga/top/` and are the primary entry points for different operational modes.
By default, a standard gateware configuration is loaded at boot. However, the firmware can dynamically reconfigure the FPGA at runtime to switch between different gateware variants.
Standard gateware
~~~~~~~~~~~~~~~~~
The standard gateware is used by default when the firmware has not requested an alternative bitstream.
The standard gateware provides a balanced configuration optimized for general-purpose operation. It implements configurable digital signal processing paths for the reception and transmission paths, capable of (limited) frequency translation and supporting a wide range of sample rates.
Block diagram
^^^^^^^^^^^^^
.. image:: ../images/gateware-basic-block-diagram.png
:align: center
.. image:: ../images/gateware-standard-dsp-chain.png
:align: center
:width: 75%
Features
^^^^^^^^
* 8-bit I, 8-bit Q data format
* Receiver signal chain:
* Optional DC offset removal (DC blocker)
* Configurable fs/4 shifter (quarter sample rate): bypass, shift up or shift down
* Configurable decimation rates: 1x, 2x, 4x, 8x, 16x, 32x
* Transmitter signal chain:
* Configurable interpolation rates: 1x, 2x, 4x, 8x, 16x, 32x
* SPI control interface for register configuration
* Double data rate (DDR) interface to RF transceiver
* Interface to MCU (SGPIO)
Half-precision gateware
~~~~~~~~~~~~~~~~~~~~~~~
The half-precision gateware reduces sample width to 4 bits per I/Q component, enabling higher throughput within the constraints of the USB interface (up to 40 Msps).
This configuration is intended for applications where bandwidth is more critical than dynamic range, such as wideband spectrum monitoring.
Block diagram
^^^^^^^^^^^^^
.. image:: ../images/gateware-basic-block-diagram.png
:align: center
.. image:: ../images/gateware-halfprec-dsp-chain.png
:align: center
:width: 75%
Features
^^^^^^^^
* 4-bit I, 4-bit Q data format
* Receiver signal chain:
* Optional DC offset removal (DC blocker)
* Round to 4-bit I/Q
* Transmitter signal chain:
* Extend width to 8-bit I/Q
* SPI control interface for register configuration
* Double data rate (DDR) interface to RF transceiver
* Interface to MCU (SGPIO)
Extended-precision gateware (RX and TX)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The extended-precision gateware increases internal signal processing precision and output sample width to improve signal quality. The main drawback is that the minimum decimation or interpolation factor is 16x. Due to increased logic requirements, this gateware is split in two top-level designs (RX and TX).
Samples are 16-bit I/Q, while the effective number of bits (ENOB) depends on the selected configuration and typically ranges between 9 and 11 bits.
The increased dynamic range of the output makes it particularly useful for weak and/or narrowband signals.
Block diagram (RX)
^^^^^^^^^^^^^^^^^^
.. image:: ../images/gateware-rx-only-basic-block-diagram.png
:align: center
.. image:: ../images/gateware-ext-prec-rx-dsp-chain.png
:align: center
:width: 75%
Block diagram (TX)
^^^^^^^^^^^^^^^^^^
.. image:: ../images/gateware-tx-only-basic-block-diagram.png
:align: center
.. image:: ../images/gateware-ext-prec-tx-dsp-chain.png
:align: center
:width: 75%
Features
^^^^^^^^
* 16-bit I, 16-bit Q data format
* Receiver signal chain (RX extended-precision gateware):
* Optional DC offset removal (DC blocker)
* Configurable mixer (in fs/128 steps)
* Configurable decimation rates: 16x, 32x, 64x, 128x
* Transmitter signal chain (TX extended-precision gateware):
* Configurable interpolation rates: 16x, 32x, 64x, 128x
* SPI control interface for register configuration
* Double data rate (DDR) interface to RF transceiver
* Interface to MCU (SGPIO)

View file

@ -1,11 +1,9 @@
============
================================================
Getting Help
============
================================================
Before asking for help with HackRF, check to see if your question is answered in this documentation, listed in the :ref:`Troubleshooting <troubleshooting>` page, or addressed in the `HackRF GitHub repository issues <https://github.com/greatscottgadgets/hackrf/issues>`__.
Before asking for help with HackRF, check to see if your question is listed in the :ref:`FAQ <faq>` or has already been answered in `GitHub issues <https://github.com/mossmann/hackrf/issues>`__ or the `mailing list archives <https://pairlist9.pair.net/pipermail/hackrf-dev/>`__.
For assistance with HackRF general use or development, please look at the `issues on the GitHub project <https://github.com/greatscottgadgets/hackrf/issues>`__. This is the preferred place to ask questions so that others may locate the answer to your question in the future.
For assistance with HackRF use or development, please look at the `issues on the GitHub project <https://github.com/mossmann/hackrf/issues>`__. This is the preferred place to ask questions so that others may locate the answer to your question in the future.
We invite you to join our community discussions on `Discord <https://discord.gg/rsfMw3rsU8>`__. Note that while technical support requests are welcome here, we do not have support staff on duty at all times. Be sure to also submit an issue on GitHub if youve found a bug or if you want to ensure that your request will be tracked and not overlooked.
If you wish to see past discussions and questions about HackRF, you may also view the `mailing list archives <https://pairlist9.pair.net/pipermail/hackrf-dev/>`__.
Many users spend time in the `#hackrf channel on Discord <https://discord.gg/rsfMw3rsU8>`__.

View file

@ -0,0 +1,69 @@
================================================
Getting Started with HackRF and GNU Radio
================================================
We recommend getting started by watching the `Software Defined Radio with HackRF <https://greatscottgadgets.com/sdr/>`__ video series. This series will introduce you to HackRF One, software including GNU Radio, and teach you the fundamentals of Digital Signal Processing (DSP) needed to take full advantage of the power of Software Defined Radio (SDR). Additional helpful information follows.
.. _try_pentoo:
Try Your HackRF with Pentoo Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The easiest way to get started with your HackRF and ensure that it works is to use Pentoo, a Linux distribution with full support for HackRF and GNU Radio. Download the latest Pentoo .iso image from one of the mirrors listed at `http://pentoo.ch/downloads/ <https://pentoo.ch/downloads>`__. Then burn the .iso to a DVD or use `UNetbootin <http://unetbootin.sourceforge.net/>`__ to install the .iso on a USB flash drive. Boot your computer using the DVD or USB flash drive to run Pentoo. Do this natively, not in a virtual machine. (Unfortunately high speed USB operation invariably fails when people try to run HackRF from a virtual machine.)
Once Pentoo is running, you can immediately use it to :ref:`update firmware <updating_firmware>` on your HackRF or use other HackRF command line tools. For a walkthrough, watch `SDR with HackRF, Lesson 5: HackRF One <http://greatscottgadgets.com/sdr/5/>`__.
To verify that your HackRF is detected, type ``hackrf_info`` at the command line. It should produce a few lines of output including "Found HackRF board." The 3V3, 1V8, RF, and USB LEDs should all be illuminated and are various colors.
You can type ``startx`` at the command line to launch a desktop environment. Accept the "default config" in the first dialog box. The desktop environment is useful for GNU Radio Companion and other graphical applications but is not required for basic operations such as firmware updates.
Now you can use programs such as gnuradio-companion or gqrx to start experimenting with your HackRF. Try the Examples below. If you are new to GNU Radio, an excellent place to start is with the `SDR with HackRF <http://greatscottgadgets.com/sdr/>`__ video series or with the `GNU Radio guided tutorials <https://wiki.gnuradio.org/index.php/Tutorials>`__.
**Alternative: GNU Radio Live SDR Environment**
The `GNU Radio Live SDR Environment <https://wiki.gnuradio.org/index.php/GNU_Radio_Live_SDR_Environment>`__ is another nice bootable Linux .iso with support for HackRF and, of course, GNU Radio.
Software Setup
~~~~~~~~~~~~~~
As mentioned above, the best way to get started with HackRF is to use Pentoo Linux. Eventually you may want to install software to use HackRF with your favorite operating system.
If your package manager includes the most recent release of libhackrf and gr-osmosdr, then use it to install those packages in addition to GNU Radio. Otherwise, the recommended way to install these tools is by using `PyBOMBS <https://github.com/gnuradio/pybombs>`__.
See the :ref:`Operating System Tips <operating_system_tips>` page for information on setting up HackRF software on particular Operating Systems and Linux distributions.
If you have any trouble, make sure that things work when booted to Pentoo. This will allow you to easily determine if your problem is being caused by hardware or software, and it will give you a way to see how the software is supposed to function.
Examples
~~~~~~~~
A great way to get started with HackRF is the `SDR with HackRF <http://greatscottgadgets.com/sdr/>`__ video series. Additional examples follow:
Testing the HackRF
#. Plug in the HackRF
#. run the hackrf_info command ``$ hackrf_info``
If everything is OK, you should see something similar to the following:
.. code-block:: sh
hackrf_info version: 2017.02.1
libhackrf version: 2017.02.1 (0.5)
Found HackRF
Index: 0
Serial number: 0000000000000000################
Board ID Number: 2 (HackRF One)
Firmware Version: 2017.02.1 (API:1.02)
Part ID Number: 0x######## 0x########
**FM Radio Example**
This Example was derived from the following works:
* `RTL-SDR FM radio receiver with GNU Radio Companion <http://www.instructables.com/id/RTL-SDR-FM-radio-receiver-with-GNU-Radio-Companion/>`__
* `How To Build an FM Receiver with the USRP in Less Than 10 Minutes <https://www.youtube.com/watch?v=KWeY2yqwVA0>`__
#. Download the FM Radio Receiver python file `here <https://raw.githubusercontent.com/rrobotics/hackrf-tests/master/fm_radio/fm_radio_rx.py>`__
#. Run the file ``$ python ./fm_radio_rx.py``
#. You can find the GNU Radio Companion source file `here <https://raw.githubusercontent.com/rrobotics/hackrf-tests/master/fm_radio/fm_radio_rx.grc>`__

View file

@ -1,7 +0,0 @@
==========
Connectors
==========
The connectors on both HackRF Pro and HackRF One are SMA.
**Note:** SMA connectors and RP-SMA connectors are visually very similar. If you connect an RP-SMA antenna to a HackRF, it will seem to connect snugly but won't function at all because neither the male nor female side has a center pin. RP-SMA connectors are most common on 2.4 GHz antennas and are popular on Wi-Fi equipment. Adapters are available.

View file

@ -1,9 +0,0 @@
============================================
Minimum Host System Requirements for HackRF
============================================
HackRF requires you to supply 500 mA at 5 V DC to your HackRF via the USB port. If your host computer has difficulty meeting this requirement, you may need to use a powered USB hub.
There is no specific minimum CPU requirement for the host computer when using a HackRF, but SDR is generally a CPU-intensive application. If you have a slower CPU, you may be unable to run certain SDR software or you may only be able to operate at lower sample rates.
Most users will want to stream data to or from the HackRF at high speeds. This requires that the host computer supports Hi-Speed USB. Some Hi-Speed USB hosts are better than others, and you may have multiple host controllers on your computer. If you have difficulty operating your HackRF at high sample rates (10 Msps to 20 Msps), try using a different USB port on your computer. If possible, arrange things so that the HackRF is the only device on the bus.

View file

@ -2,15 +2,12 @@
HackRF One
================================================
.. _hackrf_one:
.. image:: ../images/HackRF-One-fd0-0009.jpeg
:alt: HackRF One
HackRF One was the first production hardware platform for the HackRF project. It is a Software Defined Radio peripheral capable of transmission or reception of radio signals from 1 MHz to 6 GHz. Designed to enable test and development of modern and next generation radio technologies, HackRF One is an open source hardware platform that can be used as a USB peripheral or programmed for stand-alone operation.
HackRF One is the current hardware platform for the HackRF project. It is a Software Defined Radio peripheral capable of transmission or reception of radio signals from 1 MHz to 6 GHz. Designed to enable test and development of modern and next generation radio technologies, HackRF One is an open source hardware platform that can be used as a USB peripheral or programmed for stand-alone operation.
| `Product page <https://greatscottgadgets.com/hackrf/one/>`_
| `Where to buy <https://greatscottgadgets.com/hackrf/one/#purchasing>`_
Features
~~~~~~~~
@ -21,44 +18,11 @@ Features
* resolution: 8 bits
* interface: High Speed USB (with USB Micro-B connector)
* power supply: USB bus power
* software-controlled antenna port power (max 50 mA at 3.0 to 3.3 V)
* software-controlled antenna port power (max 50 mA at 3.3 V)
* SMA female antenna connector (50 ohms)
* SMA female clock input and output for synchronization
* convenient buttons for programming
* pin headers for expansion
* portable
* open source
Maximum input power
~~~~~~~~~~~~~~~~~~~
The maximum input power of HackRF One is -5 dBm. Exceeding -5 dBm can result in permanent damage!
In theory, HackRF One can safely accept up to 10 dBm with the front-end RX amplifier disabled. However, a simple software or user error could enable the amplifier, resulting in permanent damage. It is better to use an external attenuator than to risk damage.
Minimum detectable input power
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This isn't a question that can be answered for a general purpose SDR platform such as HackRF. Any answer would be very specific to a particular application. For example, an answerable question might be: What is the minimum power level in dBm of modulation M at frequency F that can be detected by HackRF One with software S under configuration C at a bit error rate of no more than E%? Changing any of those variables (M, F, S, C, or E) would change the answer to the question. Even a seemingly minor software update might result in a significantly different answer. To learn the exact answer for a specific application, you would have to measure it yourself.
HackRF's concrete specifications include operating frequency range, maximum sample rate, and dynamic range in bits. These specifications can be used to roughly determine the suitability of HackRF for a given application. Testing is required to finely measure performance in an application. Performance can typically be enhanced significantly by selecting an appropriate antenna, external amplifier, and/or external filter for the application.
Typical maximum transmit power
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF One's maximum TX power varies by operating frequency:
* 1 MHz to 10 MHz: 5 dBm to 15 dBm, generally increasing as frequency increases (see this `blog post <https://greatscottgadgets.com/2015/05-15-hackrf-one-at-1-mhz/>`__)
* 10 MHz to 2170 MHz: 5 dBm to 15 dBm, generally decreasing as frequency increases
* 2170 MHz to 2740 MHz: 13 dBm to 15 dBm
* 2740 MHz to 4000 MHz: 0 dBm to 5 dBm, decreasing as frequency increases
* 4000 MHz to 6000 MHz: -10 dBm to 0 dBm, generally decreasing as frequency increases
Through most of the frequency range up to 4 GHz, the maximum TX power is between 0 and 10 dBm. The frequency range with best performance is 2170 MHz to 2740 MHz.
Overall, the output power is enough to perform over-the-air experiments at close range or to drive an external amplifier. If you connect an external amplifier, you should also use an external bandpass filter for your operating frequency.
Before you transmit, know your laws. HackRF One has not been tested for compliance with regulations governing transmission of radio signals. You are responsible for using your HackRF One legally.

View file

@ -1,52 +0,0 @@
================================================
HackRF Pro
================================================
.. _hackrf_pro:
.. image:: ../images/hackrf-pro-preliminary-photo.jpg
:alt: HackRF Pro
HackRF Pro is the current hardware platform for the HackRF project. It is a Software Defined Radio peripheral capable of transmission or reception of radio signals from 100 kHz to 6 GHz. HackRF Pro is designed to be backwards compatible with software and hardware developed for use with
:ref:`HackRF One <hackrf_one>`,
whilst introducing many new features and improvements.
| `Product page <https://greatscottgadgets.com/hackrf/pro/>`_
| `Where to buy <https://greatscottgadgets.com/hackrf/pro/#purchasing>`_
Features
~~~~~~~~
* 100 kHz to 6 GHz operating frequency
* Tunable from 0 Hz to 7.1 GHz
* Half-duplex transceiver
* Up to 20 million samples per second
* 8-bit quadrature samples (8-bit I and 8-bit Q)
* Compatible with GNU Radio, SDR#, and more
* Software-configurable RX and TX gain and baseband filter
* Software-controlled RF port power (50 mA at 3.3 V)
* SMA RF connector
* SMA clock input and output for synchronization and triggering
* Convenient buttons for programming
* Internal pin headers for expansion
* High-Speed USB 2.0 with Type-C connector
* USB-powered
* Open source hardware
Compared to HackRF One, HackRF Pro introduces a host of new and updated features, including:
* Wider operating frequency range
* Improved RF performance with flatter frequency response
* Modern USB Type-C connector
* Built-in TCXO crystal oscillator for superior timing stability
* Logic upgrade from a CPLD to a power-efficient FPGA
* Elimination of the DC spike
* Extended-precision mode with 16-bit samples for low sample rates (typical ENOB: 9-11)
* Half-precision mode with 4-bit samples at up to 40 Msps
* More RAM and flash memory for custom firmware
* Installed shielding around the radio section
* Trigger input and output accessible through clock connectors
* Cutout in the PCB provides space for future add-ons
* Improved power management
* Enhanced RF port protection
* Facility to hardware-disable transmit mode

View file

@ -9,7 +9,6 @@ Have you done something cool with HackRF or mentioned HackRF in one of your pres
* `LEGO car <http://ossmann.blogspot.com/2013/06/hackrf-lego-car.html>`__ (Michael Ossmann)
* `wireless microphones <http://www.sharebrained.com/2013/06/15/wireless-microphones-and-hackrf/>`__ (Jared Boone)
* `Tesla Charging Port Opener <https://github.com/rgerganov/tesla-opener>`__ (Radoslav Gerganov)
* `Hacking my smart tooth brush <https://kuenzi.dev/toothbrush/>`__ (Cyrill Künzi)

View file

@ -0,0 +1,119 @@
================================================
hackrf_sweep
================================================
Usage
~~~~~
.. code-block:: sh
[-h] # this help
[-d serial_number] # Serial number of desired HackRF
[-a amp_enable] # RX RF amplifier 1=Enable, 0=Disable
[-f freq_min:freq_max] # minimum and maximum frequencies in MHz
[-p antenna_enable] # Antenna port power, 1=Enable, 0=Disable
[-l gain_db] # RX LNA (IF) gain, 0-40dB, 8dB steps
[-g gain_db] # RX VGA (baseband) gain, 0-62dB, 2dB steps
[-n num_samples] # Number of samples per frequency, 8192-4294967296
[-w bin_width] # FFT bin width (frequency resolution) in Hz
[-1] # one shot mode
[-B] # binary output
[-I] # binary inverse FFT output
-r filename # output file
Output fields
~~~~~~~~~~~~~
``date, time, hz_low, hz_high, hz_bin_width, num_samples, dB, dB, ...``
Running ``hackrf_sweep -f 2400:2490`` gives the following example results:
.. list-table ::
:header-rows: 1
:widths: 1 1 1 1 1 1 1 1 1 1 1
* - Date
- Time
- Hz Low
- Hz High
- Hz bin width
- Num Samples
- dB
- dB
- dB
- dB
- dB
* - 2019-01-03
- 11:57:34.967805
- 2400000000
- 2405000000
- 1000000.00
- 20
- -64.72
- -63.36
- -60.91
- -61.74
- -58.58
* - 2019-01-03
- 11:57:34.967805
- 2410000000
- 2415000000
- 1000000.00
- 20
- -69.22
- -60.67
- -59.50
- -61.81
- -58.16
* - 2019-01-03
- 11:57:34.967805
- 2405000000
- 2410000000
- 1000000.00
- 20
- -61.19
- -70.14
- -60.10
- -57.91
- -61.97
* - 2019-01-03
- 11:57:34.967805
- 2415000000
- 2420000000
- 1000000.00
- 20
- -72.93
- -79.14
- -68.79
- -70.71
- -82.78
* - 2019-01-03
- 11:57:34.967805
- 2420000000
- 2425000000
- 1000000.00
- 20
- -67.57
- -61.61
- -57.29
- -61.90
- -70.19
* - 2019-01-03
- 11:57:34.967805
- 2430000000
- 2435000000
- 1000000.00
- 20
- -56.04
- -59.58
- -66.24
- -66.02
- -62.12
Two ranges of 5 MHz are analyzed at once from the same set of samples, so a single timestamp applies to the whole range.
The fifth column tells you the width in Hz (1 MHz in this case) of each frequency bin, which you can set with ``-w``. The sixth column is the number of samples analyzed to produce that row of data.
Each of the remaining columns shows the power detected in each of several frequency bins. In this case there are five bins, the first from 2400 to 2401 MHz, the second from 2401 to 2402 MHz, and so forth.

View file

@ -1,139 +0,0 @@
============
HackRF Tools
============
Great Scott Gadgets provides some commandline tools for interacting with HackRF.
* **hackrf_info** Read device information from HackRF such as serial number and firmware version.
* **hackrf_transfer** Send and receive signals using HackRF. Input/output files are 8-bit signed quadrature samples.
* **hackrf_sweep**, a command-line spectrum analyzer.
* **hackrf_clock** Read and write clock input and output configuration.
* **hackrf_operacake** Configure Opera Cake antenna switch connected to HackRF.
* **hackrf_spiflash** A tool to write new firmware to HackRF. See: :ref:`Updating Firmware <updating_firmware>`.
* **hackrf_debug** Read and write registers and other low-level configuration for debugging.
hackrf_sweep
~~~~~~~~~~~~
Usage
^^^^^
.. code-block:: sh
[-h] # this help
[-d serial_number] # Serial number of desired HackRF
[-a amp_enable] # RX RF amplifier 1=Enable, 0=Disable
[-f freq_min:freq_max] # minimum and maximum frequencies in MHz
[-p antenna_enable] # Antenna port power, 1=Enable, 0=Disable
[-l gain_db] # RX LNA (IF) gain, 0-40dB, 8dB steps
[-g gain_db] # RX VGA (baseband) gain, 0-62dB, 2dB steps
[-w bin_width] # FFT bin width (frequency resolution) in Hz, 2445-5000000
[-1] # one shot mode
[-N num_sweeps] # Number of sweeps to perform
[-B] # binary output
[-I] # binary inverse FFT output
-r filename # output file
Output fields
^^^^^^^^^^^^^
``date, time, hz_low, hz_high, hz_bin_width, num_samples, dB, dB, ...``
Running ``hackrf_sweep -f 2400:2490`` gives the following example results:
.. list-table ::
:header-rows: 1
:widths: 1 1 1 1 1 1 1 1 1 1 1
* - Date
- Time
- Hz Low
- Hz High
- Hz bin width
- Num Samples
- dB
- dB
- dB
- dB
- dB
* - 2019-01-03
- 11:57:34.967805
- 2400000000
- 2405000000
- 1000000.00
- 20
- -64.72
- -63.36
- -60.91
- -61.74
- -58.58
* - 2019-01-03
- 11:57:34.967805
- 2410000000
- 2415000000
- 1000000.00
- 20
- -69.22
- -60.67
- -59.50
- -61.81
- -58.16
* - 2019-01-03
- 11:57:34.967805
- 2405000000
- 2410000000
- 1000000.00
- 20
- -61.19
- -70.14
- -60.10
- -57.91
- -61.97
* - 2019-01-03
- 11:57:34.967805
- 2415000000
- 2420000000
- 1000000.00
- 20
- -72.93
- -79.14
- -68.79
- -70.71
- -82.78
* - 2019-01-03
- 11:57:34.967805
- 2420000000
- 2425000000
- 1000000.00
- 20
- -67.57
- -61.61
- -57.29
- -61.90
- -70.19
* - 2019-01-03
- 11:57:34.967805
- 2430000000
- 2435000000
- 1000000.00
- 20
- -56.04
- -59.58
- -66.24
- -66.02
- -62.12
Each sweep across the entire specified frequency range is given a single time stamp.
The fifth column tells you the width in Hz (1 MHz in this case) of each frequency bin, which you can set with ``-w``. The sixth column is the number of samples analyzed to produce that row of data.
Each of the remaining columns shows the power detected in each of several frequency bins. In this case there are five bins, the first from 2400 to 2401 MHz, the second from 2401 to 2402 MHz, and so forth.

View file

@ -1,13 +1,11 @@
=======
Buttons
=======
====================
HackRF One's Buttons
====================
This information is applicable to both HackRF Pro and HackRF One.
The RESET button resets the microcontroller. This is a reboot that should result in a USB re-enumeration.
The **RESET button** resets the microcontroller. This is a reboot that should result in a USB re-enumeration.
The DFU button invokes a USB DFU bootloader located in the microcontroller's ROM. This bootloader makes it possible to unbrick a HackRF One with damaged firmware because the ROM cannot be overwritten.
The **DFU button** invokes a USB DFU bootloader located in the microcontroller's ROM. This bootloader makes it possible to unbrick a HackRF with damaged firmware because the ROM cannot be overwritten.
To invoke DFU mode: Press and hold the DFU button. While holding the DFU button, reset the HackRF One either by pressing and releasing the RESET button or by powering on the HackRF One. Release the DFU button.
The DFU button only invokes the bootloader during reset. This means that it can be used for other functions by custom firmware.
To invoke DFU mode: Press and hold the DFU button. While holding the DFU button, reset the HackRF either by pressing and releasing the RESET button or by powering on the HackRF. Release the DFU button.
The DFU button only invokes the bootloader during reset. This means that it can be used for other functions by custom firmware.

View file

@ -2,56 +2,18 @@
Hardware Components
================================================
Block Diagrams
~~~~~~~~~~~~~~
Major parts used in HackRF One:
HackRF Pro Block Diagram
^^^^^^^^^^^^^^^^^^^^^^^^
.. image:: ../images/block-diagram-pro.png
:align: center
|
HackRF One r1-r8 Block Diagram
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. image:: ../images/block-diagram.png
:align: center
|
HackRF One r9 Block Diagram
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. image:: ../images/block-diagram-r9.png
:align: center
|
Key Components
~~~~~~~~~~~~~~
Major parts used in HackRF:
* `MAX2831 2.3 to 2.6 GHz transceiver <https://www.analog.com/en/products/max2831.html>`__
* Used on HackRF Pro.
* `Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/MAX2831-MAX2832.pdf>`__
* `MAX2837 2.3 to 2.7 GHz transceiver <https://www.analog.com/en/products/max2837.html>`__
* Used on HackRF One (except revision r9), Jawbreaker and rad1o.
* `Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/max2837.pdf>`__
* `MAX2839 2.3 to 2.7 GHz transceiver <https://www.analog.com/en/products/max2839.html>`__
* Substitution for MAX2837, used on HackRF One revision r9.
* `Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/max2839.pdf>`__
* `MAX5864 ADC/DAC <https://www.analog.com/en/products/max5864.html>`__
* `Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/MAX5864.pdf>`__
* `MAX2837 2.3 to 2.7 GHz transceiver <https://www.maximintegrated.com/en/products/comms/wireless-rf/MAX2837.html>`__
* `Datasheet <https://datasheets.maximintegrated.com/en/ds/MAX2837.pdf>`__
* There's also a register map document that Mike received directly from Maxim. Send an email to Mike or submit a support request to Maxim if you want a copy.
* `MAX5864 ADC/DAC <http://www.maxim-ic.com/datasheet/index.mvp/id/3946/t/do>`__
* `Datasheet <http://datasheets.maxim-ic.com/en/ds/MAX5864.pdf>`__
* `Si5351 clock generator <http://www.silabs.com/products/clocksoscillators/clock-generator/Pages/lvcmos-clocks-5-outputs.aspx>`__
* `AN619: Manually Generating an Si5351 Register Map <http://www.silabs.com/Support%20Documents/TechnicalDocs/AN619.pdf>`__
* `Datasheet <http://www.silabs.com/Support%20Documents/TechnicalDocs/Si5351.pdf>`__ - see AN619 for the complete register map.
* `Datasheet <http://www.silabs.com/Support%20Documents/TechnicalDocs/Si5351.pdf>`__ - this document is a mess of typos, and best used in conjunction with AN619, which has its own typos. Usually, you can reconcile what's true by comparison and a bit of thought.
* `Other Documentation <http://www.silabs.com/products/clocksoscillators/clock-generators-and-buffers/Pages/clock+vcxo.aspx>`__ - includes application notes, user guides, and white papers.
* `ice40 UltraPlus FPGA <https://www.latticesemi.com/en/Products/FPGAandCPLD/iCE40UltraPlus>`__ (HackRF Pro)
* CoolRunner-II CPLD (all other platforms)
* CoolRunner-II CPLD
* `LPC43xx ARM Cortex-M4 microcontroller <http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-arm-cortex-m-mcus/lpc-dual-core-cortex-m0-m4f/lpc4300:MC_1403790133078>`__
* `User Manual <http://www.nxp.com/documents/user_manual/UM10503.pdf>`__
* `Datasheet <http://www.nxp.com/documents/data_sheet/LPC4350_30_20_10.pdf>`__
@ -61,5 +23,13 @@ Major parts used in HackRF:
* `RFFC5072 mixer/synthesizer <http://www.rfmd.com/store/rffc5072-1.html>`__
* `Datasheet <http://www.rfmd.com/CS/Documents/RFFC5071_2DS.pdf>`__
* `Other Documentation <http://www.rfmd.com/store/rffc5072-1.html>`__ ; click "Technical Documents" - includes programming guides and application notes.
* `W25Q32 32M-bit Flash <https://www.winbond.com/resource-files/W25Q32JV%20RevJ%2012242024%20Plus.pdf>`__ (HackRF Pro)
* `W25Q80BV 8M-bit Flash <https://www.winbond.com/resource-files/w25q80bv%20revk%2020151203.pdf>`__ (all other platforms)
* `W25Q80BV 8M-bit Flash <https://www.winbond.com/resource-files/w25q80bv%20revk%2020151203.pdf>`__
Block Diagram
~~~~~~~~~~~~~
.. image:: ../images/block-diagram.png
:align: center

View file

@ -1,61 +1,35 @@
.. _hardware_triggering:
===================
Hardware Triggering
===================
HackRF transmit and receive operations can be synchronized with another HackRF or with other external equipment by using the trigger input and output. Triggering provides time synchronization with error of less than one sample period.
HackRF One transmit and receive operations can be synchronized with another HackRF One or with other external equipment by using the trigger input and output on pin header P28. Triggering provides time synchronization with error of less than one sample period.
HackRF Pro has two configurable SMA ports, P1 and P2, which can be set up to provide both clock synchronization and triggering.
HackRF One has CLKIN and CLKOUT ports for clock synchronization, but hardware triggering requires opening the case to access the P28 header.
Clock Synchronization
~~~~~~~~~~~~~~~~~~~~~
When triggering one HackRF from another, it is often desirable to first ensure that the two devices share a common frequency reference. This has an added benefit of grounding the HackRFs to each other, eliminating one of the wires required for triggering. See :ref:`External Clock Interface <external_clock_interface>` for instructions.
When triggering one HackRF One from another, it is often desirable to first ensure that the two devices share a common frequency reference. This has an added benefit of grounding the HackRFs to each other, eliminating one of the wires required for triggering. See :ref:`External Clock Interface <external_clock_interface>` for instructions.
Either HackRF may serve as the clock source for the other regardless of which is providing the trigger output.
Usage
~~~~~
Use ``hackrf_info`` to discover the serial numbers of both HackRFs. Using the serial number of the HackRF to be triggered, use ``hackrf_transfer -H`` to set up a triggered operation. For example:
* ``hackrf_transfer -H -d <serial number> -a 0 -l 32 -g 32 -r rx1.cs8``
The command will print "Waiting for trigger..." until a trigger signal is detected on the device's trigger input.
In another terminal, use the serial number of the triggering HackRF One to initiate an operation to take place at the same time as the triggered operation. For example:
* ``hackrf_transfer -d <serial number> -a 0 -l 32 -g 32 -r rx2.cs8``
Note that no special argument is required to activate the trigger output.
Both ``hackrf_transfer`` commands will start sampling RF signals at the same time, accurate to less than one sample period.
Either HackRF One may serve as the clock source for the other regardless of which is providing the trigger output.
Additional Devices
~~~~~~~~~~~~~~~~~~
Multiple HackRFs may be triggered by a single HackRF. Ensure that all the devices share a common ground and then connect one device's trigger output to the trigger inputs of the other devices (with jumpers connected via a breadboard, for example).
Equipment other than a HackRF may be connected to a HackRF's trigger input or output. The trigger signal is a 3.3 V pulse that triggers on the rising edge.
HackRF One Triggering Requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Requirements
~~~~~~~~~~~~
To connect two HackRF Ones for triggering you will need:
* a male-to-male jumper wire for 0.1" pin headers
* an SMA cable for clock synchronization or a second jumper wire
.. _open_your_hackrf_one:
Open Your HackRF One
~~~~~~~~~~~~~~~~~~~~
If your HackRF Ones are not bare boards, you will need to open up their cases to access the pin headers on the HackRF Ones. Each HackRF One case has small plastic clips holding it together. These clips may be damaged when the case is opened, but typically the case can still be used after such damage. Please follow the instructions in `this video <https://www.youtube.com/watch?v=zuXJtpTSEJM>`__ by `Jared Boone <https://twitter.com/sharebrained>`__ to open your HackRF One cases.
The HackRF One case has small plastic clips holding it together. These may be damaged when the case is opened, but typically the case can still be used after such damage. Please follow the instructions in `this video <https://www.youtube.com/watch?v=zuXJtpTSEJM>`__ by `Jared Boone <https://twitter.com/sharebrained>`__.
Open the enclosures of both HackRF Ones to access their pin headers.
Identify the Trigger Pins
@ -75,6 +49,32 @@ First ensure that the two devices share a common ground. This may be accomplishe
Next use a jumper wire to connect P28 pin 15 (trigger output) on one HackRF One to P28 pin 16 (trigger input) on the other HackRF One.
Usage
~~~~~
Use ``hackrf_info`` to discover the serial numbers of both HackRF Ones. Using the serial number of the HackRF One to be triggered, use ``hackrf_transfer -H`` to set up a triggered operation. For example:
* ``hackrf_transfer -H -d <serial number> -a 0 -l 32 -g 32 -r rx1.cs8``
The command will print "Waiting for trigger..." until a trigger signal is detected on the device's trigger input.
In another terminal, use the serial number of the triggering HackRF One to initiate an operation to take place at the same time as the triggered operation. For example:
* ``hackrf_transfer -d <serial number> -a 0 -l 32 -g 32 -r rx2.cs8``
Note that no special argument is required to activate the trigger output.
Both ``hackrf_transfer`` commands will start sampling RF signals at the same time, accurate to less than one sample period.
Additional Devices
~~~~~~~~~~~~~~~~~~
Multiple HackRF Ones may be triggered by a single HackRF One. Ensure that all the devices share a common ground and then connect one device's trigger output to the trigger inputs of the other devices (with jumpers connected via a breadboard, for example).
Equipment other than a HackRF One may be connected to a HackRF One's trigger input or output. The trigger signal is a 3.3 V pulse that triggers on the rising edge.
References
~~~~~~~~~~

View file

@ -6,36 +6,24 @@ Welcome to HackRF's documentation!
:maxdepth: 2
:caption: User Documentation
getting_help
hackrf_one
jawbreaker
opera_cake
faq
troubleshooting
synchronization_checklist
getting_help
tips_tricks
hackrf_projects_mentions
.. toctree::
:maxdepth: 2
:caption: Hardware Platforms
:caption: Software
hackrf_pro
hackrf_one
rad1o
jawbreaker
.. toctree::
:maxdepth: 2
:caption: Hardware Information
hackrf_minimum_requirements
list_of_hardware_revisions
hardware_components
leds
hackrfs_buttons
hackrf_connectors
external_clock_interface
expansion_interface
hardware_triggering
enclosure_options
usb_cables
rf_shield_installation
installing_hackrf_software
getting_started_hackrf_gnuradio
software_support
libhackrf_api
hackrf_sweep
.. toctree::
:maxdepth: 2
@ -48,31 +36,13 @@ Welcome to HackRF's documentation!
.. toctree::
:maxdepth: 2
:caption: Software
:caption: Hardware
installing_hackrf_software
hackrf_tools
software_support
sampling_rate
setting_gain
virtual_machines
.. toctree::
:maxdepth: 2
:caption: Gateware
gateware
.. toctree::
:maxdepth: 2
:caption: Opera Cake Documentation
opera_cake
opera_cake_faq
opera_cake_hardware
opera_cake_board_addressing
opera_cake_port_configuration
opera_cake_modes_of_operation
list_of_hardware_revisions
hardware_components
enclosure_options
hackrfs_buttons
external_clock_interface
expansion_interface
hardware_triggering
rf_shield_installation

View file

@ -1,12 +1,8 @@
.. _operating_system_tips:
==========================
================================================
Installing HackRF Software
==========================
HackRF software includes HackRF Tools and libhackrf. HackRF Tools are the commandline utilities that let you interact with your HackRF. libhackrf is a low level library that enables software on your computer to operate with HackRF.
================================================
Install Using Package Managers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -62,23 +58,17 @@ OS X (10.5+): MacPorts
Windows: Binaries
+++++++++++++++++
Windows users can use `radioconda <https://github.com/ryanvolz/radioconda>`__ to get the required binaries installed.
Alternatively, binaries are available as build artifacts under the 'Actions'-tab on github `here <https://github.com/greatscottgadgets/hackrf/actions>`__ (GitHub Login needed).
Binaries are provided as part of the PothosSDR project, they can be downloaded `here <http://downloads.myriadrf.org/builds/PothosSDR/?C=M;O=D>`__.
-----------
Installing From Source
~~~~~~~~~~~~~~~~~~~~~~
Linux / OS X / \*BSD: Building HackRF Software From Source
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acquire the source for the HackRF tools from either a `release archive <https://github.com/greatscottgadgets/hackrf/releases>`__ or git: ``git clone https://github.com/greatscottgadgets/hackrf.git``
Acquire the source for the HackRF tools from either a `release archive <https://github.com/mossmann/hackrf/releases>`__ or git: ``git clone https://github.com/mossmann/hackrf.git``
Once you have the source downloaded, the host tools can be built as follows:
@ -94,32 +84,60 @@ Once you have the source downloaded, the host tools can be built as follows:
If you have HackRF hardware, you may need to :ref:`update the firmware <updating_firmware>` to match the host tools versions.
Windows: Building HackRF Software From Source
Windows: Prerequisites for Cygwin, MinGW, or Visual Studio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* cmake-2.8.12.1 or later from http://www.cmake.org/cmake/resources/software.html
* libusbx-1.0.18 or later from http://sourceforge.net/projects/libusbx/files/latest/download?source=files
* fftw-3.3.5 or later from http://www.fftw.org/install/windows.html
* Install Windows driver for HackRF hardware or use Zadig see http://sourceforge.net/projects/libwdi/files/zadig
* If you want to use Zadig select HackRF USB device and just install/replace it with WinUSB driver.
Note for Windows build: You shall always execute hackrf-tools from Windows command shell and not from Cygwin or MinGW shell because on Cygwin/MinGW Ctrl+C is not managed correctly and especially for hackrf_transfer the Ctrl+C (abort) will not stop correctly and will corrupt the file.
Windows: Installing HackRF Software via Cygwin
++++++++++++++++++++++++++++++++++++++++++++++
.. code-block :: sh
mkdir host/build
cd host/build
cmake ../ -G "Unix Makefiles" -DCMAKE_LEGACY_CYGWIN_WIN32=1 -DLIBUSB_INCLUDE_DIR=/usr/local/include/libusb-1.0/
make
make install
Windows: Installing HackRF Software via MinGW
+++++++++++++++++++++++++++++++++++++++++++++
Install `Visual Studio Community <https://visualstudio.microsoft.com/vs/community/>`__ (2015 or later) and `CMake <https://cmake.org/>`__ (at least version 3.21.4).
.. code-block :: sh
Install library dependencies using `vcpkg <https://vcpkg.io/en/>`__:
mkdir host/build
cd host/build
cmake ../ -G "MSYS Makefiles" -DLIBUSB_INCLUDE_DIR=/usr/local/include/libusb-1.0/
make
make install
.. code-block :: winbatch
git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat
vcpkg install libusb fftw3 pthreads pkgconf
Open the Visual Studio Developer Command Prompt, and change to the directory where you unpacked the HackRF source.
Windows: Installing HackRF Software via Visual Studio 2015 x64
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The following steps assume you installed vcpkg in ``C:\vcpkg``.
Create library definition for MSVC to link to ``C:\fftw-3.3.5-dll64> lib /machine:x64 /def:libfftw3f-3.def``
Configure CMake and build the code:
.. code-block :: sh
.. code-block :: winbatch
c:\hackrf\host\build> cmake ../ -G "Visual Studio 14 2015 Win64" \
-DLIBUSB_INCLUDE_DIR=c:\libusb-1.0.21\libusb \
-DLIBUSB_LIBRARIES=c:\libusb-1.0.21\MS64\dll\lib\libusb-1.0.lib \
-DTHREADS_PTHREADS_INCLUDE_DIR=c:\pthreads-w32-2-9-1-release\Pre-built.2\include \
-DTHREADS_PTHREADS_WIN32_LIBRARY=c:\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64\pthreadVC2.lib \
-DFFTW_INCLUDES=C:\fftw-3.3.5-dll64 \
-DFFTW_LIBRARIES=C:\fftw-3.3.5-dll64\libfftw3f-3.lib
set PKG_CONFIG=C:\vcpkg\installed\x64-windows\tools\pkgconf\pkgconf.exe
set PKG_CONFIG_PATH=C:\vcpkg\installed\x64-windows\lib\pkgconfig
set CMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake -B host\build host
cmake --build host\build
CMake will generate a ``HackRF.sln`` project file which you can open in Visual Studio for editing and development.
CMake will produce a solution file named ``HackRF.sln`` and a series of project files which can be built with msbuild as follows: ``c:\hackrf\host\build> msbuild HackRF.sln``

View file

@ -1,16 +1,10 @@
==========
================================================
Jawbreaker
==========
================================================
HackRF Jawbreaker is the beta test hardware platform for the HackRF project.
.. image:: ../images/jawbreaker.JPG
:alt: Jawbreaker
(Jawbreaker picture provided by `fd0 <https://github.com/fd0>`__ with Creative Commons License CC BY 3.0.)
Features
~~~~~~~~
@ -26,48 +20,53 @@ Features
Hardware Documentation
~~~~~~~~~~~~~~~~~~~~~~
Set your Jawbreaker Free!
~~~~~~~~~~~~~~~~~~~~~~~~~
Schematic diagram, assembly diagram, and bill of materials can be found at `https://github.com/greatscottgadgets/hackrf/tree/master/hardware <https://github.com/greatscottgadgets/hackrf/tree/master/hardware>`__
Jawbreaker has an SMA antenna connector but also includes a built-in PCB antenna intended for operation near 900 MHz. It isn't a very good antenna. Seriously. A paperclip stuck into the SMA connector would probably be better. You can free your Jawbreaker to operate with better antennas by cutting the PCB trace to the PCB antenna with a knife. This enables the SMA connector to be used without interference from the PCB antenna.
A video that demonstrates the antenna modification is on YouTube: `HackRF Antenna Modification <http://youtu.be/B2gwgNoqMxI>`__
The trace to be cut is between the two solder pads inside a box labeled R44 in the `assembly diagram <https://github.com/mossmann/hackrf/blob/master/doc/hardware/jawbreaker-assembly.pdf?raw=true>`__. There is an arrow pointing to it printed on the board.
Transmit Power
~~~~~~~~~~~~~~
Due to a manufacturing error, there is solder on R44. R44 may appear as a single solder blob. If you have a soldering iron and solder wick/braid, use a soldering iron and fine solder wick to remove as much solder as you can from the two R44 pads. Then, use a pen knife to gently cut away the area between the two R44 pads. Make multiple, gentle cuts, instead of one or two forceful cuts. As you cut, you'll break through the black solder mask, then the copper trace between the pads, and stop when you reach fiberglass. Remove the copper trace completely, so just the two R44 pads remain. Use a multimeter or continuity tester to verify that the two R44 pads are no longer connected.
The maximum TX power for Jawbreaker varies by operating frequency:
If you don't have a soldering iron, you can cut through the copper trace and the solder blob all at once, but it requires a bit more effort.
* 30 MHz to 100 MHz: 5 dBm to 15 dBm, increasing as frequency decreases
* 100 MHz to 2300 MHz: 0 dBm to 10 dBm, increasing as frequency decreases
* 2170 MHz to 2740 MHz: 10 dBm to 15 dBm
* 2700 MHz to 4000 MHz: -5 dBm to 5 dBm, increasing as frequency decreases
* 4000 MHz to 6000 MHz: -15 dBm to 0 dBm, increasing as frequency decreases
The only reason not to do this is if you want to try Jawbreaker but don't have any antenna with an SMA connector (or adapter).
Overall, the output power is enough to perform over-the-air experiments at close range or to drive an external amplifier. If you connect an external amplifier, you should also use an external bandpass filter for your operating frequency.
Before you transmit, know the laws for the region you are transmitting in. Jawbreaker has not been tested for compliance with regulations governing transmission of radio signals. You are responsible for using your Jawbreaker legally.
If you want to restore the PCB antenna for some reason, you can install a 10 nF capacitor or a 0 ohm resistor on the R44 pads or you may be able to simply create a solder bridge.
SMA, not RP-SMA
~~~~~~~~~~~~~~~
The connectors on Jawbreaker are SMA, not RP-SMA. SMA connectors and RP-SMA connectors look extremely similar, the difference is that SMA connectors have a center pin. RP-SMA connectors are common on 2.4 GHz antennas and are popular on Wi-Fi equipment. If you connect an RP-SMA antenna to Jawbreaker, it will seem to connect snugly but won't function at all because neither the male nor female side has a center pin.
Some connectors that appear to be SMA are actually RP-SMA. If you connect an RP-SMA antenna to Jawbreaker, it will seem to connect snugly but won't function at all because neither the male nor female side has a center pin. RP-SMA connectors are most common on 2.4 GHz antennas and are popular on Wi-Fi equipment.
Recommended PCB and Antenna Changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Transmit Power
~~~~~~~~~~~~~~
Jawbreaker has an SMA antenna connector and it also includes a built-in PCB antenna intended for operation near 900 MHz. The built-in PCB antenna isn't a very good antenna. A paperclip stuck into the SMA connector of the Jawbreaker is likely to be better. We recommend that you free your Jawbreaker to operate with better antennas by cutting the PCB trace to the PCB antenna with a knife. This enables the SMA connector to be used without interference from the PCB antenna.
The maximum TX power varies by operating frequency:
* 30 MHz to 100 MHz: 5 dBm to 15 dBm, increasing as frequency decreases
* 100 MHz to 2300 MHz: 0 dBm to 10 dBm, increasing as frequency decreases
* 2300 MHz to 2700 MHz: 10 dBm to 15 dBm
* 2700 MHz to 4000 MHz: -5 dBm to 5 dBm, increasing as frequency decreases
* 4000 MHz to 6000 MHz: -15 dBm to 0 dBm, increasing as frequency decreases
Overall, the output power is enough to perform over-the-air experiments at close range or to drive an external amplifier. If you connect an external amplifier, you should also use an external bandpass filter for your operating frequency.
Before you transmit, know your laws. Jawbreaker has not been tested for compliance with regulations governing transmission of radio signals. You are responsible for using your Jawbreaker legally.
The trace to be cut is between the two solder pads inside a box labeled R44. There is an arrow printed on the board that points to the R44 box. A video that demonstrates the antenna modification is on YouTube: `HackRF Antenna Modification <http://youtu.be/B2gwgNoqMxI>`__.
Due to a manufacturing error, there is solder on the pads in box R44 that you should try to remove before you cut the trace. R44 may appear as a single solder blob. If you have a soldering iron and solder wick/braid, use a soldering iron and fine solder wick to remove as much solder as you can from the two R44 pads. Then, use a pen knife to gently cut away the area between the two R44 pads. Make multiple, gentle cuts, instead of one or two forceful cuts. As you cut, you'll break through the black solder mask, then the copper trace between the pads, and stop when you reach fiberglass. Remove the copper trace completely, so just the two R44 pads remain. Use a multimeter or continuity tester to verify that the two R44 pads are no longer connected. If you don't have a soldering iron, you can cut through the copper trace and the solder blob all at once, but it requires a bit more effort. The only reason not to cut the PCB trace is if you want to try Jawbreaker but don't have any antenna with an SMA connector (or adapter).
Hardware Documentation
~~~~~~~~~~~~~~~~~~~~~~
If you want to restore the PCB antenna for some reason, you can install a 10 nF capacitor or a 0 ohm resistor on the R44 pads or you may be able to simply create a solder bridge.
Schematic diagram, assembly diagram,and bill of materials can be found at `https://github.com/mossmann/hackrf/tree/master/doc/hardware <https://github.com/mossmann/hackrf/tree/master/doc/hardware>`__
@ -537,14 +536,14 @@ Cut P17 short (trace) to enable external clock input. If short is cut, a jumper
More
^^^^
Additional headers are available. See the `board files <https://github.com/greatscottgadgets/hackrf/tree/master/hardware/jawbreaker>`__ for additional details.
Additional headers are available. See the `board files <https://github.com/mossmann/hackrf/tree/master/hardware/jawbreaker>`__ for additional details.
Differences between Jawbreaker and HackRF One
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jawbreaker was the beta platform that preceded HackRF One. HackRF One incorporates the following changes and enhancements (at minimum):
Jawbreaker was the beta platform that preceded HackRF One. HackRF One incorporates the following changes and enhancements:
* Antenna port: No modification is necessary to use the SMA antenna port on HackRF One.
* PCB antenna: Removed.
@ -557,5 +556,5 @@ Jawbreaker was the beta platform that preceded HackRF One. HackRF One incorporat
* Real-Time Clock: An RTC is installed on HackRF One.
* LPC4320 microcontroller: Jawbreaker had an LPC4330.
* RF shield footprint: An optional shield may be installed over HackRF One's RF section.
* Antenna port power: HackRF One can supply up to 50 mA at 3.0 to 3.3 V DC on the antenna port for compatibility with powered antennas and other low power amplifiers.
* Antenna port power: HackRF One can supply up to 50 mA at 3.3 V DC on the antenna port for compatibility with powered antennas and other low power amplifiers.
* Enhanced frequency range: The RF performance of HackRF One is better than Jawbreaker, particularly at the high and low ends of the operating frequency range. HackRF One can operate at 1 MHz or even lower.

View file

@ -1,20 +0,0 @@
====
LEDs
====
HackRF Pro
~~~~~~~~~~
When HackRF Pro is plugged in to a USB host, four LEDs should turn on: MCU, FPGA, RF, and USB. The MCU LED indicates that the primary internal power supply is working properly and that firmware is running. The FPGA and RF LEDs indicate that firmware has switched on additional internal power supplies. The USB LED indicates that the HackRF Pro is communicating with the host over USB.
HackRF One
~~~~~~~~~~
When HackRF One is plugged in to a USB host, four LEDs should turn on: 3V3, 1V8, RF, and USB. The 3V3 LED indicates that the primary internal power supply is working properly. The 1V8 and RF LEDs indicate that firmware is running and has switched on additional internal power supplies. The USB LED indicates that the HackRF One is communicating with the host over USB.
Both versions
~~~~~~~~~~~~~
The RX and TX LEDs indicate that a receive or transmit operation is currently in progress.
Each LED is a single color. There are no multi-colored LEDs on either HackRF One or HackRF Pro. Adjacent LEDs are different colors in order to make them easier to distinguish from one another. The colors do not mean anything.

View file

@ -0,0 +1,568 @@
================================================
libhackRF API
================================================
This document describes the functions, data structures and constants that libHackRF provides. It should be used as a reference for using libHackRF and the HackRF hardware.
If you are writing a generic SDR application, i.e. not tied to the HackRF hardware, we strongly recommend that you use either gr-osmosdr or SoapySDR to provide support for the broadest possible range of software defined radio hardware.
For example usage of many of these functions, see the `hackrf_transfer <https://github.com/mossmann/hackrf/blob/master/host/hackrf-tools/src/hackrf_transfer.c>`__ tool.
Setup, Initialization and Shutdown
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF Init
^^^^^^^^^^^
Initialize libHackRF, including global libUSB context to support multiple HackRF hardware devices.
**Syntax:** ``int hackrf_init()``
**Returns:** A value from the hackrf_error constants listed below.
HackRF Open
^^^^^^^^^^^
**Syntax:** ``int hackrf_open(hackrf_device** device)``
**Returns:** A value from the hackrf_error constants listed below.
HackRF Device List
^^^^^^^^^^^^^^^^^^
Retrieve a list of HackRF devices attached to the system. This function finds all devices, regardless of permissions or availability of the hardware.
**Syntax:** ``hackrf_device_list_t* hackrf_device_list()``
**Returns:** A pointer to a hackrf_device_list_t struct, a list of HackRF devices attached to the system. The contents of the hackrf_device_list_t struct are decribed in the data structures section below.
HackRF Device List Open
^^^^^^^^^^^^^^^^^^^^^^^
Open and acquire a handle on a device from the hackrf_device_list_t struct.
**Syntax:** ``int hackrf_device_list_open(hackrf_device_list_t* list, int idx, hackrf_device** device)``
**Params:**
``list`` - A pointer to a hackrf_device_list_t returned by ``hackrf_device_list()``
``idx`` - The list index of the HackRF device to open
``device`` - Output location for hackrf_device pointer. Only valid when return value is HACKRF_SUCCESS.
**Returns:** A value from the hackrf_error constants listed below.
HackRF Device List Free
^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``void hackrf_device_list_free(hackrf_device_list_t* list)``
**Params:**
``list`` - A pointer to a hackrf_device_list_t returned by ``hackrf_device_list()``
HackRF Open By Serial
^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_open_by_serial(const char* const desired_serial_number, hackrf_device** device)``
**Returns:**
HackRF Close
^^^^^^^^^^^^
**Syntax:** ``int hackrf_close(hackrf_device* device)``
**Returns:** A value from the hackrf_error constants listed below.
HackRF Exit
^^^^^^^^^^^
Cleanly shutdown libHackRF and the underlying USB context. This does not stop in progress transfers or close the HackRF hardware. ``hackrf_close()`` should be called before this to cleanly close the connection to the hardware.
**Syntax:** ``int hackrf_exit()``
**Returns:** A value from the hackrf_error constants listed below.
Using the Radio
~~~~~~~~~~~~~~~
HackRF Start Rx
^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_start_rx(hackrf_device*, hackrf_sample_block_cb_fn, void* rx_ctx)``
**Params:**
**Returns:** A value from the hackrf_error constants listed below.
HackRF Stop Rx
^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_stop_rx(hackrf_device*)``
**Params:**
**Returns:** A value from the hackrf_error constants listed below.
HackRF Start Tx
^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_start_tx(hackrf_device*, hackrf_sample_block_cb_fn, void* tx_ctx)``
**Params:**
**Returns:** A value from the hackrf_error constants listed below.
HackRF Stop Tx
^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_stop_tx(hackrf_device*)``
**Params:**
**Returns:** A value from the hackrf_error constants listed below.
HackRF Set Baseband Filter Bandwidth
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_set_baseband_filter_bandwidth(hackrf_device*, const uint32_t bandwidth_hz)``
**Params:**
**Returns:** A value from the hackrf_error constants listed below.
HackRF Compute Baseband Filter BW
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compute best default value depending on sample rate (auto filter).
**Syntax:** ``uint32_t hackrf_compute_baseband_filter_bw(const uint32_t bandwidth_hz)``
**Params:**
**Returns:** A valid baseband filter width available from the Maxim MAX2837 frontend used by the radio.
HackRF Compute Baseband Filter BW Round Down LT
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compute nearest freq for bw filter (manual filter)
**Syntax:** ``uint32_t hackrf_compute_baseband_filter_bw_round_down_lt(const uint32_t bandwidth_hz)``
**Params:**
**Returns:** A valid baseband filter width available from the Maxim MAX2837 frontend used by the radio.
Reading and Writing Registers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF MAX2837 Read
^^^^^^^^^^^^^^^^^^^
Read register values from the MAX2837 Baseband IC.
**Syntax:** ``int hackrf_max2837_read(hackrf_device* device, uint8_t register_number, uint16_t* value)``
**Params:**
**Returns:**
HackRF MAX2837 Write
^^^^^^^^^^^^^^^^^^^^
Write register values to the MAX2837 Baseband IC.
**Syntax:** ``int hackrf_max2837_write(hackrf_device* device, uint8_t register_number, uint16_t value)``
**Params:**
**Returns:**
HackRF Si5351C Read
^^^^^^^^^^^^^^^^^^^
Read register values from the Si5351C clock generator IC.
**Syntax:** ``int hackrf_si5351c_read(hackrf_device* device, uint16_t register_number, uint16_t* value)``
**Params:**
**Returns:**
HackRF Si5351C Write
^^^^^^^^^^^^^^^^^^^^
Write register values to the Si5351C clock generator IC.
**Syntax:** ``int hackrf_si5351c_write(hackrf_device* device, uint16_t register_number, uint16_t value)``
**Params:**
**Returns:**
HackRF RFFC5071 Read
^^^^^^^^^^^^^^^^^^^^
Read register values from the RFFC5071 mixer IC.
**Syntax:** ``int hackrf_rffc5071_read(hackrf_device* device, uint8_t register_number, uint16_t* value)``
**Params:**
**Returns:**
HackRF RFFC5071 Write
^^^^^^^^^^^^^^^^^^^^^
Write register values to the RFFC5071 mixer IC.
**Syntax:** ``int hackrf_rffc5071_write(hackrf_device* device, uint8_t register_number, uint16_t value)``
**Params:**
**Returns:**
Updating Firmware
~~~~~~~~~~~~~~~~~
HackRF CPLD Write
^^^^^^^^^^^^^^^^^
Device will need to be reset after hackrf_cpld_write.
**Syntax:** ``int hackrf_cpld_write(hackrf_device* device, unsigned char* const data, const unsigned int total_length)``
**Params:**
**Returns:**
HackRF SPI Flash Erase
^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_spiflash_erase(hackrf_device* device)``
**Params:**
**Returns:**
HackRF SPI Flash Write
^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_spiflash_write(hackrf_device* device, const uint32_t address, const uint16_t length, unsigned char* const data)``
**Params:**
**Returns:**
HackRF SPI Flash Read
^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_spiflash_read(hackrf_device* device, const uint32_t address, const uint16_t length, unsigned char* data)``
**Params:**
**Returns:**
Board Identifiers
~~~~~~~~~~~~~~~~~
HackRF Board ID Read
^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_board_id_read(hackrf_device* device, uint8_t* value)``
**Params:**
**Returns:**
HackRF Version String Read
^^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_version_string_read(hackrf_device* device, char* version, uint8_t length)``
**Params:**
**Returns:**
HackRF Board Part ID Serial Number Read
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_board_partid_serialno_read(hackrf_device* device, read_partid_serialno_t* read_partid_serialno)``
**Params:**
**Returns:**
Miscellaneous
~~~~~~~~~~~~~
HackRF Error Name
^^^^^^^^^^^^^^^^^
**Syntax:** ``const char* hackrf_error_name(enum hackrf_error errcode)``
**Params:**
**Returns:**
HackRF Board ID Name
^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``const char* hackrf_board_id_name(enum hackrf_board_id board_id)``
**Params:**
**Returns:**
HackRF USB Board ID Name
^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``const char* hackrf_usb_board_id_name(enum hackrf_usb_board_id usb_board_id)``
**Params:**
**Returns:**
HackRF Filter Path Name
^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``const char* hackrf_filter_path_name(const enum rf_path_filter path)``
**Params:**
**Returns:**
Data Structures
~~~~~~~~~~~~~~~
``typedef struct hackrf_device hackrf_device``
.. code-block :: sh
typedef struct {
hackrf_device* device;
uint8_t* buffer;
int buffer_length;
int valid_length;
void* rx_ctx;
void* tx_ctx;
} hackrf_transfer;
.. code-block :: sh
typedef struct {
uint32_t part_id[2];
uint32_t serial_no[4];
} read_partid_serialno_t;
.. code-block :: sh
typedef struct {
char **serial_numbers;
enum hackrf_usb_board_id *usb_board_ids;
int *usb_device_index;
int devicecount;
void **usb_devices;
int usb_devicecount;
} hackrf_device_list_t;
``typedef int (*hackrf_sample_block_cb_fn)(hackrf_transfer* transfer)``
Enumerations
~~~~~~~~~~~~
Supported board versions
^^^^^^^^^^^^^^^^^^^^^^^^
These values identify the board type of the connected hardware. This value can be used as an indicator of capabilities, such as frequency range, bandwidth or antenna port power.
.. list-table ::
:header-rows: 1
:widths: 1 1 1 1
* - Board
- Frequency range
- Bandwidth
- Antenna port power
* - HackRF One
- 1MHz - 6Ghz
- 20MHz
- Yes
* - Jawbreaker
- 10MHz - 6GHz
- 20MHz
- No
* - Rad1o
- 50MHz - 4GHz
- 20MHz
- Unknown
* - Jellybean
- N/A
- 20MHz
- No
Most boards will identify as HackRF One, Jawbreaker or Rad1o. Jellybean was a pre-production revision of HackRF. No hardware device should intentionally report itself with an invalid board ID.
.. code-block :: sh
enum hackrf_board_id {
BOARD_ID_JELLYBEAN = 0,
BOARD_ID_JAWBREAKER = 1,
BOARD_ID_HACKRF_ONE = 2,
BOARD_ID_RAD1O = 3,
BOARD_ID_INVALID = 0xFF,
};
USB Product IDs
^^^^^^^^^^^^^^^
.. code-block :: sh
enum hackrf_usb_board_id {
USB_BOARD_ID_JAWBREAKER = 0x604B,
USB_BOARD_ID_HACKRF_ONE = 0x6089,
USB_BOARD_ID_RAD1O = 0xCC15,
USB_BOARD_ID_INVALID = 0xFFFF,
};
Transceiver Mode
^^^^^^^^^^^^^^^^
HackRF can operate in three main transceiver modes, Receive, Transmit and Signal Source. There is also a CPLD update mode which is used to write firmware images to the CPLD.
The transceiver mode can be changed with ``hackrf_set_transceiver_mode`` with the value parameter set to one of the following:
.. code-block:: sh
enum transceiver_mode_t {
TRANSCEIVER_MODE_OFF = 0,
TRANSCEIVER_MODE_RX = 1,
TRANSCEIVER_MODE_TX = 2,
TRANSCEIVER_MODE_SS = 3,
TRANSCEIVER_MODE_CPLD_UPDATE = 4
};
Receive mode (TRANSCEIVER_MODE_RX) is used to stream samples from the radio to the host system. Use ``hackrf_set_freq`` to set the center frequency of receiver and ``hackrf_set_sample_rate`` to set the sample rate (effective bandwidth).
Transmit mode (TRANSCEIVER_MODE_TX) is used to stream samples from the host to the radio.
See `hackrf_transfer <https://github.com/mossmann/hackrf/blob/master/host/hackrf-tools/src/hackrf_transfer.c>`__ for an example of setting transmit and receive mode and transferring data over USB.
Function return values
^^^^^^^^^^^^^^^^^^^^^^
.. code-block::sh
enum hackrf_error {
HACKRF_SUCCESS = 0,
HACKRF_TRUE = 1,
HACKRF_ERROR_INVALID_PARAM = -2,
HACKRF_ERROR_NOT_FOUND = -5,
HACKRF_ERROR_BUSY = -6,
HACKRF_ERROR_NO_MEM = -11,
HACKRF_ERROR_LIBUSB = -1000,
HACKRF_ERROR_THREAD = -1001,
HACKRF_ERROR_STREAMING_THREAD_ERR = -1002,
HACKRF_ERROR_STREAMING_STOPPED = -1003,
HACKRF_ERROR_STREAMING_EXIT_CALLED = -1004,
HACKRF_ERROR_OTHER = -9999,
};
RF Filter Path
^^^^^^^^^^^^^^
.. code-block:: sh
enum rf_path_filter {
RF_PATH_FILTER_BYPASS = 0,
RF_PATH_FILTER_LOW_PASS = 1,
RF_PATH_FILTER_HIGH_PASS = 2,
};

View file

@ -1,55 +1,33 @@
================================================
Hardware Revisions
List of Hardware Revisions
================================================
Hardware revisions exist mainly to deal with changes in component availability. Each revision of a product meets the same performance specifications that are measured in the factory.
HackRF Pro
~~~~~~~~~~
The initial production revision of HackRF Pro is r1.2.1.
HackRF One
~~~~~~~~~~
HackRF One r1r4
^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~
The first revision of HackRF One shipped by Great Scott Gadgets starting in 2014 was labeled r1. Subsequent manufacturing runs incremented the revision number up to r4 without modification to the hardware design. Manufacturing years: 20142020
HackRF One r5
^^^^^^^^^^^^^
~~~~~~~~~~~~~
This experimental revision has not been manufactured.
HackRF One r6
^^^^^^^^^^^^^
~~~~~~~~~~~~~
SKY13350 RF switches were replaced by SKY13453. Although the SKY13453 uses simplified control logic, it did not require a firmware modification. Hardware revision detection pin straps were added. Manufacturing year: 2020
SKY13350 RF switches were replaced by SKY13453 due to component availability. Although the SKY13453 uses simplified control logic, it did not require a firmware modification. Manufacturing year: 2020
HackRF One r7
^^^^^^^^^^^^^
~~~~~~~~~~~~~
SKY13453 RF switches were reverted to SKY13350. USB VBUS detection resistor values were updated. Manufacturing year: 2021
SKY13453 RF switches were reverted to SKY13350 due to component availability. USB VBUS detection resistor values were changed to better protect the LPC4320. Manufacturing year: 2021
HackRF One r8
^^^^^^^^^^^^^
~~~~~~~~~~~~~
SKY13350 RF switches were replaced by SKY13453. Manufacturing years: 20212022
HackRF One r9
^^^^^^^^^^^^^
MAX2837 was replaced by MAX2839. Si5351C was replaced by Si5351A with additional clock distribution. A series diode was added to the antenna port power supply. Manufacturing year: 2023
HackRF One r10
^^^^^^^^^^^^^^
This revision is based on r8, reverting most of the changes made in r9. A series diode was added to the antenna port power supply. Manufacturing year: 2024
SKY13350 RF switches were replaced by SKY13453 due to component availability. Manufacturing years: 20212022
Hardware Revision Identification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF Ones manufactured by Great Scott Gadgets have the revision number printed on the PCB top silkscreen layer near the MAX5864 (U18).
Starting with HackRF One r6, hardware revisions are detected by firmware and reported by ``hackrf_info``.

View file

@ -1,14 +1,167 @@
==========
================================================
Opera Cake
==========
================================================
.. image:: ../images/operacake.jpeg
:alt: Opera Cake
Opera Cake is an antenna switching add-on board for HackRF One. Consisting of two 1x4 switches, Opera Cake also has a cross-over switch that permits operation as a 1x8 switch. Up to eight Opera Cakes may be stacked onto a single HackRF One provided that each Opera Cake is configured with a different board address.
Opera Cake can be used as a 1x8 switch to connect your HackRF One to a variety of antennas at once, such as a long wire antenna for HF bands, a discone for VHF and UHF, a dipole for 2.4 GHz, and a dish for a satellite band. Once connected to your Opera Cake you can switch between all of your antennas in software instead of making physical hardware swaps.
When set up as a pair of 1x4 switches you could use Opera Cake as a switched filter bank. To do this, connect port A1 to B1, A2 to B2, A3 to B3, and A4 to B4 through physical SMA filters and cables of your choosing. This setup allows you to change your transmit or receive to be through the filter of your choosing without having to reconnect hardware every time you would like to use a different filter.
Opera Cake is configured with the ``hackrf_operacake`` command-line tool.
Using Opera Cake
~~~~~~~~~~~~~~~~
Banks
^^^^^
Opera Cake's ports are grouped in two banks (or "sides"), one on each end of the board. Bank A consists of ports A0 through A4 while bank B consists of ports B0 through B4.
Ports
^^^^^
Opera Cake has two primary ports, A0 and B0, each of which can be switched to any of eight secondary ports, A1-A4 and B1-B4. Each primary port is always connected to one secondary port. By default, A0 is connected to A1, and B0 is connected to B1. It is not possible to connect both primary ports to secondary ports in the same bank at the same time.
Port connections may be configured manually. For example, to connect A0 to A2 and B0 to B3:
.. code-block:: sh
hackrf_operacake -a A2 -b B3
To connect A0 to B2 and B0 to A4:
.. code-block:: sh
hackrf_operacake -a B2 -b A4
If only one primary port is configured, the other primary port will be connected to the first secondary port on the opposite side. For example, after the next two commands B0 will be connected to A1:
.. code-block:: sh
hackrf_operacake -a A2 -b B3
hackrf_operacake -a B2
LEDs
^^^^
Port selections are indicated by LEDs next to each port's connector. Port A0 and the secondary port connected to A0 are indicated with a green LED. Port B0 and the secondary port connected to B0 are indicated with a yellow LED.
Board Address
^^^^^^^^^^^^^
Each Opera Cake has a numeric address set by optional jumpers installed on header P1. The default address (without jumpers) is 0. The ``--list`` or ``-l`` option can be used to list the address(es) of one or more Opera Cakes installed on a HackRF One:
.. code-block:: sh
hackrf_operacake -l
The address may be set to any number from 0 to 7 by installing jumpers across the A0, A1, and/or A2 pins of header P1.
.. list-table::
:header-rows: 1
:widths: 1 1 1 1
* - Address
- A2 Jumper
- A1 Jumper
- A0 Jumper
* - 0
- No
- No
- No
* - 1
- No
- No
- Yes
* - 2
- No
- Yes
- No
* - 3
- No
- Yes
- Yes
* - 4
- Yes
- No
- No
* - 5
- Yes
- No
- Yes
* - 6
- Yes
- Yes
- No
* - 7
- Yes
- Yes
- Yes
When configuring an Opera Cake, the address may be specified with the ``--address`` or ``-o`` option:
.. code-block:: sh
hackrf_operacake -o 1 -a A1 -b B2
If the address is unspecified, 0 is assumed. It is only necessary to specify the address if the address has been changed with the addition of jumpers, typically required only if multiple Opera Cakes are stacked onto a single HackRF One.
Modes of Operation
~~~~~~~~~~~~~~~~~~
Opera Cake supports three modes of operation: ``manual``, ``frequency``, and ``time``. The operating mode can be set with the ``--mode`` or ``-m`` option, and the active operating mode is displayed with the ``--list`` or ``-l`` option.
Manual Mode
^^^^^^^^^^^
The default mode of operation is ``manual``. In manual mode, fixed port connections are configured with the ``-a`` and ``-b`` options as in the port configuration examples above. If the operating mode has been changed, it can be changed back to manual mode with:
.. code-block:: sh
hackrf_operacake -m manual
Frequency Mode
^^^^^^^^^^^^^^
In frequency mode, the A0 port connection switches automatically whenever the HackRF is tuned to a different frequency. This is useful when antennas for different frequency bands are connected to various ports.
The bands are specified in priority order. The final band specified will be used for frequencies not covered by the other bands specified.
To assign frequency bands to ports you must use the ``-f <port:min:max>`` option for each band, with the minimum and maximum frequencies specified in MHz. For example, to use port A1 for 100 MHz to 600 MHz, A3 for 600 MHz to 1200 MHz, and B2 for 0 MHz to 4 GHz:
.. code-block:: sh
hackrf_operacake -m frequency -f A1:100:600 -f A3:600:1200 -f B2:0:4000
If tuning to precisely 600 MHz, A1 will be used as it is listed first. Tuning to any frequency over 4 GHz will use B2 as it is the last listed and therefore the default port.
Only the A0 port connection is specified in frequency mode. Whenever the A0 connection is switched, the B0 connection is also switched to the secondary port mirroring A0's secondary port. For example, when A0 switches to B2, B0 is switched to A2.
Once configured, an Opera Cake will remain in frequency mode until the mode is reconfigured or until the HackRF One is reset. You can pre-configure the Opera Cake in frequency mode, and the automatic switching will continue to work while using other software.
Although multiple Opera Cakes on a single HackRF One may be set to frequency mode at the same time, they share a single switching plan. This can be useful, for example, for a filter bank consisting of eight filters.
Time Mode
^^^^^^^^^
In time mode, the A0 port connection switches automatically over time, counted in units of the sample period. This is useful for experimentation with pseudo-doppler direction finding.
To cycle through four ports, one port every 1000 samples:
.. code-block:: none
hackrf_operacake -m time -t A1:1000 -t A2:1000 -t A3:1000 -t A4:1000
When the duration on multiple ports is the same, the ``-w`` option can be used to set the default dwell time:
.. code-block:: none
hackrf_operacake --mode time -w 1000 -t A1 -t A2 -t A3 -t A4
Only the A0 port connection is specified in time mode. Whenever the A0 connection is switched, the B0 connection is switched to the secondary port mirroring A0's secondary port. For example, when A0 switches to B2, B0 is switched to A2.
Once configured, an Opera Cake will remain in time mode until the mode is reconfigured or until the HackRF One is reset. You can pre-configure the Opera Cake in time mode, and the automatic switching will continue to work while using other software.
Although multiple Opera Cakes on a single HackRF One may be set to time mode at the same time, they share a single switching plan.

View file

@ -1,60 +0,0 @@
================
Board Addressing
================
Each Opera Cake has a numeric address set by optional jumpers installed on header P1. The default address (without jumpers) is 0. The ``--list`` or ``-l`` option can be used to list the address(es) of one or more Opera Cakes installed on a HackRF One:
.. code-block:: sh
hackrf_operacake -l
The address may be set to any number from 0 to 7 by installing jumpers across the A0, A1, and/or A2 pins of header P1.
.. list-table::
:header-rows: 1
:widths: 1 1 1 1
* - Address
- A2 Jumper
- A1 Jumper
- A0 Jumper
* - 0
- No
- No
- No
* - 1
- No
- No
- Yes
* - 2
- No
- Yes
- No
* - 3
- No
- Yes
- Yes
* - 4
- Yes
- No
- No
* - 5
- Yes
- No
- Yes
* - 6
- Yes
- Yes
- No
* - 7
- Yes
- Yes
- Yes
When configuring an Opera Cake, the address may be specified with the ``--address`` or ``-o`` option:
.. code-block:: sh
hackrf_operacake -o 1 -a A1 -b B2
If the address is unspecified, 0 is assumed. It is only necessary to specify the address if the address has been changed with the addition of jumpers, typically required only if multiple Opera Cakes are stacked onto a single HackRF One.

View file

@ -1,13 +0,0 @@
=====================================
Frequently Asked Questions
=====================================
Why the name 'Opera Cake'?
~~~~~~~~~~~~~~~~~~~~~~~~~~
Internally at Great Scott Gadgets, HackRF related boards are code named with a candy or confection name. The Opera Cake code name was fun enough that we didn't change from it when we released the project.
When was Opera Cake first for sale?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Great Scott Gadgets first released Opera Cake for sale in 2022. The open source project for Opera Cake has been available since 2016 from Great Scott Gadgets.

View file

@ -1,25 +0,0 @@
========
Hardware
========
Block Diagram
~~~~~~~~~~~~~
.. image:: ../images/operacake-block-diagram.png
:alt: Opera Cake Block Diagram
Banks
~~~~~
The ports on Opera Cake are grouped in two banks (or "sides"), one on each end of the board. Bank A consists of ports A0 through A4 while bank B consists of ports B0 through B4.
Ports
~~~~~
Opera Cake has two primary ports, A0 and B0, each of which can be switched to any of eight secondary ports, A1-A4 and B1-B4. Each primary port is always connected to one secondary port. By default, A0 is connected to A1, and B0 is connected to B1. It is not possible to connect both primary ports to secondary ports in the same bank at the same time.
LEDs
~~~~
Port selections are indicated by LEDs next to each port's connector. Port A0 and the secondary port connected to A0 are indicated with a green LED. Port B0 and the secondary port connected to B0 are indicated with a yellow LED.

View file

@ -1,58 +0,0 @@
==================
Modes of Operation
==================
Opera Cake supports three modes of operation: ``manual``, ``frequency``, and ``time``. The operating mode can be set with the ``--mode`` or ``-m`` option, and the active operating mode is displayed with the ``--list`` or ``-l`` option.
Manual Mode
~~~~~~~~~~~
The default mode of operation is ``manual``. In manual mode, fixed port connections are configured with the ``-a`` and ``-b`` options as in the :ref:`port configuration examples <portconfiguration>`. If the operating mode has been changed, it can be changed back to manual mode with:
.. code-block:: sh
hackrf_operacake -m manual
Frequency Mode
~~~~~~~~~~~~~~
In frequency mode, the A0 port connection switches automatically whenever the HackRF is tuned to a different frequency. This is useful when antennas for different frequency bands are connected to various ports.
The bands are specified in priority order. The final band specified will be used for frequencies not covered by the other bands specified.
To assign frequency bands to ports you must use the ``-f <port:min:max>`` option for each band, with the minimum and maximum frequencies specified in MHz. For example, to use port A1 for 100 MHz to 600 MHz, A3 for 600 MHz to 1200 MHz, and B2 for 0 MHz to 4 GHz:
.. code-block:: sh
hackrf_operacake -m frequency -f A1:100:600 -f A3:600:1200 -f B2:0:4000
If tuning to precisely 600 MHz, A1 will be used as it is listed first. Tuning to any frequency over 4 GHz will use B2 as it is the last listed and therefore the default port.
Only the A0 port connection is specified in frequency mode. Whenever the A0 connection is switched, the B0 connection is also switched to the secondary port mirroring A0's secondary port. For example, when A0 switches to B2, B0 is switched to A2.
Once configured, an Opera Cake will remain in frequency mode until the mode is reconfigured or until the HackRF One is reset. You can pre-configure the Opera Cake in frequency mode, and the automatic switching will continue to work while using other software.
Although multiple Opera Cakes on a single HackRF One may be set to frequency mode at the same time, they share a single switching plan. This can be useful, for example, for a filter bank consisting of eight filters.
Time Mode
~~~~~~~~~
In time mode, the A0 port connection switches automatically over time, counted in units of the sample period. This is useful for experimentation with pseudo-doppler direction finding.
To cycle through four ports, one port every 1000 samples:
.. code-block:: none
hackrf_operacake -m time -t A1:1000 -t A2:1000 -t A3:1000 -t A4:1000
When the duration on multiple ports is the same, the ``-w`` option can be used to set the default dwell time:
.. code-block:: none
hackrf_operacake --mode time -w 1000 -t A1 -t A2 -t A3 -t A4
Only the A0 port connection is specified in time mode. Whenever the A0 connection is switched, the B0 connection is switched to the secondary port mirroring A0's secondary port. For example, when A0 switches to B2, B0 is switched to A2.
Once configured, an Opera Cake will remain in time mode until the mode is reconfigured or until the HackRF One is reset. You can pre-configure the Opera Cake in time mode, and the automatic switching will continue to work while using other software.
Although multiple Opera Cakes on a single HackRF One may be set to time mode at the same time, they share a single switching plan.

View file

@ -1,24 +0,0 @@
.. _portconfiguration:
===================
Port Configurations
===================
Port connections may be configured manually. For example, to connect A0 to A2 and B0 to B3:
.. code-block:: sh
hackrf_operacake -a A2 -b B3
To connect A0 to B2 and B0 to A4:
.. code-block:: sh
hackrf_operacake -a B2 -b A4
If only one primary port is configured, the other primary port will be connected to the first secondary port on the opposite side. For example, after the next two commands B0 will be connected to A1:
.. code-block:: sh
hackrf_operacake -a A2 -b B3
hackrf_operacake -a B2

View file

@ -1,16 +0,0 @@
=====
rad1o
=====
rad1o is the badge from the 2015 Chaos Communication Camp.
The rad1o badge contains a full-featured SDR (software defined radio) half-duplex transceiver, operating in a frequency range of about 50 MHz - 4000 MHz, and is software compatible to the HackRF.
.. image:: ../images/rad1o_8.jpg
:alt: rad1o
(rad1o picture provided by Christoph Krichenbauer with Creative Commons License CC-BY-NC_SA)
More information can be found at the `rad1o badge wiki <https://rad1o.badge.events.ccc.de/start>`__
Compared to HackRF One, the rad1o badge uses a different mixer (MAX2871) with a reduced frequency range.

View file

@ -2,8 +2,6 @@
RF Shield Installation Instructions
===============================================
HackRF Pro ships with an RF shield as standard.
Official Great Scott Gadgets HackRF Ones do not come from the factory with an RF shield installed around the radio section of the PCB. They do, however, have pads in place so that one may be installed if a user has a reason and an inclination to do so. The reason that they do not come preinstalled is that early testing revealed that the RF shield did little to improve the performance of the HackRF One. The recommended RF shield is the BMI-S-230-F-R (frame) with the BMI-S-230-C (shield). A two part RF shield is recommended because the shield section can be removed to allow access to the RF section of the HackRF One. This can be important if it becomes necessary to probe any part of the RF section, or to replace any parts of the RF section. However, even with a two part RF shield, it can be difficult to access the RF section of the HackRF One in certain situations. The following steps are a basic set of instructions for installing a RF shield on a HackRF One.
**CAUTION: Soldering a RF shield onto a HackRF One comes with a certain amount of risk. Beyond the inherent risks of soldering itself, this process may damage the HackRF One and no warranty is available to cover damage incurred from this process. If you do choose to install a RF shield on your HackRF One please proceed with caution.**

View file

@ -1,14 +0,0 @@
Sampling Rate and Baseband Filters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using a sampling rate of less than 8MHz is not recommended. Partly, this is because the MAX5864 (ADC/DAC chip) isn't specified to operate at less than 8MHz, and therefore, no promises are made by Maxim about how it performs. But more importantly, the baseband filter in the MAX2837 has a minimum bandwidth of 1.75MHz. It can't provide enough filtering at 2MHz sampling rate to remove substantial signal energy in adjacent spectrum (more than +/-1MHz from the tuned frequency). The MAX2837 datasheet suggests that at +/-1MHz, the filter provides only 4dB attenuation, and at +/-2MHz (where a signal would alias right into the center of your 2MHz spectrum), it attenuates about 33dB. That's significant. Here's a picture:
.. image:: ../images/max2837-1m75bw-at-2m.png
:align: center
At 8MHz sampling rate, and using the minimum 1.75MHz bandwidth filter, this is the response:
.. image:: ../images/max2837-1m75bw-at-8m.png
:align: center
You can see that the attenuation is more than 60dB at +/-2.8MHz, which is more than sufficient to remove significant adjacent spectrum interference before the ADC digitizes the baseband. If using this configuration to get a 2MHz sampling rate, use a GNU Radio block after the 8MHz source that performs a 4:1 decimation with a decently sharp low pass filter (complex filter with a cut-off of <1MHz).

View file

@ -1,25 +0,0 @@
============================
Setting Gain Controls for RX
============================
Gain controls
~~~~~~~~~~~~~
HackRF One provides three different analog gain controls on RX and two on TX.
The three RX gain controls are at these stages:
- RF ("amp", 0 or ~11 dB)
- IF ("lna", 0 to 40 dB in 8 dB steps)
- baseband ("vga", 0 to 62 dB in 2 dB steps)
The two TX gain controls are at these stages:
- RF (0 or ~11 dB)
- IF (0 to 47 dB in 1 dB steps)
Note: in some documents, the RF gain was erroneously quoted to be 14 dB. The confusion was based on the fact that the MGA-81563 amplifier is advertised as a "14 dBm" amplifier, but that specifies its output power, not its amplification. See `Martin Ling's comment on issue #1059 <https://github.com/greatscottgadgets/hackrf/issues/1059#issuecomment-1060038293>`__ for some details!
The TX and RX RF amplifiers have two settings: on or off. In the off state, the amps are completely bypassed. They nominally provide around 11 dB of gain when on, but the actual amount of gain varies by frequency. In general, expect less gain at higher frequencies. For fine control of gain, use the IF and/or baseband gain options.
A good default setting to start with is RF=0 (off), IF=16, baseband=16. Increase or decrease the IF and baseband gain controls roughly equally to find the best settings for your situation. Turn on the RF amp if you need help picking up weak signals. If your gain settings are too low, your signal may be buried in the noise. If one or more of your gain settings is too high, you may see distortion (look for unexpected frequencies that pop up when you increase the gain) or the noise floor may be amplified more than your signal is.

View file

@ -1,82 +1,85 @@
===========================================
Third-Party Software Compatible With HackRF
===========================================
================================================
HackRF Compatible Software
================================================
Software That Has Direct Support For HackRF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Software with HackRF Support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* GQRX
* `http://gqrx.dk/ <http://gqrx.dk/>`__
* GNU Radio
* https://www.gnuradio.org/
* GNU Radio Mode-S/ADS-B
* `https://github.com/bistromath/gr-air-modes <https://github.com/bistromath/gr-air-modes>`__
* QSpectrumAnalyzer
* `https://github.com/xmikos/qspectrumanalyzer <https://github.com/xmikos/qspectrumanalyzer>`__
* SDR#
* `https://airspy.com/download/ <https://airspy.com/download/>`__
* Windows OS only
* Only nightly builds currently support HackRF One
* SDR Console
* https://www.sdr-radio.com/Console
* Spectrum Analyzer GUI for hackrf_sweep for Windows
* `https://github.com/pavsa/hackrf-spectrum-analyzer <https://github.com/pavsa/hackrf-spectrum-analyzer>`__
* Universal Radio Hacker (Windows/Linux)
* `https://github.com/jopohl/urh <https://github.com/jopohl/urh>`__
* Web-based APRS tracker
* `https://xakcop.com/aprs-sdr <https://xakcop.com/aprs-sdr/>`__
* SigDigger (Windows/Linux/macOS)
* `https://github.com/BatchDrake/SigDigger <https://github.com/BatchDrake/SigDigger>`__
* Supports HackRF through SoapySDR / SoapyHackRF
This is intended to be a list of software known to work with the HackRF. There are three sections, GNU Radio Based software, those that have direct support, and those that can work with data from the HackRF.
Software That Can Use Data From HackRF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Baudline
GNU Radio Based
~~~~~~~~~~~~~~~
* `http://www.baudline.com/ <http://www.baudline.com/>`__
* Can view/process HackRF data, e.g. hackrf_transfer
GNU Radio Mode-S/ADS-B - `https://github.com/bistromath/gr-air-modes <https://github.com/bistromath/gr-air-modes>`__
* Inspectrum
GQRX - `http://gqrx.dk/ <http://gqrx.dk/>`__
Direct Support
~~~~~~~~~~~~~~
SDR# (Windows only) - `https://airspy.com/download/ <https://airspy.com/download/>`__
* Only nightly builds currently support HackRF One - `http://sdrsharp.com/downloads/sdr-nightly.zip <http://sdrsharp.com/downloads/sdr-nightly.zip>`__
SDR_Radio.com V2 - `http://v2.sdr-radio.com/Radios/HackRF.aspx <http://v2.sdr-radio.com/Radios/HackRF.aspx>`__
Universal Radio Hacker (Windows/Linux) - `https://github.com/jopohl/urh <https://github.com/jopohl/urh>`__
QSpectrumAnalyzer - `https://github.com/xmikos/qspectrumanalyzer <https://github.com/xmikos/qspectrumanalyzer>`__
Spectrum Analyzer GUI for hackrf_sweep for Windows - `https://github.com/pavsa/hackrf-spectrum-analyzer <https://github.com/pavsa/hackrf-spectrum-analyzer>`__
Web-based APRS tracker `https://xakcop.com/aprs-sdr <https://xakcop.com/aprs-sdr/>`__
Can use HackRF data
~~~~~~~~~~~~~~~~~~~
Inspectrum `https://github.com/miek/inspectrum <https://github.com/miek/inspectrum>`__
* `https://github.com/miek/inspectrum <https://github.com/miek/inspectrum>`__
* Capture analysis tool with advanced features
* Matlab
.. code-block :: sh
fid = open('samples.bin', 'r');
len = 1000; % 1000 samples
y = fread(fid, 2*len, 'int8');
y = y(1:2:end) + 1j*y(2:2:end);
fclose(fid)
Baudline `http://www.baudline.com/ <http://www.baudline.com/>`__ (Can view/process HackRF data, e.g. hackrf_transfer)
Troubleshooting Recommendations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF Tools
~~~~~~~~~~~~
Many of these tools require libhackrf and at times HackRF Tools. It may help you to have updated libhackrf and HackRF Tools when troubleshooting these applications.
In addition to third party tools that support HackRF, we provide some commandline tools for interacting with HackRF. For information on how to use each tool look at the help information provided (e.g. ``hackrf_transfer -h``) or the `manual pages <http://manpages.ubuntu.com/manpages/utopic/man1/hackrf_info.1.html>`__.
It is also strongly suggested, and usually required, that your HackRF Tools and HackRF firmware match.
The first two tools (``hackrf_info`` and ``hackrf_transfer``) should cover most usage. The remaining tools are provided for debugging and general interest; beware, they have the potential to damage HackRF if used incorrectly.
* **hackrf_info** Read device information from HackRF such as serial number and firmware version.
* **hackrf_transfer** Send and receive signals using HackRF. Input/output can be 8bit signed quadrature files or wav files.
* **hackrf_max2837** Read and write registers in the Maxim 2837 transceiver chip. For most tx/rx purposes hackrf_transfer or other tools will take care of this for you.
* **hackrf_rffc5071** Read and write registers in the RFFC5071 mixer chip. As above, this is for curiosity or debugging only, most tools will take care of these settings automatically.
* **hackrf_si5351c** Read and write registers in the Silicon Labs Si5351C clock generator chip. This should also be unnecessary for most operation.
* **hackrf_spiflash** A tool to write new firmware to HackRF. This is mostly used for :ref:`Updating Firmware <updating_firmware>`.
* **hackrf_cpldjtag** A tool to update the CPLD on HackRF. This is needed only when :ref:`Updating Firmware <updating_firmware>` to a version prior to 2021.03.1.
Handling HackRF data
~~~~~~~~~~~~~~~~~~~~
Matlab
^^^^^^
.. code-block :: sh
fid = open('samples.bin', 'r');
len = 1000; % 1000 samples
y = fread(fid, 2*len, 'int8');
y = y(1:2:end) + 1j*y(2:2:end);
fclose(fid)

View file

@ -1,94 +0,0 @@
.. _synchronization_checklist:
================================================
Synchronization Checklist
================================================
There are many scenarios where you may want to use multiple HackRF One devices
synchronized with each other. For instance, multiple devices can be used with a
phased antenna array to implement direction finding or beamforming.
If you're having trouble achieving fully synchronized operation, the following
checklist may be useful for troubleshooting:
* **Are you running the latest firmware and host software versions?**
There have been many bug fixes, so please use the latest releases.
* **Are you applying settings to the right target devices?**
With more than one HackRF device connected, you need to take care to specify
which device should be used where. When using our command line tools, use the
``-d`` option with a serial number on the command line to specify which
device each command should target.
* **Are all HackRFs sharing a clock?**
If the HackRFs are not sharing a clock, frequencies and sample rates will
not match exactly. See the
:ref:`external clock interface <external_clock_interface>`
section for how to connect the clock signals.
* **Is the clock input being detected?**
Use ``hackrf_clock`` with the ``-i`` option to check for clock input.
Use the ``-d`` option to specify the serial number.
This requires ``2022.09.1`` or later host software.
The older way of checking using ``hackrf_debug`` will not work correctly on
some hardware revisions.
* **If the clock source is CLKOUT of another HackRF, has it been enabled?**
Use ``hackrf_clock`` with the ``-o`` option to enable the clock output.
Use the ``-d`` option to specify the serial number.
* **Is the CLKIN waveform correct?**
* It should be a 10 MHz square wave between 0 V and 3.0 to 3.3 V.
* A sine wave is OK, but may give greater phase noise.
* An unbuffered TCXO output may not have sufficient voltage.
* Some hardware revisions are less tolerant of out-of-spec
clock input than others.
* **Is your hardware faulty?**
Some HackRF clones were sold with a non-functional CLKIN port.
* **Are all HackRFs being started together using hardware triggering?**
If hardware triggering is not used, start times will not match exactly.
See the :ref:`hardware triggering <hardware_triggering>` section for how
to connect the necessary trigger signals.
Use ``hackrf_transfer`` with the ``-H`` option to wait for trigger input.
If launching multiple ``hackrf_transfer`` instances, make sure that those
running with ``-H`` have had time to reach the ``Waiting for trigger...``
state before the trigger signal is sent.
.. note:: There is currently no support for hardware triggering via the
Osmocom or Soapy blocks in GNU Radio. The Osmocom block may look
like it supports this but the options have no effect.
* **Are any samples being lost due to USB throughput problems?**
If RX samples are dropped or TX samples delayed, signals will become out
of sync.
Use ``hackrf_debug -S`` on each HackRF after running your software to check
if there were throughput problems. If the shortfall count reported is
non-zero, some samples were dropped on RX or late for TX, and signals will
be out of sync as a result.
This requires ``2022.09.1`` or later host software.
To force shortfalls to stop the device at runtime, use
``hackrf_debug -T 0 -R 0`` to set zero tolerance for shortfalls.
* **Are your HackRFs sharing a USB bus?**
A single HackRF One at 20 MHz sample rate uses practically all the bandwidth
of a single USB 2.0 bus. Unless using very low sample rates, each HackRF
should be connected to its own bus.

View file

@ -0,0 +1,40 @@
================================================
Tips and Tricks
================================================
USB Cables (and why to use a noise reducing one)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The USB cable you choose can make a big difference in what you see when using your HackRF and especially when using it around between 120 and 480 MHz where USB is doing all its work.
#. Use a shielded USB cable. The best way to guarantee RF interference from USB is to use an unshielded cable. You can test that your cable is shielded by using a continuity tester to verify that the shield on one connector has continuity to the shield on the connector at the other end of the cable.
#. Use a short USB cable. Trying anything larger than a 6ft cable may yield poor results. The longer the cable, the more loss you can expect and when making this post a 15ft cable was tried and the result was the HackRF would only power up half way.
#. For best results, select a cable with a ferrite core. These cables are usually advertised to be noise reducing and are recognizable from the plastic block towards one end.
Screenshot before and after changing to a noise reducing cable (`view full size image <http://i.imgur.com/e64LASK.jpg>`__):
.. image:: ../images/noisereducingcablescreenshot.jpeg
:align: center
A shielded cable with ferrite core was used in the right-hand image.
The before and after images were both taken with the preamp on and the LNA and VGA both set to 24db.
Sampling Rate and Baseband Filters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using a sampling rate of less than 8MHz is not recommended. Partly, this is because the MAX5864 (ADC/DAC chip) isn't specified to operate at less than 8MHz, and therefore, no promises are made by Maxim about how it performs. But more importantly, the baseband filter in the MAX2837 has a minimum bandwidth of 1.75MHz. It can't provide enough filtering at 2MHz sampling rate to remove substantial signal energy in adjacent spectrum (more than +/-1MHz from the tuned frequency). The MAX2837 datasheet suggests that at +/-1MHz, the filter provides only 4dB attenuation, and at +/-2MHz (where a signal would alias right into the center of your 2MHz spectrum), it attenuates about 33dB. That's significant. Here's a picture:
.. image:: ../images/max2837-1m75bw-at-2m.png
:align: center
At 8MHz sampling rate, and using the minimum 1.75MHz bandwidth filter, this is the response:
.. image:: ../images/max2837-1m75bw-at-8m.png
:align: center
You can see that the attenuation is more than 60dB at +/-2.8MHz, which is more than sufficient to remove significant adjacent spectrum interference before the ADC digitizes the baseband. If using this configuration to get a 2MHz sampling rate, use a GNU Radio block after the 8MHz source that performs a 4:1 decimation with a decently sharp low pass filter (complex filter with a cut-off of <1MHz).

View file

@ -1,74 +1,143 @@
.. _troubleshooting:
================================================
===============
Troubleshooting
================================================
HackRF not detected / "No HackRF boards found."
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the software you're using is unable to detect the HackRF hardware and/or `hackrf_info` returns "No HackRF boards found.", this can be caused by a number of different software or hardware issues.
Solution
--------
#. If you are using a PortaPack addon, make sure to select "HackRF" mode from the main menu.
#. If you are using a virtual machine or Windows Subsystem for Linux (WSL), make sure that it is configured to pass through the USB device.
#. Check whether the device appears in ``lsusb`` (Linux), Device Manager (Windows), or System Report (macOS). If it doesn't not appear, it could either be a firmware issue, an issue with the cable, or another hardware issue.
#. Try booting the HackRF in DFU mode by holding the "DFU" button when plugging in the device. It should now appear as `NXP Semiconductors LPC4330FET180 [ARM Cortex M4 + M0] (device firmware upgrade mode)` in the locations listed above. If it does appear, then it was likely a firmware issue and you can follow the instructions to :ref:`recover the SPI flash firmware <recovering_firmware>`.
#. If the device does not appear in DFU mode then it is likely to be an issue with the USB cable. Charge-only cables (which do not include the data lines) have become very common and will cause this symptom. Ideally, test the cable you're using with another device that does some sort of data transfer to be sure that it works, or just try other cables.
#. If the device still does not appear, it may be a less common issue or possibly a fault with the hardware. See :doc:`Getting Help <getting_help>` for information on where to ask for more support, and please include as much detail as you can about what you've already tried.
.. _bigspike:
There is a big spike in the center of the received spectrum
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you see a large spike in the center of your FFT display regardless of the frequenecy you are tuned to, you are seeing a DC offset (or component or bias). The term "DC" comes from "Direct Current" in electronics. It is the unchanging aspect of a signal as opposed to the "alternating" part of the signal (AC) that changes over time.
.. figure:: ../images/dc_spike_grc.png
:align: center
DC spike
===============
Take, for example, the signal represented by the digital sequence:
How do I deal with the big spike in the middle of my spectrum?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: sh
-2, -1, 1, 6, 8, 9, 8, 6, 1, -1, -2, -1, 1, 6, 8, 9, 8, 6, 1, -1, -2, -1, 1, 6, 8, 9, 8, 6, 1, -1
.. figure:: ../images/dc_spike_example_plot.png
:align: center
Example signal
This periodic signal contains a strong sinusoidal component spanning from -2 to 9. If we plot the spectrum of this signal, you can see one spike at the frequency of this sinusoid and a second spike at 0 Hz (DC).
.. figure:: ../images/dc_spike_example_spectrum.png
:align: center
Spectrum of example signal
If the signal spanned from values -2 to 2 (centered around zero), there would be no DC offset. Since it is centered around 3.5 (the number midway between -2 and 9), there is a DC component.
Samples produced by HackRF are measurements of radio waveforms, but the measurement method is prone to a DC bias introduced by HackRF. It's an artifact of the measurement system, not an indication of a received radio signal. DC offset is not unique to HackRF; it is common to all quadrature sampling systems.
A high DC offset is also one of a few symptoms that can be caused by a software version mismatch. A common problem is that people run an old version of gr-osmosdr with newer firmware.
Solution
--------
There are a few options:
Start by reading :ref:`our FAQ Response on the DC Spike <bigspike>`. After that, there are a few options:
#. Ignore it. For many applications it isn't a problem. You'll learn to ignore it.
#. Avoid it. The best way to handle DC offset for most applications is to use offset tuning; instead of tuning to your exact frequency of interest, tune to a nearby frequency so that the entire signal you are interested in is shifted away from 0 Hz but still within the received bandwidth. If your algorithm works best with your signal centered at 0 Hz (many do), you can shift the frequency in the digital domain, moving your signal of interest to 0 Hz and your DC offset away from 0 Hz. HackRF's high maximum sampling rate can be a big help as it allows you to use offset tuning even for relatively wideband signals.
#. Correct it. There are various ways of removing the DC offset in software. However, these techniques may degrade parts of the signal that are close to 0 Hz. It may look better, but that doesn't necessarily mean that it is better from the standpoint of a demodulator algorithm, for example. Still, correcting the DC offset is often a good choice.
----
How should I set the gain controls for RX?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A good default setting to start with is RF=0 (off), IF=16, baseband=16. Increase or decrease the IF and baseband gain controls roughly equally to find the best settings for your situation. Turn on the RF amp if you need help picking up weak signals. If your gain settings are too low, your signal may be buried in the noise. If one or more of your gain settings is too high, you may see distortion (look for unexpected frequencies that pop up when you increase the gain) or the noise floor may be amplified more than your signal is.
----
What are the minimum system requirements for using HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The most important requirement is that you supply 500 mA at 5 V DC to your HackRF via the USB port. If your host computer has difficulty meeting this requirement, you may need to use a powered USB hub.
Most users will want to stream data to or from the HackRF at high speeds. This requires that the host computer supports Hi-Speed USB. Some Hi-Speed USB hosts are better than others, and you may have multiple host controllers on your computer. If you have difficulty operating your HackRF at high sample rates (10 Msps to 20 Msps), try using a different USB port on your computer. If possible, arrange things so that the HackRF is the only device on the bus.
There is no specific minimum CPU requirement for the host computer, but SDR is generally a CPU-intensive application. If you have a slower CPU, you may be unable to run certain SDR software or you may only be able to operate at lower sample rates.
----
Why isn't HackRF working with my virtual machine (VM)?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF requires the ability to stream data at very high rates over USB. Unfortunately VM software typically has problems with continuous high speed USB transfers.
There are some known bugs with the HackRF firmware's USB implementation. It is possible that fixing these bugs will improve the ability to operate HackRF with a VM, but there is a very good chance that operation at higher sample rates will still be limited.
----
What LEDs should be illuminated on the HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When HackRF One is plugged in to a USB host, four LEDs should turn on: 3V3, 1V8, RF, and USB. The 3V3 LED indicates that the primary internal power supply is working properly. The 1V8 and RF LEDs indicate that firmware is running and has switched on additional internal power supplies. The USB LED indicates that the HackRF One is communicating with the host over USB.
The RX and TX LEDs indicate that a receive or transmit operation is currently in progress.
----
.. _faq_hackrf_under_linux:
I can't seem to access my HackRF under Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you run ``hackrf_info`` or any other command which tries to communicate with the HackRF and get one of the following error messages
.. code-block :: sh
hackrf_open() failed: HACKRF_ERROR_NOT_FOUND (-5)
or:
.. code-block :: sh
hackrf_open() failed: HACKRF_ERROR_LIBUSB (-1000)
there are a few steps you can try:
#. Make sure that you are running the latest version of libhackrf and hackrf-tools. HackRF One, for example, is only supported by release 2014.04.1 or newer. Try running ``hackrf_info`` again to see if the updates have addressed your issue.
#. Write a udev rule to instruct udev to set permissions for the device in a way that it can be accessed by any user on the system who is a member of a specific group.
A normal user under Linux doesn't have the permissions to access arbitrary USB devices because of security reasons. The first solution would be to run every command which tries to access the HackRF as root which is not recommended for daily usage, but at least shows you if your HackRF really works.
To write a udev rule, you need to create a new rules file in the ``/etc/udev/rules.d`` folder. I called mine ``52-hackrf.rules``. Here is the content:
.. code-block :: sh
ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="plugdev"
ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="plugdev"
ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="hackrf-dfu-%k", MODE="660", GROUP="plugdev"
The content of the file instructs udev to look out for devices with Vendor ID and Product ID matching HackRF devices. It then sets the UNIX permissions to ``660`` and the group to ``plugdev`` and creates a symlink in ``/dev`` to the device.
After creating the rules file you can either reboot or run the command ``udevadm control --reload-rules`` as root to instruct udev to reload all rule files. After replugging your HackRF board, you should be able to access the device with all utilities as a normal user. If you still can't access the device, make sure that you are a member of the plugdev group.
(These instructions have been tested on Ubuntu and Gentoo and may need to be adapted to other Linux distributions. In particular, your distro may have a group named something other than plugdev for this purpose.)
#. Disable USB autosuspend for HackRF. A common problem for laptop users could power management enabling USB autosuspend, which is likely if ``hackrf_info`` returns an error of ``hackrf_open() failed: Input/Output Error (-1000)`` on the first execution, and works if you run it a second time directly afterwards. This can be confirmed by running ``LIBUSB_DEBUG=3 hackrf_info`` and checking that the error is a ``broken pipe``. \
If you use the TLP power manager you can add the HackRF USB VID/PIDs to the ``USB_BLACKLIST`` line in ``/etc/default/tlp`` (under Archlinux create a file ``/etc/tlp.d/10-usb-blacklist.conf``, under Ubuntu the config file can be found at ``/etc/tlp.conf``):
.. code-block:: sh
USB_BLACKLIST="1d50:604b 1d50:6089 1d50:cc15 1fc9:000c"
and restart TLP using ``tlp restart`` or ``systemctl restart tlp``.
----
The command hackrf_info failed with "hackrf_open() .. HACKRF_ERROR_NOT_FOUND"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This could be a problem of a kernel driver. Some ubuntu versions, like Ubuntu 15.04 with installed gnuradio has a kernel driver pre-installed. In this case you probably will get some syslog kernel messages like:
* kernel: [ 8932.297074] hackrf 1-9.4:1.0: Board ID: 02
* kernel: [ 8932.297076] hackrf 1-9.4:1.0: Firmware version: 2014.08.1
* kernel: [ 8932.297261] hackrf 1-9.4:1.0: Registered as swradio0
* kernel: [ 8932.297262] hackrf 1-9.4:1.0: SDR API is still slightly experimental and functionality changes may follow
when you plug in the the HackRF module. Use the command ``dmesg`` to check the last system log entries. If you try to start ``hackrf_info`` it will terminate with the error message and the system log will show a message like:
* kernel: [ 8967.263268] usb 1-9.4: usbfs: interface 0 claimed by hackrf while 'hackrf_info' sets config #1
To solve this issue check under root account if is there is a kernel module ``hackrf`` loaded: ``lsmod | grep hackrf``. If there is a hackrf kernel module, try to unload it with ``rmmod hackrf``. You must do this command as root, too. After this the command ``hackrf_info`` (and all other hackrf related stuff) should work and the syslog usbfs massage should vanish.
After a reset or USB unplug/plug this kernel module will load again and block the access again. To solve this you have to blacklist the hackrf kernel module in /etc/modprobe.d/blacklist(.conf) The current filename of the blacklist file may differ, it depends on the current ubuntu version. In ubuntu 15.04 it is located in /etc/modprobe.d/blacklist.conf. Open this file under root account with a text editor an add the following line at the end:
.. code-block:: sh
blacklist hackrf
After a system-restart, to get the updated modprobe working, the hackrf worked under ubuntu 15.04 with the upstream packages (Firmware version: 2014.08.1) out-of-the-box.

View file

@ -4,22 +4,24 @@
Updating Firmware
================================================
HackRF devices ship with firmware on the SPI flash memory. The firmware can be updated with a USB cable and host computer.
HackRF devices ship with firmware on the SPI flash memory. The firmware can be updated with nothing more than a USB cable and host computer.
These instructions allow you to upgrade the firmware in order to take advantage of new features or bug fixes.
If you have any difficulty making this process work from your native operating system, you can :ref:`use Pentoo or the GNU Radio Live DVD <try_pentoo>` to perform the updates.
Updating the SPI Flash Firmware
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To update the firmware on HackRF Pro, use the hackrf_spiflash program:
To update the firmware on a working HackRF One, use the hackrf_spiflash program:
.. code-block :: sh
hackrf_spiflash -w hackrf_pro_usb.bin
hackrf_spiflash -w hackrf_one_usb.bin
You can find the firmware binary (hackrf_pro_usb.bin) in the firmware-bin directory of the latest `release package <https://github.com/greatscottgadgets/hackrf/releases/latest>`__ or you can compile your own from the `source <https://github.com/greatscottgadgets/hackrf/tree/master/firmware>`__. For HackRF One or other platforms, use the ".bin" file with the appropriate name for your platform such as hackrf_one_usb.bin. If you compile from source, the file will be called hackrf_usb.bin.
You can find the firmware binary (hackrf_one_usb.bin) in the firmware-bin directory of the latest `release package <https://github.com/mossmann/hackrf/releases/latest>`__ or you can compile your own from the `source <https://github.com/mossmann/hackrf/tree/master/firmware>`__. For Jawbreaker, use hackrf_jawbreaker_usb.bin. If you compile from source, the file will be called hackrf_usb.bin.
The hackrf_spiflash program is part of hackrf-tools.
@ -27,18 +29,22 @@ When writing a firmware image to SPI flash, be sure to select firmware with a fi
After writing the firmware to SPI flash, you may need to reset the HackRF device by pressing the RESET button or by unplugging it and plugging it back in.
If you get an error that mentions HACKRF_ERROR_NOT_FOUND, it is often a permissions problem on your OS.
If you get an error that mentions HACKRF_ERROR_NOT_FOUND, check out the :ref:`FAQ <faq_hackrf_under_linux>`. It's often a permissions problem that can be quickly solved.
.. _recovering_firmware:
Only if Necessary: Recovering the SPI Flash Firmware
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the firmware installed in SPI flash has been damaged or if you are programming a home-made HackRF for the first time, you will not be able to immediately use the hackrf_spiflash program as listed in the above procedure. Follow these steps instead:
Updating the CPLD
~~~~~~~~~~~~~~~~~
#. Follow the DFU Boot instructions to start the HackRF in DFU boot mode.
#. Type ``dfu-util --device 1fc9:000c --alt 0 --download hackrf_pro_usb.dfu`` to load firmware from a release package into RAM. For HackRF One or other platforms, use the ".dfu" file with the appropriate name for your platform such as hackrf_one_usb.dfu.
#. Follow the SPI flash firmware update procedure above to write the ".bin" firmware image to SPI flash.
Older versions of HackRF firmware (prior to release 2021.03.1) require an additional step to program a bitstream into the CPLD.
To update the CPLD image, first update the SPI flash firmware, libhackrf, and hackrf-tools to the version you are installing. Then:
.. code-block :: sh
hackrf_cpldjtag -x firmware/cpld/sgpio_if/default.xsvf
After a few seconds, three LEDs should start blinking. This indicates that the CPLD has been programmed successfully. Reset the HackRF device by pressing the RESET button or by unplugging it and plugging it back in.
@ -47,9 +53,9 @@ Only if Necessary: DFU Boot
DFU boot mode is normally only needed if the firmware is not working properly or has never been installed.
The LPC43xx microcontroller on HackRF is capable of booting from several different code sources. By default, HackRF boots from SPI flash memory (SPIFI). It can also boot HackRF in DFU (USB) boot mode. In DFU boot mode, HackRF will enumerate over USB, wait for code to be delivered using the DFU (Device Firmware Update) standard over USB, and then execute that code from RAM. The SPIFI is normally unused and unaltered in DFU mode.
The LPC4330 microcontroller on HackRF is capable of booting from several different code sources. By default, HackRF boots from SPI flash memory (SPIFI). It can also boot HackRF in DFU (USB) boot mode. In DFU boot mode, HackRF will enumerate over USB, wait for code to be delivered using the DFU (Device Firmware Update) standard over USB, and then execute that code from RAM. The SPIFI is normally unused and unaltered in DFU mode.
To start up HackRF Pro or HackRF One in DFU mode, hold down the DFU button while powering it on or while pressing and releasing the RESET button. Then release the DFU button. On HackRF One, the 3V3 LED should illuminate. On HackRF Pro, all LEDs should remain off. At this point the HackRF is ready to receive firmware over USB.
To start up HackRF One in DFU mode, hold down the DFU button while powering it on or while pressing and releasing the RESET button. Release the DFU button after the 3V3 LED illuminates. The 1V8 LED should remain off. At this point HackRF One is ready to receive firmware over USB.
To start up Jawbreaker in DFU mode, short two pins on one of the "BOOT" headers while power is first supplied. The pins that must be shorted are pins 1 and 2 of header P32 on Jawbreaker. Header P32 is labeled "P2_8" on most Jawbreakers but may be labeled "2" on prototype units. Pin 1 is labeled "VCC". Pin 2 is the center pin. After DFU boot, you should see VCCLED illuminate and note that 1V8LED does not illuminate. At this point Jawbreaker is ready to receive firmware over USB.
@ -57,6 +63,17 @@ You should only use a firmware image with a filename ending in ".dfu" over DFU,
Only if Necessary: Recovering the SPI Flash Firmware
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the firmware installed in SPI flash has been damaged or if you are programming a home-made HackRF for the first time, you will not be able to immediately use the hackrf_spiflash program as listed in the above procedure. Follow these steps instead:
#. Follow the DFU Boot instructions to start the HackRF in DFU boot mode.
#. Type ``dfu-util --device 1fc9:000c --alt 0 --download hackrf_one_usb.dfu`` to load firmware from a release package into RAM. If you have a Jawbreaker, use hackrf_jawbreaker_usb.dfu instead. Alternatively, use ``make -e BOARD=HACKRF_ONE RUN_FROM=RAM program`` to load the firmware into RAM and start it.
#. Follow the SPI flash firmware update procedure above to write the ".bin" firmware image to SPI flash.
Obtaining DFU-Util
~~~~~~~~~~~~~~~~~~
@ -80,19 +97,4 @@ If you are using a platform without a dfu-util package, build instruction can be
make
sudo make install
Now you will have the current version of DFU Util installed on your system.
Updating the CPLD
~~~~~~~~~~~~~~~~~
Older versions of HackRF firmware (prior to release 2021.03.1) require an additional step to program a bitstream into the CPLD.
To update the CPLD image, first update the SPI flash firmware, libhackrf, and hackrf-tools to the version you are installing. Then:
.. code-block :: sh
hackrf_cpldjtag -x firmware/cpld/sgpio_if/default.xsvf
After a few seconds, three LEDs should start blinking. This indicates that the CPLD has been programmed successfully. Reset the HackRF device by pressing the RESET button or by unplugging it and plugging it back in.
Now you will have the current version of DFU Util installed on your system.

View file

@ -1,27 +0,0 @@
==========
USB Cables
==========
The USB cable you choose can make a big difference in what you see when using your HackRF and especially when using it around between 120 and 480 MHz where USB is doing all its work.
#. Use a shielded USB cable. The best way to guarantee RF interference from USB is to use an unshielded cable. You can test that your cable is shielded by using a continuity tester to verify that the shield on one connector has continuity to the shield on the connector at the other end of the cable.
#. Use a short USB cable. Trying anything larger than a 6ft cable may yield poor results. The longer the cable, the more loss you can expect and when making this post a 15ft cable was tried and the result was the HackRF would only power up half way.
#. For best results, select a cable with a ferrite core. These cables are usually advertised to be noise reducing and are recognizable from the plastic block towards one end.
Screenshot before and after changing to a noise reducing cable (`view full size image <http://i.imgur.com/e64LASK.jpg>`__):
.. image:: ../images/noisereducingcablescreenshot.jpeg
:align: center
A shielded cable with ferrite core was used in the right-hand image.
The before and after images were both taken with the preamp on and the LNA and VGA both set to 24db.
Why isn't my HackRF detectable after I plug it into my computer?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If your HackRF isn't immediately detectable it is very possible that your USB cable is not meeting HackRF's requirements. HackRF requires quite a bit of supply current and solid USB 2.0 high speed communications to operate. It is common for HackRF to reveal cables with deficiencies such as carrying power but not data, carrying data but not enough power, etc. Please try multiple cables to resolve this issue. More than once people have gotten their HackRF to work after trying their fifth cable.

View file

@ -1,5 +0,0 @@
================
Virtual Machines
================
HackRF requires the ability to stream data at very high rates over USB. Unfortunately VM software typically has problems with USB passthrough; especially continuous high speed USB transfers. It is recommended to not use a HackRF with a VM.

Some files were not shown because too many files have changed in this diff Show more