Skip to content

Rush/bluetooth-serial-port

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiplatform Bluetooth serial port communication library

Based on Bluetooth serial port communication for Node.js

Pre-requests on Linux

  • CMake
  • Needs Bluetooth development packages to build

apt-get install build-essential libbluetooth-dev

Pre-request on OS X

  • CMake from MacPorts
  • Needs XCode and XCode command line tools installed.

Pre-request on Windows

  • CMake

Documentation

Basic usage

#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;
}

API

DeviceINQ

DeviceINQ::Create()

Returns new instance of DeviceINQ object

DeviceINQ::Inquire()

Returns list of bluetooth devices in range

DeviceINQ::SdpSearch(address)

Returns channelID of device at given address

LICENSE

This module is available under a FreeBSD license, see the LICENSE file for details.

About

multi-platform bluetooth serial port library for C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published