Qt Mobility 1.2 NFC - bug in target access detection?
-
Hi,
I'm currently developing an NFC application using Qt Mobility 1.2 but am having problems using the Tag Specific commands to read/write to detected tags. Using the Symbian/Qt hybrid "NFCTags":http://library.forum.nokia.com/topic/GUID-E35887BB-7E58-438C-AA27-97B2CDE7E069/GUID-DB3F8F61-CF5F-436F-9678-B5EADBB13999.html example demo I am able to send tag specific commands. However, using the mobility APIs I get a -5 KErrNotSupported error when I try and read the memory size (QNearFieldTagType2::memorySize()).
Looking at the Qt Mobility code (nfc/symbian/nearfieldtargetfactory_symbian.cpp @ TNearFieldTargetFactory::ConnectionMode2AccessMethods(MNfcTag * aNfcTag)) it seems as though it has the connection mode TNfcConnectionInfo::ENfcUnknownConnectionMode therefore not allowing tag specific commands. This is particularly strange as the tag which is passed in is also used to create a tag, and it definitely has the Type2 connection mode:
Here is an output of my logs:
TRK LOG: [Qt Message] QtMobility::QNearFieldTarget *TNearFieldTargetFactory::CreateTargetL(MNfcTag *, RNfcServer &, QObject *) Line: 107 tag type 2 created
TRK LOG: [Qt Message] QtMobility::QNearFieldTarget *TNearFieldTargetFactory::CreateTagTypeL(MNfcTag *, RNfcServer &, QObject *) [with CTAGCONNECTION = CNfcType2Connection, QTAGTYPE = QtMobility::QNearFieldTagType2Symbian] Line: 72 Begin
TRK LOG: [Qt Message] CNearFieldNdefTarget *TNearFieldTargetFactory::WrapNdefAccessL(MNfcTag *, RNfcServer &, CNearFieldTag *) Line: 131 Begin
TRK LOG: [Qt Message] CNearFieldNdefTarget *TNearFieldTargetFactory::WrapNdefAccessL(MNfcTag *, RNfcServer &, CNearFieldTag *) Line: 134 Wrap NDEF Access to the tag
TRK LOG: [Qt Message] CNearFieldNdefTarget *TNearFieldTargetFactory::WrapNdefAccessL(MNfcTag *, RNfcServer &, CNearFieldTag *) Line: 139 End
TRK LOG: [Qt Message] QFlagsQtMobility::QNearFieldTarget::AccessMethod TNearFieldTargetFactory::ConnectionMode2AccessMethods(MNfcTag *) Line: 145 Begin
TRK LOG: [Qt Message] QFlagsQtMobility::QNearFieldTarget::AccessMethod TNearFieldTargetFactory::ConnectionMode2AccessMethods(MNfcTag *) Line: 157 End //<-- It should report "the tag has tag specified access"!!!!I'm using the Qt Mobility 1.2 BETA APIs as I'm waiting for the 1.2 APIs to be included in the Qt SDK. I've downloaded the released version but am having problems building it.
Thanks for any help,
Tom