×
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
Devnull (Talk | contribs)
(Devnull -)
hamishwillee (Talk | contribs)
m (Text replace - "Category:MeeGo" to "Category:MeeGo Harmattan")
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Qt Mobility]][[Category:Connectivity]]
+
[[Category:Qt Mobility]][[Category:Connectivity]][[Category:Bluetooth]]
{{Abstract| Qt Bluetooth discovery omit the devices in the cache from the results }}  
+
{{Abstract|Bluetooth discovery in Qt Mobility may not report devices. }}  
 
+
 
{{ArticleMetaData
 
{{ArticleMetaData
 
|sourcecode= http://doc.qt.nokia.com/qtmobility-1.2/btscanner.html
 
|sourcecode= http://doc.qt.nokia.com/qtmobility-1.2/btscanner.html
 
|installfile=  
 
|installfile=  
|devices= ''devices=Nokia C6-01"
+
|devices= Nokia C6-01  
|sdk= [http://qt.nokia.com/downloads/ Nokia Qt SDK 1.1.4] -->
+
|sdk= [http://qt.nokia.com/downloads/ Nokia Qt SDK 1.1.4]
|platform=  Qt mobility 1.2.1 and later -->
+
|platform=  Qt mobility 1.2.1 and later
|devicecompatability= must have internal bluetooth -->
+
|devicecompatability=All with internal Bluetooth
|signing=
+
|signing=DevCert required
 
|capabilities= ReadDeviceData LocalServices WriteDeviceData
 
|capabilities= ReadDeviceData LocalServices WriteDeviceData
 
|keywords= QBluetoothDeviceDiscoveryAgent, BluetoothLinkManagerDeviceDiscoverer
 
|keywords= QBluetoothDeviceDiscoveryAgent, BluetoothLinkManagerDeviceDiscoverer
Line 18: Line 17:
 
|update-by=<!-- After significant update: [[User:username]]-->
 
|update-by=<!-- After significant update: [[User:username]]-->
 
|update-timestamp=<!-- After significant update: YYYYMMDD -->
 
|update-timestamp=<!-- After significant update: YYYYMMDD -->
|creationdate= <!-- Format YYYYMMDD -->
+
|creationdate=20111124
|author= <!-- Display as link [[User:username]] -->
+
|author=[[User:Devnull]]
 
}}
 
}}
  
 
== Description==
 
== Description==
  
Bluetooth devices which are listed in the cache cannot be retrieved with Qt mobility APIs
+
Bluetooth device discovery on Symbian using the Qt Mobility API [http://doc.qt.nokia.com/qtmobility-1.2/qbluetoothdevicediscoveryagent.html QBluetoothDeviceDiscoveryAgent]  may not report some local devices when both Bluetooth audio and wireless data connections are active.
  
 
== How to reproduce ==
 
== How to reproduce ==
  
Bluetooth device names are cached after each inquiry. Upon a new paired device process is initiated, these cached devices shown first to the user for convinience.
+
Connect a Bluetooth headset and start listening an internet radio over the wireless network.
  
Similar inquiry can be initiated with Qt mobility APIs using QBluetoothDeviceDiscoveryAgent::start() method.
+
Attempt to discover bluetooth devices with the API. No devices are discovered - and in the Qt Creator debug window you can see the following messages
 
+
<code text>
The result that this Qt mobility APIs provide can be shorter however. It is possible to receive the following output in Qt creator before all of the available devices shown:
+
<code>
+
 
[Qt Message] void QtMobility::BluetoothLinkManagerDeviceDiscoverer::RunL() 0  
 
[Qt Message] void QtMobility::BluetoothLinkManagerDeviceDiscoverer::RunL() 0  
 
[Qt Message] void QtMobility::BluetoothLinkManagerDeviceDiscoverer::RunL() -25  
 
[Qt Message] void QtMobility::BluetoothLinkManagerDeviceDiscoverer::RunL() -25  
 
</code>
 
</code>
 
+
Where -25 means {{Icode|KErrHostResNoMoreResults}}.
Where -25 means KErrHostResNoMoreResults after the first device is reported. The reason for such short list is devices which were previusly cached are ignored by the API by using explicitly the KHostResIgnoreCache flag upon the discovery:
+
 
+
<code>
+
void BluetoothLinkManagerDeviceDiscoverer::startDiscovery(const uint discoveryType)
+
{
+
...
+
m_addr.SetAction(KHostResInquiry | KHostResName | KHostResIgnoreCache);
+
...
+
}
+
</code>
+
  
 
== Solution ==
 
== Solution ==
  
There is no known solution or workaround for the problem.
+
There is no known solution or workaround for the problem.[[Category:MeeGo Harmattan]] [[Category:Symbian]]

Revision as of 13:51, 13 June 2012

Bluetooth discovery in Qt Mobility may not report devices.

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 (13 Jun 2012)

Description

Bluetooth device discovery on Symbian using the Qt Mobility API QBluetoothDeviceDiscoveryAgent may not report some local devices when both Bluetooth audio and wireless data connections are active.

How to reproduce

Connect a Bluetooth headset and start listening an internet radio over the wireless network.

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

86 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×