Based on Bluetooth serial port communication for Node.js
- CMake
- Needs Bluetooth development packages to build
apt-get install build-essential libbluetooth-dev
- CMake from MacPorts
- Needs XCode and XCode command line tools installed.
- CMake
#include <iostream>
#include <vector>
#include "../src/DeviceINQ.h"
using namespace std;
void main()
{
DeviceINQ *inq = DeviceINQ::Create();
vector<device> devices = inq->Inquire();
for (auto it = devices.begin(); it != devices.end(); ++it)
{
cout << it->name << " " << it->address << endl;
}
cout << endl << "done, found " << devices.size() << " device(s)" << endl;
}
Returns new instance of DeviceINQ object
Returns list of bluetooth devices in range
Returns channelID of device at given address
This module is available under a FreeBSD license, see the LICENSE file for details.