2016-11-29 111 views
3

初级问题:我如何在Ubuntu上安装bluez进行开发?

我想使用的驱动程序的BlueZ在我的树莓派一个简单的方法来连接到一个iPhone应用程序我写的,但我想第一个原型它在我的Ubuntu启动(我双启动一个macbook pro w/macOS sierra/Ubuntu 16.04)。我无法将蓝牙头“bluetooth.h”显示在我的c程序中。我试过做sudo apt-get install bluez,但是执行这个命令后我的系统中没有出现bluetooth.h头文件。这里是包括我的原型应用:

#include <stdio.h> 
#include <stdlib.h> 
#include <unistd.h> 
#include <sys/socket.h> 
#include <bluetooth/bluetooth.h> 
#include <bluetooth/hci.h> 
#include <bluetooth/hci_lib.h> 

当我gcc程序,我链接到-lbluetooth,但我的系统也无法找到库。

我应该使用BlueZ这个,对吧?我读过BlueZ是Linux的官方蓝牙协议栈,我打算把Raspbian Jesse放在我的覆盆子pi上;我只是理智地检查我是在正确的道路上。

回答