Namespaces
Variants
Actions
Revision as of 16:44, 30 November 2011 by Devnull (Talk | contribs)

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

Jump to: navigation, search

Bluetooth discovery in Qt Mobility may not report devices.

Article Metadata

Code Example
Tested with
Devices(s): Nokia C6-01

Compatibility
Platform(s): Qt mobility 1.2.1 and later
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: Devnull (30 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

Connect the Bluetooth headset and start listen an internet radio over the wireless lan.

Attempt to discover bluetooth devices. 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.

The example code: http://doc.qt.nokia.com/qtmobility-1.2/btscanner.html

The QBluetoothDeviceDiscoveryAgent API documentatiojn: http://doc.qt.nokia.com/qtmobility-1.2/qbluetoothdevicediscoveryagent.html

Solution

There is no known solution or workaround for the problem.

210 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved