标签:one 驱动 upd 版本号 说明 etc 软件 ror git
操作系统:
Ubuntu 18
硬件:
hackrf
备份 /etc/apt/sources.list
文件
sudo mv /etc/apt/sources.list /etc/apt/sourses.list.backup
sudo touch /etc/apt/sources.list && sudo gedit /etc/apt/sources.list
然后把选择如下源中的一个复制进去。
#中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
#阿里云源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
更新软件源和系统
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gnuradio hackrf libhackrf-dev gqrx-sdr rtl-sdr gr-osmosdr osmo-sdr libusb-1.0
配置好环境后,输入 hackrf_info
,如果出现下图所示,hackrf_info version
和 libhackrf version
都是未知的,说明系统安装的驱动版本和 hackrf one
的固件版本不匹配,需要升级驱动。
从该网址 https://github.com/mossmann/hackrf/releases 下载最新的版本(这里的版本是2018.01.1,需要找到对应的版本,不过很建议升级到最新固件)
xz -d hackrf-2018.01.1.tar.xz
tar xvf hackrf-2018.01.1.tar
cd hackrf-2018.01.1/host
mkdir build && cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig
如果 Firmware Version
的版本比较老,需要更新固件。进入firmware-bin
目录,执行以下操作
Flash hackrf_spiflash -w hackrf_one_usb.bin # 更新Flash
hackrf_cpldjtag -x hackrf_cpld_default.xsvf # 更新CPLD
更新后,按一下hackrf
的 reset
键,或者拔了USB线后重新再插上,输入 hackrf_info
可以看到驱动版本号。说明安装成功。