×
Namespaces

Variants
Actions
(Difference between revisions)

Bluetooth discovery in Qt Mobility may not report devices (Nokia C6)

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Subedit)
hamishwillee (Talk | contribs)

Revision as of 02:54, 29 November 2011

Bluetooth discovery in Qt Mobility does not report devices in the cache.

Article Metadata
Code ExampleTested with
Devices(s): Nokia C6-01
Compatibility
Platform(s): Qt mobility 1.2.1 and later
Symbian
Device(s): All with internal Bluetooth
Platform Security
Signing Required: DevCert required
Capabilities: ReadDeviceData LocalServices WriteDeviceData
Article
Keywords: QBluetoothDeviceDiscoveryAgent, BluetoothLinkManagerDeviceDiscoverer
Created: Devnull (24 Nov 2011)
Last edited: hamishwillee (29 Nov 2011)

Description

Qt Bluetooth device discovery is achieved using the Qt Mobility API QBluetoothDeviceDiscoveryAgent start() method. On Symbian this will only discover new devices, ignoring those that have been previously cached.

The reason for this is that the Symbian implementation explicitly ignores cached results by setting the KHostResIgnoreCache flag:

void BluetoothLinkManagerDeviceDiscoverer::startDiscovery(const uint discoveryType)
{
...
m_addr.SetAction(KHostResInquiry | KHostResName | KHostResIgnoreCache);
...
}

How to reproduce

Pair with all local devices. Then attempt to discover the devices again. No devices are discovered - and in the Qt Creator debug window you can see the following messages

[Qt Message] void QtMobility::BluetoothLinkManagerDeviceDiscoverer::RunL() 0 
[Qt Message] void QtMobility::BluetoothLinkManagerDeviceDiscoverer::RunL() -25

Where -25 means KErrHostResNoMoreResults.

Solution

There is no known solution or workaround for the problem.

107 page views in the last 30 days.
×