This project has moved. For the latest updates, please go here.

Bluetooth SDP - Service Discovery Protocol

The library contains support for creating, parsing, and dumping SDP records. This will generally be used in advanced scenarios only. For instance BluetoothListener by default creates a basic record based on the Service Class Id passed in.

To retrieve and dump the records containing a given UUID on a particular device one can use code like the following.

Guid uuid = ...
BluetoothDeviceInfo device = ...
ServiceRecord[] records = device.GetServiceRecords(uuid);
foreach(ServiceRecord curRecord in records) {
   ServiceRecordUtilities.Dump(curRecord, Console.Out);
}
For instance to see whether the device has an an Serial Port service, do a search for UUID BluetoothService.SerialPort, for OBEX Push use BluetoothService.ObexObjectPush, or too find all the services that use RFCOMM use BluetoothService.RFCommProtocol, or to find all the services, use BluetoothService.L2CapProtocol.


Creating Records
Connect by Service Name
Manual Record Creation
Testing if a device is in range

Last edited Jan 26, 2012 at 7:30 PM by alanjmcf, version 9