net.rim.device.api.smartcad.SmartCardNoCardPresentException when calling SmartCardReader.openSession()

Go To


I need to exchange APDU with a SIM card on a smartphone.

I made a small test function to try this using my carrier's (Rogers) SIM card.

SmartCardReader[] allReaders = SmartCardReaderFactory.getInstalledReaders();
for( int readerIndex = 0; readerIndex < allReaders.length; ++readerIndex) {
    try {
        SmartCardReaderSession session = allReaders[readerIndex].openSession();
    catch( Exception e ) {
        System.err.println( e.toString() );

But I keep getting the SmartCardNoCardPresentException exception.

Obviously, the SIM card is present, (I can use it to place a phone call) but isSmartCardPresent() returns false.

Note that I'm not running this on the simulator, it only "works" on a real phone. I use the Torch 9810 as the target.

Also note that I have signed my application.

Any hint/advice would be appreciated.

2012-04-04 01:54
by Bamaco


I think there's a misunderstanding of smart card reader concept for blackberry.

You suppose that sim-card is a smart-card, and installed sim-card has to be recognized as a smart card. But that's not true.

Read more here: Smart card reader for BlackBerry

2012-04-04 05:46
by NoName