×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    8

    Qt Mobility NFC APIs - 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 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] QFlags<QtMobility::QNearFieldTarget::AccessMethod> TNearFieldTargetFactory::ConnectionMode2AccessMethods(MNfcTag *) Line: 145 Begin
    TRK LOG: [Qt Message] QFlags<QtMobility::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
    Last edited by tomprice; 2011-06-22 at 11:57.

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: Qt Mobility NFC APIs - bug in target access detection?

    Hi,

    Some cases does not work though it is fine with latest Qt mobility (beta version probably you are using). Just need to wait a bit.

  3. #3
    Registered User
    Join Date
    Jan 2011
    Posts
    8

    Re: Qt Mobility NFC APIs - bug in target access detection?

    Quote Originally Posted by mahbub_s60 View Post
    Hi,

    Some cases does not work though it is fine with latest Qt mobility (beta version probably you are using). Just need to wait a bit.
    Thanks for the reply Mahbub. Another related question, but I'm also have problems creating my own NDEF message handler. I've created the .XML file and registered my application to launch when my NDEF record is detected however QNearFieldManager::registerNdefMessageHandler returns with -1. Looking at the code and documentation I've noticed a few discrepencies i.e. in the Qt Mobility code it looks for "com.nokia.qtmobility.nfc.NdefMessageHandler" for the listener whereas in the documentation is tells you to use "com.nokia.symbian.NdefMessageHandler". Either way, I get -1 in both cases. Is this another feature which is broken in the beta APIs?

    Thanks, Tom

Similar Threads

  1. Qt Mobility 1.2 APIs - unable to access tag type specific access (-5)
    By tomprice in forum Near Field Communication
    Replies: 3
    Last Post: 2011-12-29, 05:58
  2. problem compiling NFC APIs with Qt Mobility 1.2 Beta
    By nfcdeveloper in forum [Archived] Qt Mobility Project
    Replies: 6
    Last Post: 2011-06-08, 06:24
  3. Camera API missing from Qt SDK 1.1's Qt Mobility APIs
    By darkandchoco in forum [Archived] Qt Mobility Project
    Replies: 11
    Last Post: 2011-03-14, 11:15
  4. How to include latest mobility APIs (1.1) in latest Nokia Qt SDK?
    By electric_pages in forum [Archived] Qt SDKs and Tools
    Replies: 1
    Last Post: 2010-12-01, 11:23
  5. Example . New Qt APIs Technology Preview 2 - Mobility Project
    By skumar_rao in forum [Archived] Qt Mobility Project
    Replies: 2
    Last Post: 2009-12-14, 02:13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×