4

I was searched about NFC SIM cards and found such explanations about them here and there:

For those who want to use near field communication technology but don’t currently have an NFC compatible smartphone, there are other ways to enable NFC on your phone without trading it in for an expensive new model. Both SIM and SD cards can be equipped with NFC chips, and some companies currently offer or are preparing to offer these options so more customers can start using NFC technology.

The questions that I have now are:

  1. Does NFC SIM cards have an internal antenna too, or the handset must provide the NFC antenna for the NFC SIM, itself?
  2. If the NFC SIM hasn't internal antenna and phone needs to provide antenna for SIM,(it means that the handset must be NFC Compatible, right?) why we need NFC SIMs? Can't we simply use the NFC Chip of our handset instead of the NFC Chip of the SIM.
  3. In the other words, is there any handset outside that has NFC Antenna, but doesn't have NFC Chip? or is there any way to add an antenna to an old handset in order to use NFC SIM in it?

Anyway, let assume that I want to install the following applet (its source) on my SIM:

import sim.toolkit.ToolkitInterface;
import sim.toolkit.ToolkitRegistry;
...
import javacard.framework.ISOException;

public class STKTest extends Applet implements ToolkitInterface {

public static void install(byte[] bArray, short bOffset, byte bLength) {
    // GP-compliant JavaCard applet registration
    new STKTest().register(bArray, (short) (bOffset + 1), bArray[bOffset]);
}
//this method handles standard APDU commands
public void process(APDU apdu) {
    // Good practice: Return 9000 on SELECT
    if (selectingApplet()) {
        return;
    }

    apdu.setIncomingAndReceive();
    final byte[] buf = apdu.getBuffer();
    switch (buf[ISO7816.OFFSET_INS]) {
    case (byte) 0x00:
        //do something
        break;
    }
}
//this method handles the SIM Toolkit commands
public void processToolkit(byte event) throws ToolkitException {
    switch (event) {

    case ToolkitConstants.EVENT_TIMER_EXPIRATION:
        //do something
        break;
    }
}

}

The question is: can I use GlobalPlatform commands to install my applet (Just like regular smart cards) or based on this presentation in DefCon, I must use Envelope Commands, SMS Packets and OTA technology for it?

And the final question is about contents of this article(An introduction to SIM card application development). In some pages (page 16 and 17 for example), the guy is mentioned that there are some GlobalPlatform 3 compatible SIM cards available now. But as far as I know, the last version of GlobalPlatform Specification for Smart Cards is GlobalPlatform 2.3 (Wasn't published in the time of the article). So what is the GlobalPlatform 3 specification that the writer mentioned in his article?

Community
  • 1
  • 1
Ebrahim Ghasemi
  • 5,850
  • 10
  • 52
  • 113

1 Answers1

5

This is rather a problem of terminology.

Usually, "an NFC SIM card" means a SIM card, that can communicate directly with NFC antenna of the handset and use it as a contactless interface. The obsolete V6 pin (originally used as the additional voltage supply) is used for communication between SIM and the antenna in this case, that is why it is often called SWP communication ("Single Wire Protocol", see this Wikipedia article). Most of modern SIM cards used these days are these NFC SIM cards.

However, there are also "special" SIM cards and even microSD cards (with Java Card support!) out there on the market, which already contains the NFC antenna and which can communicate directly to the smart card reader without antenna in the phone. These SIM cards are rarely used, because they are quite expensive and they are rather functional prototypes than products ready for everyday usage. I tested a few of them several months ago and they were quite buggy, their performance was poor and their contactless field was not very reliable. This can change very soon, of course.


Yes, you can use Global Platform to install your applet on the SIM card. SIM cards by big players on the market (e. g. Gemalto) follow Global Platform standard. There is no need of the OTA access.

vojta
  • 5,591
  • 2
  • 24
  • 64
  • Thank you dear Vojta. Any idea about GlobalPlatform 3 compatible SIM cards? – Ebrahim Ghasemi Mar 05 '16 at 09:22
  • 3
    No such thing as GP3. – Martin Paljak Mar 05 '16 at 14:15
  • 1
    Hi dear Vojta. It seems that new NFC-SIMs with internal Antenna are available now, here there is a [sample](https://esolutions.mdec.com.my/sites/default/files/NFC%20SIM-With%20Table%20Data_121005.pdf). Isn't it weird? – Ebrahim Ghasemi Nov 12 '16 at 07:50
  • 1
    @Abraham Hi, I have seen something similar a year ago, but it was buggy and not reliable enough for any real world applications. I will ask them for a few samples, thanks for sharing the link. If it works, it will be a real breakthrough. – vojta Nov 12 '16 at 12:59
  • Dear Vojta, Is there any way to detect if a simcard supports NFC or not? Any special APDU command for it? And does the SIM uses RFU pin outs for antenna connection? – Ebrahim Ghasemi Nov 17 '16 at 07:12
  • @Abraham No idea, really. However, most of SIM cards do support NFC and use V6 pin for that purpose. – vojta Nov 17 '16 at 22:16
  • @Abraham Hi, I hope you are not one of those guys affected by the recent US immigration ban. If yes, I keep my fingers crossed. – vojta Jan 30 '17 at 19:18
  • @vojta Dear great Vojta, thank you very much for your kind message. Fortunately I'm no affected, but it made lots of problems for my Iranian friends in US. I hope they cancel this new decision. Thank you again, your kindness made my day great :) I wish you luck, success and happiness as always :) – Ebrahim Ghasemi Jan 31 '17 at 07:07
  • @Abraham did you find out a way to find out if the SIM is NFC enabled or not? – madking Oct 26 '18 at 09:44
  • @madking Unfortunately no. let me know if you find a way. Anyway, I guess there must be a 'NFC Support' label on the simcard body! :d – Ebrahim Ghasemi Oct 30 '18 at 20:42