安装UHD
我的系统是Ubuntu18.04,终端输入以下命令
git clone git://github.com/EttusResearch/uhd.git
boost库安装
参考官网资料:http://files.ettus.com/manual/page_build_guide.html
下载地址Download URL: http://www.boost.org/users/download/
找到例程
例程所在的位置是 uhd/host/examples/rx_samples_to_file.cpp
编译例程
安装好所需库后,编译例程
g++ rx_samples_to_file.cpp -o rx -luhd
提示以下错误
未定义引用 boost program_options
linux系统下编译 后面需要加上
-lboost_program_options
修改参数
设置 接收通道、天线、增益、采样率、带宽、文件名等参数即可实现数据连续采集到指定文件
默认采集为I/Q数据 16位