移植zynq平台下UbertoothOne运行环境

2023-02-28 12:51:00 浏览数 (1)

Ubertooth One是一款开源蓝牙扫描嗅探器,当然了,也可以扫描嗅探低功耗蓝牙,Ubertooth One是适用于蓝牙实验的开源2.4 GHz无线开发平台。

编译libbtbb

代码语言:javascript复制
tar zxvf libbtbb-2020-12-R1.tar.gz
cd libbtbb-2020-12-R1
mkdir build
cd build/
cmake .. -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g   -DCMAKE_INSTALL_PREFIX=/opt/ubertoothone/libbtbb
make
sudo make install

编译libusb

代码语言:javascript复制
tar zxvf libusb-1.0.26.tar.gz
cd libusb-1.0.26
./configure --host=arm-linux --prefix=/opt/Xilinx/SDK/2018.3/gnu/aarch32/lin/gcc-arm-linux-gnueabi/arm-linux-gnueabihf/libc/ CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g   --disable-udev

编译libbluetooth

代码语言:javascript复制
tar zxvf bluez-libs-3.36.tar.gz
cd bluez-libs-3.36
./configure --prefix=/opt/ubertoothone/libbluetooth/ --host=arm-linux --target=arm-linux CC=arm-linux-gnueabihf-gcc
make 
sudo make install

编译ubertooth

代码语言:javascript复制
tar zxvf ubertooth-2020-12-R1.tar.gz
cd ubertooth-2020-12-R1/host/
mkdir build
cd build/
cmake .. -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g   -DCMAKE_INSTALL_PREFIX=/opt/ubertoothone/ubertooth
make
sudo make install

#编译过程中遇到问题
1./home/anritsen/work/prj/BluetoothOne/zynq/ubertooth-2020-12-R1/host/ubertooth-tools/src/ubertooth-follow.c:22:10: fatal error: /opt/ubertoothone/libbluetooth/bluetooth/bluetooth.h: No such file or directory
 #include <bluetooth/bluetooth.h>
修改对应文件CMakeCache.txt中头文件路径为绝对路径
2.在设备上执行工具命令时提示缺少libatomic.so库,将交叉工具链SDK中的libatomic.so拷贝至设备上即可

0 人点赞