The Connectivity API provides a set of APIs for communicating with local devices.
The current version of the Connectivity API includes support for Bluetooth and Near Field Communication (NFC) technologies. Bluetooth is a short-range (less than 100 meters) wireless technology. It has a reasonably high data transfer rate of 2.1 Mbit/s, which makes it ideal for transfering data between devices.
The Bluetooth API provides classes for controlling the local Bluetooth device, discovering devices in the local vacinity, discovering services provided by those devices, publishing services and both server and client sockets for L2CAP and RFCOMM protocols.
NFC is an extremely short-range (approx. 1 centimeter) wireless techonology and has a maximum transfer rate of 424 kbit/s. NFC is ideal for transfer small packets of data when two devices are touched together.
The NFC API provides APIs for interacting with NFC Forum Tags and NFC Forum Devices, including target detection and loss, registering NDEF message handlers, reading and writing NDEF messages to NFC Forum Tags, send tag specific commands. The API also provides client and server LLCP sockets.
The S60 5.0 SDK as shipped by Nokia does not include all the required header files and libraries to compile the bluetooth backend for Symbian. It contains a subset of the requires bluetooth library. There is a Bluetooth plugin available for the S60 3.2 SDK but it cannot be used since it will overwrite and damage part of the bluetooth support already present in the 5.0 SDK. As such, compiling QtMobility for Symbian/S60 5.0 not recommended until Nokia releases a S60 5.0/Symbian^1 bluetooth plugin. A bug has been opened about this issue: http://bugreports.qt.nokia.com/browse/QTMOBILITY-1660
The NFC API is only supported on Harmattan and Symbian^3 and the Qt Simulator. On Symbian^3 the API is fully functional. On the Qt Simulator only target detection and loss and tag access are support. On Harmattan the following features are NOT supported:
Some interesting examples for the API exist.
Example | Description |
---|---|
NFC Annotated URL | Displays URL along with caption text and an image from from an NFC tag containing a specially formated NDEF message. |
Bluetooth Chat | A chat server and client using bluetooth. |
Bluetooth Tennis | The classic game of Pong. Supports multiplayer over Bluetooth and touch-to-play functionality on devices that support NFC. |
Bluetooth File Transfer | Transfer files between Bluetooth devices. |
Bluetooth Scanner | Scan for Bluetooth devices. |
NDEF Editor | Create NDEF messages using the NDEF records supported by the Connectivity API and save them to supported NFC Forum tags. |
QML Bluetooth Tennis | The tennis game using a QML interface to the Bluetooth API. It must connect to an instance of the C++ Bluetooth Tennis game to play. |
QML Bluetooth Scanner | A QML implementation of the Bluetooth device scanner. |
QML Poster | A QML implementation of the NFC Annotated URL example. |
Implements the NdefRecord element in QML |
|
NFC LLCP socket based server |
|
NFC LLCP socket |
|
The NdefMimeRecord element represents an NFC MIME record. |
|
Filter for matching NDEF messages |
|
NFC NDEF message |
|
NFC RTD-Text |
|
NFC RTD-URI |
|
NFC NDEF record |
|
Access to notifications for NFC events |
|
Interface for communicating with an NFC Tag Type 1 tag |
|
Interface for communicating with an NFC Tag Type 2 tag |
|
Interface for communicating with an NFC Tag Type 3 tag |
|
Interface for communicating with an NFC Tag Type 4 tag |
|
Interface for communicating with a target device |
Data type for Bluetooth Data Element Alternative attributes |
|
Contains functions and definitions related to Bluetooth |
|
Bluetooth address |
|
API for discovering nearby Bluetooth devices |
|
Information about Bluetooth devices |
|
Access to local Bluetooth devices |
|
API for querying the services provided by a Bluetooth device |
|
Information about services |
|
Bluetooth socket |
|
Allows the application to send data objects to other devices. Currently implemented using OPP |
|
Contains the data and headers for a request sent with QBluetoothTranferManager |
|
Holds a request to be sent with QBluetoothTransferManager |
|
Bluetooth UUID |
|
L2CAP server |
|
RFCOMM server |
|
Data type for Bluetooth Data Element Sequence attributes |
The BluetoothDiscoveryModel element provides access device and service scanning |
|
The BluetoothService element contains all the information available for a single bluetooth service.. |
|
The BluetoothSocket element represents a single bluetooth client socket. |
|
The NdefFilter element represents a filtering constraint for NDEF message records. |
|
The NdefRecord element represents a record in an NDEF message. |
|
The NdefTextRecord element represents an NFC RTD-Text NDEF record. |
|
The NdefUriRecord element represents an NFC RTD-URI NDEF record. |
|
The NearField element provides access to NDEF messages stored on NFC Forum tags. |
|
The NearFieldSocket element represents an LLCP socket. |
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.