This page was last modified 11:17, 17 January 2008.
A simple way of discovering and selecting a single Bluetooth device
From Forum Nokia Wiki
An easy way of discovering and selecting a single Bluetooth device from a GUI component, is that of reusing a Notifier.
Following, is an example of how to achieve this simply, using synchronous operations. In your application you should probably make use of this technique using active objects.
The example below initiates a discovery for devices that support the Serial Port Profile.
void GetDeviceAddressL() { RNotifier btNotifier; User::LeaveIfError(btNotifier.Connect()); TBTDeviceSelectionParamsPckg selectionFilter; TBTDeviceResponseParamsPckg selectionResponse; selectionFilter().SetUUID(KSerialPortUUID); TRequestStatus status; btNotifier.StartNotifierAndGetResponse( status, KDeviceSelectionNotifierUid, selectionFilter, selectionResponse); User::WaitForRequest(status); btNotifier.Close(); User::LeaveIfError(status.Int()); // use the response data .... TBTDeviceName dname = selectionResponse().DeviceName(); TBTDeviceClass dclass = selectionResponse().DeviceClass(); // ... etc... return; }
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Connecting to Bluetooth SPP device | jameelh | Python | 5 | 2005-07-05 12:16 |
| bluetooth audio | hanes.billabong | Bluetooth Technology | 5 | 2005-04-09 01:20 |
| Determine if a phone has JAVA or not | jeswt | Mobile Java General | 4 | 2007-10-06 01:18 |
| No "StartNotifierAndGetResponse" UI bluetooth data exchange code error... | Gameryf | Bluetooth Technology | 2 | 2003-04-15 18:48 |
| device discovery system error, help | jugnoyasir | Symbian Networking & Messaging | 8 | 2005-07-05 04:15 |
