Select application on Mifare DESFire card on iOS.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select application on Mifare DESFire card on iOS.

271 Views
TijnvandenEijnde
Contributor II

I have created a mobile application that can read file data from Mifare DESFire cards on Android devices.

I want to do the same for iOS. However, when I send the select application command "5A", I receive the following response "0B". 

I can read the UID of the card just fine, it is just the Mifare DESFire commandos that are not working.

Are there additional steps needed to send Mifare commandos on iOS?

Tags (2)
0 Kudos
5 Replies

257 Views
Fabian_R
NXP TechSupport
NXP TechSupport

Hello, I've been assigned to support your case.
Thank you for your interest in our products
Could you please clarify if you are reading the UID using Apple's NFC Core functions or, our TL_Taginfo module? If possible please share a code snippet of the implementation and, the card's response.

Best Regards,
Fabian

237 Views
TijnvandenEijnde
Contributor II

Hello Fabian,

Thank you for your quick response!

I am using Apple's Core NFC functions and I am calling the "sendMiFareCommand". With the following command "5A<applicationId>" where applicationId is the ID of the application I want to select. 

tag.sendMiFareCommand(commandPacket: data) { (response: Data, error: Error?) in
    if let error = error {
        result(FlutterError(code: "500", message: "Communication error", details: error.localizedDescription))
    } else {
        if req is String {
            result(response.hexEncodedString())
        } else {
            result(response)
        }
    }
}

The code is in Swift

Strangely enough, I am receiving the "0B" response code, which does not provide me with any information.

TijnvandenEijnde_0-1718869022145.png

For your information, I am using the flutter_nfc_kit package. 

It is very weird because everything works perfectly on Android. On Android, I am able to select the application, authenticate, and read file data.

0 Kudos

220 Views
Fabian_R
NXP TechSupport
NXP TechSupport

Hello sir,
Thank you for this information.
I don't have knowledge of using Flutter or, Apple's Core NFC functions since our support is limited to the use of our Product and proprietary software. Regarding the use of flutter_nfc_kit I did notice that this is only for reading and writing NDEF messages not fully using the MIFARE cards as intended.
I believe that this is the reason why you aren’t able to use DESFire commands. Is possible that the only route you can take is building APDU commands to interface with the MIFARE card?

Best Regards,
Fabian
0 Kudos

175 Views
TijnvandenEijnde
Contributor II

Thank you for your response.

The flutter_nfc_kit package can be used to read Mifare DESFire cards because my implementation is working on Android. The flutter_nfc_kit package uses Apple's CoreNFC library to handle the NFC communication with iOS. The strange thing is that I am receiving a `0B` response which is not mentioned anywhere in the NXP documentation and not mentioned in this list of error responses: https://www.eftlab.com/knowledge-base/complete-list-of-apdu-responses

0 Kudos

150 Views
Fabian_R
NXP TechSupport
NXP TechSupport

My apologies sir,

Unfortunately, the support for Flutter and, Apple's Core NFC is out of my scope. I'll be happy to help with any MIFARE DESFire functionality issue or the implementation of our software using our NFC Readers.

I'm sorry for not mentioning this in my last communication but, we do have a MIFARE Library called Taplix and, it is for Android and, iOS.

Taplinx does have a full API for MIFARE interfacing with your smartphone.

I'm very sorry but I can only recommend to please request support in the respective developer's sites of the API you are using.

Regarding the 0B response, you are getting it would be great to have a full log of the commands exchange but, I believe this could be an Invalid command response or other response, this depends entirely on the command sent.

Best Regards,
Fabian
0 Kudos