I like to provide developer insight on things that especially concern this new upcoming contactless technology called Near Field Communication (NFC).

Friday, January 19, 2007

Nokia Secure Chip SDK FAQ

This FAQ is intended to guide you on any questions concerning Nokia's Secure Chip SDK.

Read about how to send APDUs to the Nokia 3220's built-in smart card, and how to create a SecureChipConnection in your Java MIDlet.

What is the Nokia Secure Chip SDK?

This SDK enables you to write MIDlets that make use of the Nokia 3220's builtin smart card. You can send APDUs to both the internal and external smart cards, switch between various Secure Chip communication modes, (SC_ON, SC_OFF, SC_ONLY) and enable/disable the security PIN code.

Where can I get the Nokia Secure Chip SDK?

As with the NFC Shell for Payment and Ticketing and the SDK for Payment and Ticketing, you cannot buy this SDK in a store or order it from the website.
You will have to contact a Nokia representative by phone or e-mail.

Can I receive an event as soon as an RFID/NFC device enters the RF field?

When you have a MIDlet running in the foreground, you will be able to receive an event whenever an RFID/NFC device enters the 3220's RF field. This is even true for smart card readers.
Outside of the MIDlet, you will only be able to respond to Mifare tags. On exit, your MIDlet can instruct the phone to register a designated Mifare tag type with your MIDlet. Whenever you touch a tag with the corresponding data, your MIDlet will be launched.

Can I use the Secure Chip SDK to upload JCOP applets to the internal secure chip?

No, but you can use the freely downloadable Eclipse SDK in conjunction with the IBM JCOP Tools. The JCOP Tools come as a plugin for Eclipse.
Before you can use them, you'll need to activate your copy. To do this, you can either use a JCOP Development card, a prior 2.2 installation of the JCOP Tools, (current version is 3.1) or an activation code which can be freely obtained from an IBM representative.

Small note: I've tried to obtain an activation code myself. I have personally attempted to contact IBM US, IBM Netherlands and even IBM Germany! None of them knew anything about the JCOP Tools.
The email address that was provided,
scard@de.ibm.com
, did not respond to any correspondention. I was just lucky to have a 2.2 installation lying around, that I could use to activate my copy of the JCOP tools plugin.

Update on that small note: IBM finally replied after a few weeks. They provided me with some instructions on how to obtain an activation code.

How do I communicate with the Secure Chip?

The exact same way you would communicate using a regular smart card reader: Using APDUs. APDUs can either be sent to an external smart card, or to the internal chip. The last happens only in the special SC_INTERNAL mode, which can only be active when a MIDlet is running.

4 comments:

Güpse Güneş said...

Hi,
I have a pn531 NFC reader and nokia 3220 device. I can not make a connection between them. Which reader are you using?

Thanks

Daniel said...

Hi Güpse,

Thanks for your comment.
I must say, you've got some lovely pictures on your blog.

About readers: I'm using the SCM SCR3310-DI.

Reading your post, I assume that you want to do peer to peer communication between the reader and the phone.

Unfortunately, this might be harder than it looks because the 3220 speaks its own peer to peer protocol.

A little bit more about that on my Payment and Ticketing SDK FAQ:
http://www.nfc-development.org/2007/01/nokia-sdk-for-payment-and-ticketing-faq_19.html

Güpse Güneş said...

Hi Daniel,

I gave up for working on pn531 and 3220. I successfully set up a connection between them but I was not able to manage data exchange. I read in nokia.forum that there are
some people like me that are not able to make data exchange between these devices.

So I have decided to change my phone or reader. I started to work with Samsung X700 but I have some trouble with
midlets.

Thank you for information. Also thanks for your nice comments on my nephews photos.

Güpse

Anonymous said...

Im developing an NFC application that makes a connection to the internal Secure Chip.

I call..
SecureChipConnection mScConn = SecureChipConnection.openConnection(null, this);

where 'this' is a class implementing SecureChipListener, and then i have a while loop:

while (!connected) { Logger.debug("Sleeping"); Thread.sleep(500);
}


connected is set to true when the handleEvent method receives a SecureChipEvent with the type SecureChipEvent.TYPE_CONNECTION_STATUS and a status of SecureChipEvent.STATUS_CONNECTED

however, on the Nokia 6131 NFC this event is never triggered, but on the 3220 NFC phone it is triggered and the application works fine.

And in fact i discovered that the handleEvent method is never triggered, there are no events from the SecureChipConnection for the listener to handle.

Any ideas why this happens on the 6131 but not the 3220?

Dan

Labels

Listed on NFC-Directory