Is there a way to naming a card reader?

Hi everyone!
I’m new in Java, especially Javacard. I’m using GEMPC Twin smart card reader, GemXpresso211 PK_IS card and OCF1.2 for off-card application. I was able to run sample javacard program and obtain information about registered terminals from opencard.properties file. Here is the sample code:
import java.util.Enumeration;
import java.util.Properties;
import opencard.core.service.CardServiceException;
import opencard.core.service.SmartCard;
import opencard.core.terminal.CardTerminal;
import opencard.core.terminal.CardTerminalException;
import opencard.core.terminal.CardTerminalRegistry;
import opencard.core.util.OpenCardPropertyLoadingException;
* A sample providing information about the registered terminals.
* Please <B>Note</B> that the set of <i>registered</i> terminals
* may differ from the set of terminals that is <i>physically attached</i>
* to the system.
* @author  Mike Wendler ([email protected])
* @version $Id: GetTerminalInfos.java,v 1.8 1999/10/14 15:44:17 pbendel Exp $
public class GetTerminalInfos {
  private static final String NAME = "get information about registered terminals";
  private static final char ENDL   = '\n';
  public static void main (String [] args) {
    System.out.println ("------------------------------------------------------------");
    System.out.println ("start use case: " + NAME);
    System.out.println ("");
    try {
      SmartCard.start();
      CardTerminalRegistry ctr = CardTerminalRegistry.getRegistry();
      Enumeration terminals = ctr.getCardTerminals();
      int counter = 0;
      while (terminals.hasMoreElements() ) {
        CardTerminal terminal = (CardTerminal) terminals.nextElement();
        printTerminalInfos(terminal);
        counter++;
      System.out.println ("there " +
        (counter > 1 ? "are" : "is") + " " +
        counter + " terminal" +
        (counter > 1 ? "s" : "") + " installed!");
      SmartCard.shutdown();
    catch (OpenCardPropertyLoadingException plfe) {
      System.out.println ("OpenCardPropertyLoadingException: ");
      System.out.println (plfe.getMessage() );
    catch (ClassNotFoundException cnfe) {
      System.out.println ("ClassNotFoundException: ");
      System.out.println (cnfe.getMessage() );
    catch (CardServiceException cse) {
      System.out.println ("CardServiceException: ");
      System.out.println (cse.getMessage() );
    catch (CardTerminalException cte) {
      System.out.println ("CardTerminalException: ");
      System.out.println (cte.getMessage() );
    System.out.println ("");
    System.out.println ("finished use case: " + NAME);
    System.out.println ("------------------------------------------------------------");
  } // mainHowever, it helps me much in getting the card readers info. Consider following result:
… <truncated>
=======================================================
Address:
Name:    OMNIKEY CardMan 5x21-CL 0
Type:    PCSC10
terminal.features ():
-- listing properties --
address=
name=OMNIKEY CardMan 5x21-CL 0
type=PCSC10
slots=1
slot infos:
there is 1 slot present in this terminal!
slot channel available: yes
Slot info:
slot ID: 0
CardTerminalException:
Pcsc10CardTerminal: PCSC Exception in method SCardGetStatusChange: error executing SCardGetStatusChange
return code = 8010002e
=======================================================
Address: 127.0.0.1:5000
Name:    Simulator
Type:    SOCKETJC21SIMULATOR
terminal.features ():
-- listing properties --
address=127.0.0.1:5000
name=Simulator
type=SOCKETJC21SIMULATOR
slots=1
slot infos:
there is 1 slot present in this terminal!
slot channel available: yes
Slot info:
slot ID: 0
card present: no
there are 4 terminals installed!
finished use case: get information about registered terminals
BUILD SUCCESSFUL (total time: 2 seconds) In simulator mode, I can set up address for each terminal simulator. In case there will be more than 1 card reader installed with the same type, it will be so much helpful if there is a way to set address or “give name” to each card reader. Any idea how to do this? I really need this to finish my final task. Thanks before.

What version of OCF did you use? the latest is at openscdp.org/ocf , others are obsolete.
There is nothing special to configure for normal pcsc readers.
the name of these readers is defined by the reader driver. There is no way to change it.
If you want to give arbitrary name to your readers, use a Hashmap or something like that.

Similar Messages

  • I bought a itunes card and regestered it on itunes. When they sent ito my emails i forgot my emails password. Is there a way of refreshing the card?

    I bought a itunes card and registered it on itunes. When they sent me a email i forgot my emails password. Is there a way of refreshing the card?

    iTunes Store: Invalid, inactive, or illegible codes - Support - Apple

  • I received a goggle play gift card for Christmas.  Is there a way to use this card in the ITune store ?  Or is there a way to convert the google card credit into Itune credit ?

    I received a google play gift card for Christmas.  Is there a way to use this card in the App store or Itune store ?  Or is there a way to convert the google credit into itune credit ?

    No - sorry.
    GB

  • Is there a way I can download adobe reader on my iPad or the like so I can access some educational program's?

    Is there any way I can downloaded adobe reader on my iPad so I can access some educational program's. if not can I get round it somehow?

    You can download Adobe Reader from the App Store:
    https://itunes.apple.com/us/app/adobe-reader/id469337564?mt=8
    Personally, I prefer PDF Expert or GoodReader, though.

  • Is there a compact flash and SDXC card reader with USB3 and or thunderbolt connections that will work with new MacBook Pro retina laptops running OSX Mavericks please?

    Is there a compact flash and SDXC card reader with USB3 and or thunderbolt connections that will work with new MacBook Pro retina laptops running OSX Mavericks please?

    Yes, I too had this problem.
    I was issued an update from Apple for a new version software as well as a new version of Lightrooom and now it shows up on the desktop and in finder as it should.
    MacBook Pro Retina running 10.8.2 (12C54)
    Lightroom running 4.1
    Hope that helps.
    aa

  • My iPhone just loaded 1600  emails dating back over two years from one of my accounts. Is there a way to "mark all as read"?

    My iPhone just loaded 1600  emails dating back over two years from one of my accounts. Is there a way to "mark all as read"?

    Your Comcast accounts are POP (unless you enrolled in the Comcat Beta test of Imap) so they won't sync at all. Either enroll in the Beta test or don't use Comcast.
    Your iCloud account is Imap and should sync just fine, unless you have set it up incorrectly.

  • Is there any way to know data is read from tape and written to disk

    is there any way to know data is read from tape and written to disk

    784786 wrote:
    Just asked because I am doing restoration, I see files read from tape and then restored, but can't find them physically there.
    Is there any way I can find it.What kind of restoration? What kind of files?
    The usual "no information" question is of the form "My car won't start. Tell me how to fix it"
    Yours is a bit different - "I tried to fix my car. Tell me how to know it's fixed".

  • HT201209 my family has 3 ipods on one apple id account, the kids get gift cards, does the gift amounts go into one or is there a way to use the cards per device?

    how do I keep peace in the house when using giftcards? we have 3 ipod touches on one account, is there a way for each child to use cards without having to share the amount gifted to them?

    The Card is redeemed to the Apple ID.
    On a different Tact... Have a look here...
    setting-up-multiple-ios-devices-for-messages-and-facetime.html

  • HT2486 Is there a way to save business cards in address book, by scanning or the camera on the iMac.

    Hi All,
                at times we feel that the business card sent by the client or friend is also necessary for future. is there any way we could save the jpeg of the card by a click onto the address book in the mac.
                It would be cool if we could make some use of the camera in the front to take a snap shot of the bc.
    Regards
    Beck

    I appreciate the link but wasnt really looking to go through a 100+ page iphone guide.  From what I saw, it said what other people have told me - which is it will sync contacts from Google (Gmail) or Yahoo...so that doesnt mean it will sync contacts directly from an Android phone's contact list.  All the manual said was you sync thru itunes.
    It looks like what I should do at some point is manually input all my contacts into a new "clean and unused" Gmail account...Unless there was an easy way to transfer my Mac Address Book to a Gmail Account.
    It seems like if you have contacts in a Gmail account, it will be easy to transfer anywhere.
    Im starting to wonder if an Android would be bette than an iphone anyway.  Considering the nightmare time Ive had with a Mac in just a few months, Im surprised Im even still considering another Apple product.
    Thanks

  • Is there a way to get a card with 5.1 drivers to work with labview 6.1?

    I have a quatech card that is only supported with drivers for labview 5.x. I however, have 6.1 and cannot get the card to work.
    Is there any way, other than finding an old copy of labview on e-bay, to get 6.1 to communicate with the 5.x drivers?
    The company whose card it is has been rather unhelpful so far, so I was hoping someone here might have an idea.
    Thanks,
    Dave Neumann

    What form do the drivers for this card take? If the code calls DLLs you should be able to rework them for V6.1. If they are code interface nodes, you might be hosed.
    Another possibility is to check with the vendor and see if they make new up-to-date DLL-based drivers for the card. You might have to buy them, but they should allow you to get things talking.
    Finally, ebay is worth a try. A couple weeks ago there was a guy selling a bunch of DAQ stuff and a copy of LV5 was included in the lot.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Is there any way to make a card or program?

    Is there any way to switch to landscape mode or horizontal in order to make a folding card or in my case a folding wedding program? That's the only reason I got this and now it's not looking like this app is gonna help me.

    It does not appear to support this on the iPad. Two possible options:
    1. create a "Landscape" template/doc using Pages on a Mac and import it (haven't tried, don't know if it will work).
    2. Use Keynote on iPad instead (it's already in landscape)

  • Is there a way to have Adobe Acrobat reader default to a higher version?

    Hi,
    We've pin-pointed the cause of an issue where in MS Excel we hyperlink a PDF file & our user is using Adobe Acrobat v7 & when the user clicks on it. The PDF pops up & just disappears.
    I've located the fix for it on MS Discussion Forums below:
    If you have version 7, you need to upgrade to version 7.0.8 to get a fix for this bug in Acrobat.
    But what we need to know is, if they have Adobe V7 installed, we can install v8 for them. But is there a way of having V8 set as a default reader?
    This may sound like a stupid question but my work colleague wanted me to ask.
    Thanks,
    PS

    It's not recommended nor supported to have both installed unless you're running Macs.
    Not being able to choose a default version is just one of the many issues.

  • Firefox 3.6.3 crashes randomly when used throught SUN Secure Global Desktop. I have a Solaris core dump. Is there a way to get the dump read?

    Running FF 2.0.0.8 with Sun Secure Global Desktop - no issues. Upgraded to V3.6.2, then 3.6.3. Both upgrades failed. Browser randomly crashes at different times, different pages. FF works if directly ssh'ing into application sever. When accessing FF after loging in using SGD, I get random crashes. I have a Solaris core dump generated by FF. Is there anyone that can read/diagnos the core dump?

    I have identified the issue and received a 'fix' from the
    Oracle Secure Global Desktop support team.
    The issue - firefox is crashing when attempting to talk to the sound server which is not active. All activity within the window works fine, except ff hangs the second you move the mouse in to the top level menu.
    We disabled the audio under the SGD configuration and that ficed the issue.

  • I just upgraded to OSX 10.8.2 and can no longer read my Palm OS desktop files. Is there a way to be able to read these files?

    How can I read PowerPC files with OSX 10.8.2?

    PPC files can not be used on OSX versions 10.7 and higher.

  • HT3702 Is there any way to use a pre-paid Visa card with my iTunes account?

    I just received a prepaid Visa card as a gift and tried to use this card as payment info on my iTunes account.  This didn't work, I suspect because there is no billing address associated with the card.  Is there any way to use the card like this?  Any help would be greatly appreciated.

    jkhitunes wrote:
    Wonder why an Apple person told me this would work??
    Apple should read this stuff once in a while.
    Some prepaid cards appear to act as credit cards to the merchant. If yours is one of them it should work, but debit cards are not accepted for the iTunes Store.
    Can you use a pre-paid credit card from Wal-Mart?
    Do you mean an iTunes Card, the kind sold at Wal-Mart? Sure, that will work.
    "Pre-paid" and "credit" are mutually exclusive.
    I believe this way of thinking about it ought to be valid: if you need a PIN code, the card won't work.
    I don't use debit cards so I can't be certain if this will apply consistently, but let me know if that makes sense.

Maybe you are looking for

  • Extract values from an object trapped in TreeMap

    I can't figure out how to get the balance of an account Object (consisting of name plus balance)which is stored in a TreeMap. Normally it would go like this: For example accounts[2].getBalance(); Normally would return the value for the specified acco

  • Can anyone tell me how to do this in Flash? See the following link?

    Can anyone tell me how to do this in Flash? See the following link? See this link. I want to know how to create the painting excercise as made here. http://disney.go.com/disneychannel/playhouse/littleeinsteins/activities/paint.html

  • Toslink Audio Problems - Help!

    I have a 2009 Mac Mini running Snow Leopard that I use as a home theater system. It's plugged into my Integra (aka Onkyo) receiver via DVI video and Toslink audio. Problem I have is that if/when I reboot the system, there's an excellent chance I will

  • How do I synch project audio to video ??

    I recently digitized my old vhs tapes using a Roxio converter. I brought the files into iMovie11 and then split the events into smaller projects. With some of the projects, the entire project audio track ended up being out of synch with the video. Ho

  • Time Machine backups do not migrate from iMac to MacBook Pro

    I just moved from a iMac G5 to a MacBook Pro. I love Apple's migration tool, but it seems that Time Machine backups do not migrate. I checked with support, and did a basic amount of searching, and it seems that I need to erase and reformat the backup