Hi,

it seems like there have been multiple threads about this issue in the past already, but I still could not find a solution (or definitive answer of possibility).

I am trying to send ISO7816-style APDU commands to an ISO14443 tag, using the C7-00 (RM-675) 111.030.0609.

However, the detected target's accessMethods will not include QNearFieldTarget::TagTypeSpecificAccess, but only NdefAccess.
Thus, when using the sendCommand() method, it always returns an invalid request.

How can I force QtMobility to send low-level commands to the tag, when it is incorrectly detected as an NFC Forum Type4 tag!?

In the Beta and TP releases of QtMobility, there used to be an additional accessMethod called QNearFieldTarget::ApduAccess, and also a method to sendApduCommand(), which were removed in the transition to QtMobility 1.2.0 final.
Maybe someone from the developers could explain why - is it just because the same functionality should be covered by sendCommand() now, or is this feature officially unsupported?

I'm actually trying to read the balance from a German contactless electronic purse system card,
however, for better international reproducability, let's use the Mastercard paypass system as an example here:

Code:
    static const char list_pse[] = {0x00, 0xA4, 0x04, 0x00, 0x0E, 0x32, 0x50, 0x41, 0x59, 0x2E, 0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46, 0x30, 0x31, 0x00};
    APDU_LIST_PSE = QByteArray::fromRawData(list_pse, sizeof(list_pse));  //any better way to declare bytearray, btw?
the above APDU lists the Payment System Environment of a contactless credit card, i.e. the result will contain the Application Identifier (e.g. A0 00 00 00 04 10 10 for Mastercard paypass in my case; Visa paywave / Discover zip /... will differ)


the rest of my code looks like this:

//initialisation
Code:
    manager = new QNearFieldManager(this);
    manager->setTargetAccessModes(QNearFieldManager::TagTypeSpecificTargetAccess);
    manager->startTargetDetection(QNearFieldTarget::AnyTarget);	//using ProprietaryTag will not detect anything!
//targetDetected slot
Code:
    QString uidString = QVariant(target->uid().toHex()).toString();
    qDebug("target detected - " + target->uid().toHex());

    QNearFieldTarget::AccessMethods accessMethods = target->accessMethods(); //-> contains NdefAccess only

    QNearFieldTarget::RequestId rq = target->sendCommand(APDU_LIST_PSE);

    if(rq.isValid()){
        qDebug("valid request id");
    }else{
        qDebug("invalid request id");	//request will always be invalid...
    }

    target->waitForRequestCompleted(rq, 2000);

So, is this actually supposed to work, or not (yet) implemented?
Is there any chance to 'cast' the Ndef Tag into a Proprietary tag (which should actually be just some more low-level way of accessing the tag, bypassing QtMobility's NDEF reading capabilities for Type4 tags!?)

I would really appreciate if any of the QtMobility developers would share their experiences about sending APDUs, or is it just me or my phone or my card...?

Thanks in advance!


besides, if it may be is of any help: the Java Implementation of ISO14443Connection seems to be missing in the C7, which is actually why I am trying Qt now (on the good old Nokia 6131 NFC, those cards always worked perfectly using JSR-257 ISO14443Connection).