Coder Social home page Coder Social logo

kholia / airspy-utils Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 4.0 5.45 MB

Airspy-Utils is a small software collection to help with firmware related operations on Airspy HF+ devices.

Python 100.00%
airspy-hf-discovery airspy-hf airspyhf airspy firmware firmware-tools util utility tool linux

airspy-utils's Introduction

Airspy-Utils

Airspy-Utils is a small software collection to help with firmware related operations on Airspy HF+ devices on Linux (and other free systems).

Why? For 'best results' it is often recommended to deploy the latest firmware. This small software utility collection helps Linux users with deploying the latest Airspy firmware.

UPDATE: The sole purpose of this work is to help out Linux users (like myself). I am NOT interested in starting licensing debates / controversies related to the upstream Airspy project. I am a just a new Airspy Linux customer who has zero knowledge about DSP (none is required for this work), and Airspy's previous history, behaviour, and origin.

Currently Supported Devices

  • Airspy HF+ Discovery

This is the only Airspy device I have. Hint: Sponsorships can change this ;)

Software Requirements

  • Python 3.x

  • A modern Linux distribution (Ubuntu >= 20.04 is recommended)

Setup

sudo apt install bossa-cli python3-pip airspyhf -y
git clone https://github.com/kholia/airspy-utils.git

cd airspy-utils

pip3 install -r requirements.txt

Usage

See firmware version:

$ python3 hfplus_fw.py
R3.0.6-CD

ATTENTION: Please verify if the firmware is BB or CD. This is IMPORTANT.

See firmware version:

$ python3 hfplus_fw.py  # after firmware upgrade
R3.0.7-CD

Backup calibration:

$ python3 hfplus_ppb.py -d > file

$ hexdump file
0000000 71b0 a5ca 0000 0000 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
*
0000100

Read calibration (ppb) value:

$ python3 hfplus_ppb.py -r
0

Write calibration (ppb) value:

python3 hfplus_ppb.py -w -p 0

Reboot device in bootloader (programming) mode:

python3 hfplus_reboot.py -b

In bootloader mode, running lsusb should show something like:

Bus 003 Device 016: ID 03eb:6124 Atmel Corp. at91sam SAMBA bootloader

Reboot device in normal mode:

python3 hfplus_reboot.py -n -p /dev/ttyACM0

Note: You may need to replace /dev/ttyACM0 with the actual value for your setup. It might be /dev/ttyACM1 for example.

Grab official firmware:

wget https://airspy.com/downloads/airspy-hf-flash-20200604.zip

unzip airspy-hf-flash-20200604.zip

cp airspy-hf-flash/hfplus-firmware-cd.bin firmware.bin  # ATTENTION: for devices using 'CD' firmware
# cp airspy-hf-flash/hfplus-firmware-bb.bin firmware.bin  # ATTENTION: for devices using 'BB' firmware

Full process to update the firmware (and restore the calibration):

python3 hfplus_reboot.py -b

sudo bossac -u -p /dev/ttyACM0  # you can try without sudo too

sudo bossac -e -b -v -p /dev/ttyACM0 -w firmware.bin

python3 hfplus_reboot.py -n -p /dev/ttyACM0

python3 hfplus_ppb.py -w -p 0  # use your own calibration value here

Check firmware version using the official software:

$ airspyhf_info
AirSpy HF library version: 1.6.8

S/N: 0xXYZ
Part ID: 0x00000002
Firmware Version: R3.0.7-CD
Available sample rates: 912 kS/s 768 kS/s 456 kS/s 384 kS/s 256 kS/s 192 kS/s

References

My consulting services

๐Ÿ’š Are you looking for commercial support with this or similar stuff? I am available over email / phone for a chat. Note: Project sponsors get access to direct support.

Testimonials

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

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

  • D3 photo D3

    Data-Driven Documents codes.