本文转载自:http://blog.csdn.net/hclydao/article/details/51451725
p6212中串口蓝牙在linux下的使用记录
一、linux蓝牙工具移植
主要使用到的工具及相关库如下:
bluez-libs-3.36
libxml2-2.7.4
dbus-1.0.2
glib-2.24.2
bluez-utils-3.36
openobex-1.5
下载相应的源码解压,按照上面的顺序进行编译.
bluez-libs-3.36中增加mk.sh内容如下
- #!/bin/sh
- ./configure --prefix=/usr/bluez --host=arm-linux --target=arm-linux CC=arm-cortex_a9-linux-gnueabi-gcc
- make
- make install
修改mk.sh权限直接运行,完成编译与安装,下同
libxml2-2.7.4中增加mk.sh内容如下
- #!/bin/sh
- ./configure --prefix=/usr/bluez --host=arm-linux --target=arm-linux CC=arm-cortex_a9-linux-gnueabi-gcc
- make
- make install
dbus-1.0.2中增加mk.sh内容如下
- #!/bin/sh
- echo ac_cv_have_abstract_sockets=yes>arm-linux.cache
- ./configure --prefix=/usr/bluez --host=arm-linux --target=arm-linux CC="arm-cortex_a9-linux-gnueabi-gcc -I/usr/bluez/include -L/usr/bluez/lib" --cache-file=arm-linux.cache --with-x=no
- make
- make install
glib-2.24.2中增加mk.sh内容如下
- #!/bin/sh
- echo ac_cv_type_long_long=