
© 2009-2010 OMTP Ltd. All rights reserved. OMTP and OMTP BONDI are registered trademarks of OMTP Ltd.
BONDI bluetooth API.
RemoteDeviceArray
LocalDevice
DiscoveryListener
ServiceSuccessCallback
ReadWriteCallback
SocketSuccessCallback
RemoteDevice
Socket
Stream
DeviceClass
| Interface | Method |
|---|---|
| LocalDevice | PendingOperation findDevices(SuccessCallback successCallback, ErrorCallback errorCallback, DiscoveryListener listener, Map connectOptions) PendingOperation findService(ServiceSuccessCallback successCallback, ErrorCallback errorCallback, DOMString address, DOMString uuid, Map searchOptions, Map connectOptions) PendingOperation connect(SocketSuccessCallback successCallback, ErrorCallback errorCallback, ReadWriteCallback rwCallback, DOMString uri, Map connectOptions) PendingOperation listen(SocketSuccessCallback successCallback, ErrorCallback errorCallback, ReadWriteCallback rwCallback, DOMString uuid, Map serviceOptions, Map connectOptions) |
| DiscoveryListener | void deviceDiscovered(RemoteDevice device) |
| ServiceSuccessCallback | void onSuccess(DOMString uri) |
| ReadWriteCallback | void recevied(Socket socket) void sent(Socket socket, int len) void error(Socket socket, Object e) |
| SocketSuccessCallback | void onSuccess(Socket uri) |
| RemoteDevice | |
| Socket | void close() |
| Stream | PendingOperation close(SuccessCallback successCallback, ErrorCallback errorCallback) PendingOperation flush(SuccessCallback successCallback, ErrorCallback errorCallback) ByteArray read(unsigned long byteCount) PendingOperation write(SuccessCallback successCallback, ErrorCallback errorCallback, ByteArray byteData) |
| DeviceClass |
This API provides access to the bluetooth functionality. This set of interfaces provides a framework for short range device and service discovery of other bluetooth devices.
Once a service has been discovered it is then possible to connect to this service and exchange data.
This is the list of URIs used to declare this API's features, for use in bondi.requestFeature. For each URL, the list of functions covered is provided.
Call to LocalDevice.findDevices,LocalDevice.findService
Device capabilities:
localdevice.discoveryRemoteDeviceArray
Array of remote devices.
typedef sequence<RemoteDevice> RemoteDeviceArray;
This array type is used to get cached, preknown and trusted devices.
LocalDevice
Interface for the local bluetooth radio
interface LocalDevice {
readonly attribute DOMString name;
readonly attribute DOMString address;
attribute unsigned long deviceClass setraises(SecurityError, DeviceAPIError);
attribute unsigned long discoveryMode setraises(SecurityError, DeviceAPIError);
readonly attribute RemoteDeviceArray cachedDevices;
readonly attribute RemoteDeviceArray preknownDevices;
readonly attribute RemoteDeviceArray trustedDevices;
readonly attribute int l2cap_max_receiveMTU;
readonly attribute boolean master_switch;
readonly attribute int max_connected_devices;
readonly attribute int sd_max;
readonly attribute boolean connected_inquiry;
readonly attribute boolean connected_inquiry_scan;
readonly attribute boolean connected_page;
readonly attribute boolean connected_page_scan;
PendingOperation findDevices(in SuccessCallback successCallback,
in ErrorCallback errorCallback,
in DiscoveryListener listener,
in Map connectOptions)
raises(DeviceAPIError);
PendingOperation findService(in ServiceSuccessCallback successCallback,
in ErrorCallback errorCallback,
in DOMString address,
in DOMString uuid,
in Map searchOptions,
in Map connectOptions) raises(DeviceAPIError);
PendingOperation connect(in SocketSuccessCallback successCallback,
in ErrorCallback errorCallback,
in ReadWriteCallback rwCallback,
in DOMString uri,
in Map connectOptions);
PendingOperation listen(in SocketSuccessCallback successCallback,
in ErrorCallback errorCallback,
in ReadWriteCallback rwCallback,
in DOMString uuid,
in Map serviceOptions,
in Map connectOptions);
};
readonly
DOMString nameThe local device friendly name
alert("friendly name : " + bondi.bluetooth.name);
readonly
DOMString addressThe local device bluetooth address
The Bluetooth address will never be null. The Bluetooth address will be 12 characters long. Valid characters are 0-9 and A-F.
alert(bondi.bluetooth.LocalDevice.address);
unsigned long deviceClassThe local device class
The Device Class consists of :
service classes : e.g. poistioning, networking etc
major device classes : e.g. computer , phone etc
minor device classes : the meaning of these bits depends on the major device class
var serviceClass = bondi.bluetooth.deviceClass & 0xFFE000;
var services = "";
if (serviceClass & bondi.bluetooth.DeviceClass.SERVICE_POSITIONING !== 0) {
services += "Posiitioning";
}
if (serviceClass & bondi.bluetooth.DeviceClass.SERVICE_NETWORKING !== 0) {
services += "Networking";
} // and the rest
alert("Local Device Supports the following services " + services);
unsigned long discoveryModeset the Local Devices discovery mode
The dicoverable mode of the device can be one of :
DiscoveryAgent.NOT_DISCOVERABLE : the device cannot be found by other devices
(i.e. it won't reposnd to inquiry scans)
DiscoveryListener.GIAC : the device responds to General/Unlimited
Inquiry Access Code inquiries, i.e. the device is discoverable for an indefinite
amount of time
DiscoveryListener.LIAC : the device responds to Limited Inquiry
Access Code inquiries, i.e the device is discoverable for a limited amount
of time (180 seconds).
value in the range 0x9E8B00 to 0x9E8B3F
TODO :
bondi.bluetooth.discoveryMode = bondi.bluetooth.DiscoveryListener.LIAC;
readonly
RemoteDeviceArray cachedDevicesThe cached devices.
A list of devices that were found in previous inquiries.
readonly
RemoteDeviceArray preknownDevicesThe pre-known devices.
A list of pre-known devices.
readonly
RemoteDeviceArray trustedDevicesThe trusted devices.
A list of trusted devices.
readonly
int l2cap_max_receiveMTUthe maiximum supported MTU
alert(bondi.bluetooth.l2cap_max_receiveMTU);
readonly
boolean master_switchtrue if this device support role switch
alert(bondi.bluetooth.master_switch);
readonly
int max_connected_devicesThe maximum number of connected device.
This value can be greater than 7 if parking is supported.
alert(bondi.bluetooth.max_connected_devices);
readonly
int sd_maxThe maximum number of simultaneous service searches.
alert(bondi.bluetooth.sd_max);
readonly
boolean connected_inquirytrue if device discovery supported while connceted to another device.
alert(bondi.bluetooth.connected_inquiry);
readonly
boolean connected_inquiry_scantrue if this device will respond to a device discovery while connceted to another device.
alert(bondi.bluetooth.connected_inquiry_scan);
readonly
boolean connected_pagetrue if this device can do a page scan while connceted to another device.
page scanning is required to retrieve the friendly name of another device.
alert(bondi.bluetooth.connected_page);
readonly
boolean connected_page_scantrue if this device can respond a page scan while connceted to another device.
page scanning is required to retrieve the friendly name of another device. #*
alert(bondi.bluetooth.connected_page_scan);
findDevicesSearch for devices in the area.
PendingOperation findDevices(in SuccessCallback successCallback, in ErrorCallback errorCallback, in DiscoveryListener listener, in Map connectOptions);
Start an inquiry in the specified mode. Use the listener to handle device and service discovery events.
TODO:
INVALID_ARGUMENT_ERROR if the params are invalid (for example invalid accesss code, listener is undefined).
var listener = {
discovered: {},
deviceDiscovered: function (device) {
this.discovered[this.discovered.length] = device;
}
};
function errorCB(err) {
alert("BONDI bluetooth API device discovery failed : " + err.message);
}
function successCB() {
for (var i = 0; i < listener.devices.length; i++) {
alert(listener.devices[i].name);
}
}
bondi.bluetooth.findDevices(successCB, errorCB, listener);
// find devices in LIAC mode for 60 seconds
bondi.bluetooth.findDevices(successCB, errorCB, listener, {mode: bondi.bluetooth.DiscoveryAgent.LIAC});
// find devices for 12 seconds only
bondi.bluetooth.findDevices(successCB, errorCB, listener, {timeout: 12000});
// find devices until operation is cancelled
var operation = bondi.bluetooth.findDevices(successCB, errorCB, listener, {timeout: 0});
findServiceFind a matching service on a remote device.
PendingOperation findService(in ServiceSuccessCallback successCallback, in ErrorCallback errorCallback, in DOMString address, in DOMString uuid, in Map searchOptions, in Map connectOptions);
search a device to determine if it hosts the service specified by the UUID. The uuid must be in the ServiceClassIDList on the remote host. This method will also search for the optional protocol UUID (defaults to rfcomm) and optional name. If multiple services match then the first service is returned.
function errorCB(err) {
alert("BONDI bluetooth API device discovery failed : " + err.message);
}
function successCB(uri) {
if (uri !== undefined) {
alert("bondi.bluetooth : discovered service : " + uri);
} else {
alert("bondi.bluetooth : no such service");
}
}
// search for rfcomm service with 16 bit UUID "E205"
var operation = bondi.bluetooth.findService(successCB, errorCB, "112233445566", "E205");
// 32 bit UUID, same search as above
var operation = bondi.bluetooth.findService(successCB,
errorCB,
"112233445566",
"000000E205");
// 128 bit UUID but same search as above
var operation = bondi.bluetooth.findService(successCB,
errorCB,
"112233445566",
"0000E205-0000-1000-8000-00805F9B34FB");
// search for an rfcomm service named "bondi"
bondi.bluetooth.findService(successCB, errorCB, "112233445566", "E205", {name: "bondi"});
// search for an rfcomm connection, the generated uri specifies that the connection
// must be encrypted
bondi.bluetooth.findService(successCB, errorCB, "112233445566", "E205", {}, {encrypted: true});
connectCreate a socket and connect to the remote service for this bluetooth uri connector string.
PendingOperation connect(in SocketSuccessCallback successCallback, in ErrorCallback errorCallback, in ReadWriteCallback rwCallback, in DOMString uri, in Map connectOptions);
Create a new (connected) socket representing the a connection to the remote service.
TODO:
var uri; // find the service first
var operation;
function successCB(socket) {
if (socket.operation === undefined) {
alert("bondi.bluetooth connection to " + socket.device.address);
} else {
alert("bondi.bluetooth connection from " + socket.device.address);
}
}
function errorCB(err) {
alert("BONDI bluetooth connection failed : " + err.message);
}
var dataHandler = {
received : function (socket) {
var len = socket.byteAvailable();
alert("bondi.bluetooth : " + len + " bytes available");
alert(socket.read().toString());
},
sent : function (socket, len) {
alert("bondi.bluetooth : " + len + " bytes sent");
},
error : function (socket, e) {
alert("bondi.bluetooth : error " + e.msg);
}
};
try {
operation = bondi.bluetooth.connect(successCB, errorCB, uri);
} catch (e) {
alert(e.message);
}
listenCreate a server socket for a service.
PendingOperation listen(in SocketSuccessCallback successCallback, in ErrorCallback errorCallback, in ReadWriteCallback rwCallback, in DOMString uuid, in Map serviceOptions, in Map connectOptions);
Create a new server socket representing a service called name with the specified uuid in the service class idl ist.
TODO:
var operation;
function errorCB(err) {
alert("BONDI bluetooth server connection failed : " + err.message);
}
function successCB(socket) {
if (socket.operation === undefined) {
alert("bondi.bluetooth connection to " + socket.device.address);
} else {
alert("bondi.bluetooth connection from " + socket.device.address);
}
}
var dataHandler = {
received : function (socket) {
var len = socket.byteAvailable();
alert("bondi.bluetooth : " + len + " bytes available");
alert(socket.read().toString());
},
sent : function (socket, len) {
alert("bondi.bluetooth : " + len + " bytes sent");
},
error : function (socket, e) {
alert("bondi.bluetooth : error " + e.msg);
}
};
try {
operation = bondi.bluetooth.listen(successCB, errorCB, dataHandler, "E205");
} catch (e) {
alert(e.message);
}
// or a service with a name
try {
operation = bondi.bluetooth.listen(successCB, errorCB, dataHandler, "E205", {name: "bondi"});
} catch (e) {
alert(e.message);
}
// or a service that must be encrypted
try {
operation = bondi.bluetooth.listen(successCB, errorCB, dataHandler, "E205", {}, {encrypted: true});
} catch (e) {
alert(e.message);
}
DiscoveryListener
Discovery event listener class.
interface DiscoveryListener {
const unsigned long NOT_DISCOVERABLE = 0;
const unsigned long GIAC = 0x9E8B33;
const unsigned long LIAC = 0x9E8B00;
const unsigned long AC_START_RANGE = 0x9E8B00;
const unsigned long AC_END_RANGE = 0x9E8B3F;
void deviceDiscovered(in RemoteDevice device);
};
This listener defines methods to handle device discovery notifications. Note that it is possible that no device is found so this callback may never be called.
var listener = {
discovered: [],
deviceDiscovered: function (device) {
this.discovered[this.discovered.length] = device;
alert("Discovered device " + device.address);
}
};
function errorCB(err) {
alert("BONDI bluetooth API device discovery failed : " + err.message);
}
function successCB(devices) {
alert("discovery complete");
}
bondi.bluetooth.findDevices(successCB, errorCB, listener);
unsigned long NOT_DISCOVERABLETakes the device out of discoverable mode.
unsigned long GIACGeneral/Unlimited Inquiry Access Code
This is used to specify the type of inquiry to complete or respond to.
unsigned long LIACLimited Dedicated Inquiry Access Code
This is used to specify the type of inquiry to complete or respond to.
unsigned long AC_START_RANGEAccess code range starting value.
unsigned long AC_END_RANGEAccess code range end value.
deviceDiscoveredMethod invoked when a new device is discovered.
void deviceDiscovered(in RemoteDevice device);
A new device is in range.
ServiceSuccessCallback
Success callback for service discovery.
[Callback=FunctionOnly, NoInterfaceObject] interface ServiceSuccessCallback {
void onSuccess(in DOMString uri);
};
If the service couldn't be found then the service uri may be undefined.
onSuccessMethod invoked at the end of a successfull service search.
void onSuccess(in DOMString uri);
var uuid = "E205";
var address = "112233445566";
function errorCB(err) {
alert("BONDI bluetooth API device discovery failed : " + err.message);
}
function successCB(uri) {
if (uri !== undefined) {
alert("bondi.bluetooth : discovered service " + uri);
} else {
alert("bondi.bluetooth : no such service " + uuid + " on " + address);
}
}
bondi.bluetooth.findService(successCB, errorCB, uuid, address);
ReadWriteCallback
Callback interface used to indicate when data is read or written
[Callback=FunctionOnly, NoInterfaceObject] interface ReadWriteCallback {
void recevied(in Socket socket);
void sent(in Socket socket,in int len);
void error(in Socket socket,in Object e);
};
var dataHandler = {
name : function (socket) {
return (socket.device.name === undefined ? socket.device.address : socket.device.name);
},
received : function (socket) {
var len, str;
len = socket.byteAvailable();
str = "p class='read'>" + socket.read().toString() + "/p>";
alert("bondi.bluetooth : " + len + " bytes available from " + this.name(socket));
document.getElementById("content").innerHTML += str;
},
sent : function (socket, len) {
alert("bondi.bluetooth : " + len + " bytes sent to " + this.name(socket));
document.getElementById("sendBtn").className = "enabled";
}
};
document.getElementById("sendBtn").className = "disabled";
try {
bondi.bluetooth.connect(successCB,
errorCB,
dataHandler,
uri);
} catch (e) {
alert("error connecting to remote device " + e);
}
document.getElementById("sendBtn").className = "enabled";
receviedThis method is invoked when data is available to read.
void recevied(in Socket socket);
sentThis method is invoked when data was sent
void sent(in Socket socket, in int len);
errorThis method is invoked when an error occurrs
void error(in Socket socket, in Object e);
SocketSuccessCallback
Success callback for socket connections (both client and server).
[Callback=FunctionOnly, NoInterfaceObject] interface SocketSuccessCallback {
void onSuccess(in Socket uri);
};
onSuccessMethod invoked when a connection is created (either through a call to create or a listen).
void onSuccess(in Socket uri);
function errorCB(err) {
alert("BONDI bluetooth API device discovery failed : " + err.message);
}
function successCB(socket) {
if (socket.operation === undefined) {
alert("bondi.bluetooth : connection to " + socket.device.address);
} else {
alert("bondi.bluetooth : connection from " + socket.device.address);
}
}
// service uri came from findSrvice call
bondi.bluetooth.connect(successCB, errorCB, uri);
// listen for incoming rfcomm connections from clients
bondi.bluetooth.listen(successCB, errorCB, "E205");
RemoteDevice
Interface representing a Remote Bluetooth device
interface RemoteDevice {
readonly attribute boolean trusted;
readonly attribute DOMString name;
readonly attribute DOMString address;
readonly attribute unsigned long deviceClass;
readonly attribute boolean authenticated;
readonly attribute boolean authorized;
readonly attribute boolean encrypted;
};
readonly
boolean trustedIs this bluetooth device trusted
readonly
DOMString nameGet the remote device friendly name
The remote device will only be contacted if the name isn't already known.
readonly
DOMString addressThe local device bluetooth address
The Bluetooth address will never be null. The Bluetooth address will be 12 characters long. Valid characters are 0-9 and A-F.
var devices = bondi.bluetooth.preknownDevices;
var str = "div id='title'>Pre Known Devices(" + devices.length + ")/div>";
str += "div id='preknown'>";
str += "table>";
var i;
try {
for (i = 0; i devices.length; i++) {
var d = devices[i];
str += "tr>td>a href='javascript:displayDetails(" + d.address + ");'>" + d.name + "/a>/td>/tr>";
}
} catch (e) {
alert(e.message);
}
str += "/table>";
readonly
unsigned long deviceClassGet the device class
readonly
boolean authenticatedIs the connection to the remote device authenticated
Authentication is a means of verifying the identity of a remote device.
readonly
boolean authorizedIs this device authorized
Some Bluetooth systems may allow the user to permanently authorize a remote device for all local services. When a device is authorized in this way, it is known as a "trusted device".
readonly
boolean encryptedIs data send or received from this device encrypted.
Note : encrypting any connection to a remote device (through the connectOptions on connect or listen) implies all data transfered between thee 2 devices is encrtypted.
Socket
Socket interface .
interface Socket {
readonly attribute RemoteDevice device;
readonly attribute PendingOperation server;
readonly attribute Stream stream;
void close() raises(DeviceAPIError);
};
This interface represents a connection between the Local device and a Remote device.
readonly
RemoteDevice deviceThe device on the other end of the connection
readonly
PendingOperation serverThe pending operation for the listen.
This value is undefined if the socket is as a result of calling connect.
readonly
Stream streamThe stream.
closeClose the socket.
void close();
Stream
Bluetooth Stream API.
interface Stream {
readonly attribute boolean eof;
readonly attribute unsigned long available;
PendingOperation close(in SuccessCallback successCallback,
in ErrorCallback errorCallback);
PendingOperation flush(in SuccessCallback successCallback,
in ErrorCallback errorCallback);
ByteArray read(in unsigned long byteCount)
raises(DeviceAPIError);
PendingOperation write(in SuccessCallback successCallback,
in ErrorCallback errorCallback,
in ByteArray byteData)
raises(DeviceAPIError);
};
A Stream represents a handle to a connected service for read and/or write operations.
A series of read/write methods are available that permit both binary and text to be processed.
Once a stream is closed, any operation attempted on this stream will result in a normal JavaScript error.
readonly
boolean eofIndicates whether or not the stream has been closed.
true if the stream was closed.
var stream;
if (stream.eof) {
// stream has been read completely
}
readonly
unsigned long availableReturns the number of bytes that are available for reading from the stream.
The number of bytes available for reading is the maximum amount of bytes that can be read in the next read operation.
-1 if eof is true.
alert(stream.available); // displays the available bytes to be read
closeCloses this Stream.
PendingOperation close(in SuccessCallback successCallback, in ErrorCallback errorCallback);
Flushes any pending buffered writes and closes the Stream. Always succeeds. Note that pending writes will not succeed.
function errorCB(err) {
alert("bluetooth.bondi stream close failed " + err.message);
}
function successCB() {
alert("bluetooth.bondi stream closed");
}
// closes this stream, subsequent access to stream
// throws exception
stream.close(successCB, errorCB);
flushFlush the stream.
PendingOperation flush(in SuccessCallback successCallback, in ErrorCallback errorCallback);
Flushes any pending writes.
function errorCB(err) {
alert("bluetooth.bondi stream flush failed " + err.message);
}
function successCB() {
alert("bluetooth.bondi stream flushed");
}
stream.flush(successCB, errorCB);
readReads the specified number of bytes from this Stream.
ByteArray read(in unsigned long byteCount);
If 0 is supplied it will read all available bytes in a single read operation.
IO_ERROR if an error occurs during readBytes.
// reads up to 256 bytes from the stream
var raw = stream.readBytes(256);
for (var i = 0; i < raw.length; i++) {
// raw[i] contains the i-th byte of the current data chunk
}
writeWrites the specified bytes to this Stream.
PendingOperation write(in SuccessCallback successCallback, in ErrorCallback errorCallback, in ByteArray byteData);
IO_ERROR if an error occurs during writeBytes.
var stream;
var bytes = stream.readBytes(256);
function errorCB(err) {
alert("bluetooth.bondi write failed " + err.message);
}
function successCB() {
alert("bluetooth.bondi write completed");
}
// writes the bytes read from in to out
stream.writeBytes(successCB, errorCB, bytes);
DeviceClass
interface DeviceClass {
const unsigned long SERVICE_MASK = 0xFFE000;
const unsigned long SERVICE_POSITIONING = 0x10000;
const unsigned long SERVICE_NETWORKING = 0x20000;
const unsigned long SERVICE_RENDERING = 0x40000;
const unsigned long SERVICE_CAPTURING = 0x80000;
const unsigned long SERVICE_OBJECT_TRANSFER = 0x100000;
const unsigned long SERVICE_AUDIO = 0x200000;
const unsigned long SERVICE_TELEPHONY = 0x400000;
const unsigned long SERVICE_INFORMATION = 0x800000;
const unsigned long MAJOR_DEVICE_MASK = 0x1F00;
const unsigned long MISCELLANEOUS_MAJOR_DEVICE = 0x000;
const unsigned long COMPUTER_MAJOR_DEVICE = 0x100;
const unsigned long PHONE_MAJOR_DEVICE = 0x200;
const unsigned long NETWORKING_MAJOR_DEVICE = 0x300;
const unsigned long AUDIO_VISUAL_MAJOR_DEVICE = 0x400;
const unsigned long PERIPHERAL_MAJOR_DEVICE = 0x500;
const unsigned long IMAGING_MAJOR_DEVICE = 0x600;
const unsigned long WEARABLE_MAJOR_DEVICE = 0x700;
const unsigned long TOY_MAJOR_DEVICE = 0x800;
const unsigned long UNCATEGORIZED_MAJOR_DEVICE = 0x1F00;
const unsigned long MINOR_DEVICE_MASK = 0xFC;
};
DeviceClass comprises of 3 components : Service Classes - The major service classes define the services available on a device, e.g. positioning , networking etc. The device can have MANY service classes, i.e. it can provide any number of services. Major Device class - A device can only have one major device class e.g. computer , phone etc. Minor Device class - the meaning of this value depends on the major device class. For example if the major device class is imaging then the minor device class then specifies whether the device is a camera, scanner, or printer etc.
unsigned long SERVICE_MASKThe mask to get the Service bits.
unsigned long SERVICE_POSITIONINGRepresents the Positioning Major Service Class.
The value of SERVICE_POSITIONING is 0x10000 (65536).
unsigned long SERVICE_NETWORKINGRepresents the Networking (LAN, Ad hoc, ...) Major Service Class.
The value of SERVICE_NETWORKING is 0x20000 (131072).
unsigned long SERVICE_RENDERINGRepresents the Rendering (Printing, Speaker, ...) Major Service Class.
The value of SERVICE_RENDERING is 0x40000 (262144).
unsigned long SERVICE_CAPTURINGRepresents the Capturing (Scanner, Microphone, ...) Major Service Class.
The value of SERVICE_CAPTURING is 0x80000 (524288).
unsigned long SERVICE_OBJECT_TRANSFERRepresents the Object Transfer (v-Inbox, v-Folder, ...) Major Service Class.
The value of SERVICE_OBJECT_TRANSFER is 0x100000 (1048576).
unsigned long SERVICE_AUDIORepresents the Audio (Speaker, Microphone, Headset service, ...) Major Service Class.
The value of SERVICE_AUDIO is 0x200000 (2097152).
unsigned long SERVICE_TELEPHONYRepresents the Telephony (Cordless telephony, Modem, Headset service, ...) Major Service Class.
The value of SERVICE_TELEPHONY is 0x400000 (4194304).
unsigned long SERVICE_INFORMATIONRepresents the Information (WEB-server, WAP-server, ...) Major Service Class.
The value of the SERVICE_INFORMATION is 0x800000 (8388608).
unsigned long MAJOR_DEVICE_MASKThe mask to get the major device bits.
unsigned long MISCELLANEOUS_MAJOR_DEVICERepresents the Miscellaneous Major Device Class.
unsigned long COMPUTER_MAJOR_DEVICERepresents the Computer Major Device Class (e.g. laptop, desktop , PDA etc.).
unsigned long PHONE_MAJOR_DEVICERepresents the Phone Major Device Class (e.g. cell, cordless, smart phone etc.)
unsigned long NETWORKING_MAJOR_DEVICERepresents the LAN/Networking Major Device Class
unsigned long AUDIO_VISUAL_MAJOR_DEVICERepresents the Audio/Visual Major Device Class (e.g headset, handsfree etc.)
unsigned long PERIPHERAL_MAJOR_DEVICERepresents the Peripheral Major Device Class (e.g keyboard, mouse etc.)
unsigned long IMAGING_MAJOR_DEVICERepresents the Imaging Major Device Class (e.g display, camera, scanner etc.)
unsigned long WEARABLE_MAJOR_DEVICERepresents the Wearable Major Device Class (e.g wrist watch, pager, jacket etc.)
unsigned long TOY_MAJOR_DEVICERepresents the Toy Major Device Class (e.g robot , vehicle, doll/action figure etc.)
unsigned long UNCATEGORIZED_MAJOR_DEVICERepresents the Uncategorized Major Device Class
unsigned long MINOR_DEVICE_MASKThe mask to get the minor device bits. The exact meaning of these bits depends on the major device class. Please refer to http://www.bluetooth.org/assigned-numbers/ for more detail.