Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top