Unable to send command to smart card reader

i am writing code for reading/writing to a smart card through a smart card reader which support RS232 serial communication.
Problem is that the reader is not responding to the commands i send to it.
My Smart CArd reader (HID 6055 Mifare Smart CArd reader) sends some ack when it is switched on. That data i am able to receive though the following code.
So i think i am unable to write (send command ) to the reader.
Also how do i debug my code to see whether the command is actually being sent or not. I tried hyper terminal but if i use hyper terminal then the java prog is not able to open an OtputStream for writing to the smart card.
I appreciate your kind help...
My prog is
*The
import javax.comm.*;
import java.io.*;
import java.util.Enumeration;
import java.util.TooManyListenersException;
public class SmartCard
     public static void main(String args[])
          CardReader cs=new CardReader();
          cs.setConnectionParameters();
          if(cs.scanForCard())
               System.out.println("Successfully sent Scan command to the reader");
class CardReader implements SerialPortEventListener //,CommPortOwnershipListener
     CommPortIdentifier portId;
     Enumeration portList;
     InputStream inputStream;
     OutputStream outputStream;
     SerialPort serialPort;
     String outputString="";
     String inputSting="";
     public CardReader()
          portList = CommPortIdentifier.getPortIdentifiers();
           while (portList.hasMoreElements())
            portId = (CommPortIdentifier) portList.nextElement();
            if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL)
                 if (portId.getName().equals("COM1"))
                         System.out.println("Port Found");
                         break;
     public void setConnectionParameters()
          System.out.println("Setting Parameters for "+portId.getName());
          try
            serialPort = (SerialPort) portId.open("SimpleReadApp", 2000);
        catch (PortInUseException e)
             System.out.println("PortInUseException in CardReader.setConnectionParameters :"+e);
         try
              serialPort.addEventListener(this);
          catch (TooManyListenersException e)
               System.out.println("Error in adding EventListener to serial Port: "+e);
        try
            inputStream = serialPort.getInputStream();
        catch (IOException e)
             System.out.println("IoException in CardReader.setConnectionParameters while setting inputStream :"+e);
        try
            outputStream = serialPort.getOutputStream();
        catch (IOException e)
             System.out.println("IoException in CardReader.setConnectionParameters while setting outputStream :"+e);
          serialPort.notifyOnDataAvailable(true); //We will check for
          try
            serialPort.setSerialPortParams(9600,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE);
        catch (UnsupportedCommOperationException e)
             System.out.println("Exception in setting the Baud Rate: "+e);
     public boolean scanForCard()
          boolean result=false;
          outputString="AA521D26000A";//Command for Scanning a Card
          // outputString="AA4C280810201C";
          // byte[] cmd=new byte[]{'A','A','5','2','1','D','2','6','0','0','0','A'};
          byte[] cmd=new byte[]{'8','0','4','C','2','8','0','8','1','0','2','0','1','C'};
          try
             //outputStream.write(outputString.getBytes());
             outputStream.write(cmd);
             result=true;
        catch (IOException e)
             System.out.println("Error in writing scan command to smart card: "+ e);
             result=false;
          return result;
     public void serialEvent(SerialPortEvent event)
          System.out.println("\nSome Event Occured");
          switch(event.getEventType())
             case SerialPortEvent.BI: System.out.println("event no 1");
             case SerialPortEvent.OE: System.out.println("event no 2");
             case SerialPortEvent.FE: System.out.println("event no 3");
             case SerialPortEvent.PE: System.out.println("event no 4");
             case SerialPortEvent.CD: System.out.println("event no 5");
             case SerialPortEvent.CTS: System.out.println("event no 6");
             case SerialPortEvent.DSR: System.out.println("event no 7");
             case SerialPortEvent.RI: System.out.println("event no 8");
             case SerialPortEvent.OUTPUT_BUFFER_EMPTY: {System.out.println("event no 9");
                  break;}
             case SerialPortEvent.DATA_AVAILABLE:{System.out.println("event no 10");
                  readDataFromReader();}
                  break;
     public void readDataFromReader()
          System.out.print("Some data Sent by the Smart Card");
          byte[] readBuffer = new byte[20];
        try
             while (inputStream.available() > 0)
                 int numBytes = inputStream.read(readBuffer);
         System.out.print(new String(readBuffer));
         catch (IOException e)
              System.out.println("Some Error Occured in reading the data sent by Reader: "+e);

hi all..
Im new to this technology and wanna learn and try to program some simple applications using Smart Card...
Reading thru all the topics above, Im wonderring is the Card Reader able write codes to the Smart Card, or maybe jux simply able to update the info inside the card??
I also heard about Card Decoder as well, I mean if the Card Reader can do the task.. why do we need Card Decoder ?!
Sorry if I stated something wrong... Im new and hope that someone could share some valuable knowledges here...
Thanks much much !!

Similar Messages

  • Blackberry Smart Card Reader 7250 and Blackberry Bold 9000 connecting and pairing

    As the subject line states, I am trying to connect and pair the Card Reader with the Device.  I am unsuccessful in following the steps to Pair the Device with the Card Reader.
    When I attemp to Click Connect from the Security Options/Smart Card/Registered Reader Drivers/Blackberry, and after I enter the reader ID on the device I receive an error "Connection to unknow device fail"  and then it tries to connect 2 more times, and I receive the error "Unable to connect your Blackberry Smart Card Reader. Please verify that the reader is turned on, that you have correctly specified the reader ID, and that the reader is not alreadt paired with another Blackberry.
    Could someone provide some assistance?

    I've received the same error. It's a known issue with a batch of new readers.  I called RIM and they said an updated software package should be made available online in the next day or so which will address/resolve the problem.

  • Unable to pair BB Smart Card Reader with Pc/Laptop

    Hi, I have 2 new BB smart card readers (SCR) and Im trying to pair with the PC and I can not. The SCR software can not detect the SCR. I put the ID of the device on the software and is trying to looking for it but can not. It says "Unable to connect to the specified Blackberry smart card reader". I have another SCR and I don't have problems to pair with the computer only with the new ones. The SCR have the last OS. Do you know what could be the problem? I think is a bug of the new SCR.

    mzamora wrote:
    Andy, may be nothing so where can I post it? Is there a general discussion?
    Hello,
    if I were you, I'd post in the "General Blackberry Smartphone Functions and Features" forum.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • Token and smart card reader are not detected on Mavericks if not plugged on a USB port during system boot

    Well, both token and smart card reader are not detected on OS X 10.9 if not plugged on a USB port during system boot. So, if I am already working within the system and need to use my certificates I have to plug the token or smart card reader on a USB port and restart Mavericks.
    Token is a GD Starsign and Smart Card Reader is a SCR3310 v2.
    Thoughts?

    SCS is a very good app, since I've read that Apple has discontinued support for PC/SC interfaces after the release of Mountain Lion.
    (My previous installation was a Mavericks upgrade from Lion)
    However, I don't know what and how to debug using Smart Card Services. Do you know any commands to use?
    Apparently, the SC reader reports no issues: the LED is blinking blue when no smart card is present and becomes fixed blue when a smart card is inserted – according to the manuals, this shows that there is correct communication between the OS and the CCID reader.
    I don't know what to do; I'm beginning to hypothesize it's a digital signer issue. In fact, my smart card only supports one application called File Protector (by Actalis) to officially sign digital documents. This application seems to have major difficulties in identifying the miniLector EVO.
    The generic and ambiguous internal error comes when I try to manually identify the peripheral.
    Athena CNS is one of the Italian smart cards and is automatically recognized and configured (so it's correct – no doubts about this), while "ACS ACR 38U-CCID 00 00" seems to be the real name of the miniLector.
    (I'm assuming this because System Information also returns that the real manufacturer is ACS... bit4id is a re-brander)
    However, when I click on it and then tap OK, it returns internal error.
    As first attempt, I would try to completely erase&clean File Protector files to try a reinstall. Then, if this still doesn't work, I'd debug using the terminal.
    So:
    - Do you know any applications to 100% clean files created by an installer?
    - Do you have in mind any solutions that I might have forgotten?
    Thanks in advance from an OS X fan!

  • Smart card reader refusing to work on OS X Mavericks

    Hi,
    I am the owner of a bit4id Minilector EVO, a little smart card reader (manufactured by ACS Advanced Card Systems) who I use to comply with the digital signatures required by the Italian law.
    There is an official application to use the smart cards; however, I'm experiencing major issues with it.
    Shortly:
    - When I plug the bit4id smart card reader into the USB port of my MBP, the LED shows it is recognized; System Information also tells it has been fully implemented into OS X
    - When I then insert the smart card, no issues are reported and the bit4id LED becomes fixed;
    But, when I start the application to digitally sign, it tries to detect what cryptographic module I'm using. It detects the correct one but reports an «Internal error» halting the process.
    I know there is an implementation of PCSC for OS X called PCSC-Lite, and that there is a terminal command to show if all is working properly.
    Something like pcsc[something] .
    Can you help me?
    Thanks in advance,
    Tyrexionibus

    SCS is a very good app, since I've read that Apple has discontinued support for PC/SC interfaces after the release of Mountain Lion.
    (My previous installation was a Mavericks upgrade from Lion)
    However, I don't know what and how to debug using Smart Card Services. Do you know any commands to use?
    Apparently, the SC reader reports no issues: the LED is blinking blue when no smart card is present and becomes fixed blue when a smart card is inserted – according to the manuals, this shows that there is correct communication between the OS and the CCID reader.
    I don't know what to do; I'm beginning to hypothesize it's a digital signer issue. In fact, my smart card only supports one application called File Protector (by Actalis) to officially sign digital documents. This application seems to have major difficulties in identifying the miniLector EVO.
    The generic and ambiguous internal error comes when I try to manually identify the peripheral.
    Athena CNS is one of the Italian smart cards and is automatically recognized and configured (so it's correct – no doubts about this), while "ACS ACR 38U-CCID 00 00" seems to be the real name of the miniLector.
    (I'm assuming this because System Information also returns that the real manufacturer is ACS... bit4id is a re-brander)
    However, when I click on it and then tap OK, it returns internal error.
    As first attempt, I would try to completely erase&clean File Protector files to try a reinstall. Then, if this still doesn't work, I'd debug using the terminal.
    So:
    - Do you know any applications to 100% clean files created by an installer?
    - Do you have in mind any solutions that I might have forgotten?
    Thanks in advance from an OS X fan!

  • Blackberry Smart Card Reader Problem

    I am trying to setup a Blackberry Smart Card Reader for two factor authentication.  Right now I am trying to set it up with a 8300, once I get that working I will set it up with a 9000 as well.
    I have succesfully paired the Smart Card Reader with the 8300.
    I have a smart card from 360 Web Secure, that is supposed to be a ISO 7816 PC/SC T=0.  It has been setup with 360 Web Secure software for windows logon.
    When I try and turn on two-factor authentication on the blackberry (User Authenticator - Enabled), I get the error:
    Unable to initialize the user authenticator, no supported user authenticator is present.
    I'm guessing that my 360 Web Secure card is not actually compatible, as the Registered Card Drivers listed in the smart card settings on the blackberry are: SafeNet 330, PIV, and GSA CAC.  Since I can't find any material as to wether the 360 card is compatible with these formats, it probably isn't.
    I've spent hours searching the net for a card that would work and I have no idea.  There are many place selling all kinds of cards, but they are all blank cards and seem to need a large enterprise software package to be able to program/manage them....
    So, as an individual, where do i get a card that I can use for two-factor authentication with the blackberry smart card reader?

    This smart card is not supported by the BlackBerry. You would have to write drivers for it yourself.
    The only smart cards which are supported right now are the SafeNet 330, the DoD CAC and the PIV for US federal governments. The later two are actually special versions of the SafeNet 330 with some specific extensions.
    If you want to use smart cards on the BlackBerry you'll therefore need to purchase a SafeNet 330 card along with all the software and hardware to initialize the card on a PC and create/import the certificate.
    Hope that helps.
    Chris

  • MS Remote Desktop and smart card reader

    I have installed MS Remote Desktop Conn. on my iMac and connected a smart card reader via the USB. Although my reader energizes when the computer is on, the computer doesn't seem to recognize the reader. When I insert a CAC card into the reader and try to log in remotely, I continue to get a "username/password" box instead of the CAC PIN number. Do I need to install some kind of smart card driver or does Apple already have it? I'm at a loss as to how to fix this.

    I was able to get rdesktop 1.6.0 to install on my Mac and I was able to get CAC log-in to work.
    However, the installation is a little tricky. I downloaded rdesktop 1.6.0 from this link:
    <<http://www.rdesktop.org>>
    My instructions for installation:
    1. Make sure Xcode Tools is installed on your computer. It should be on your OS X install disk.
    2. Find out where your X11 libraries are located:
    -From the Finder menu, selct "Go" >> "Go to Folder..."
    -Type (without the quotes) "/usr/X11", and click "Go"
    You should see a bunch of folders. Make sure the "include" and "lib" folders are there. Otherwise you need to find out where the X11 "include" and "lib" folders are located on your computer.
    3. Download rdesktop and place the (unarchived) rdesktop-1.6.0 folder on your Desktop
    4. Open the X11 application (should be in your Utilities folder)
    5. In the X11 window type the following (without the quotes):
    "cd Desktop/rdesktop-1.6.0 && ./configure --enable-smartcard -x-includes=/usr/X11/include -x-libraries=/usr/X11/lib && make && sudo make install"
    4. Hit enter. When prompted, enter your administrator password and hit enter.
    rdesktop should now be installed in the following folder:
    /usr/local/bin
    So, to launch rdesktop with smartcard log in enabled, open the X11 application (or Terminal application) and type the following (without the quotes, and replace your.server.address with the server address):
    "cd /usr/local/bin && ./rdesktop -r scard your.server.address"
    Hit enter and it should launch a new X11 window that will try to access the remote server where you should be prompted for your PIN.
    To explore more options with rdesktop, open X11 and type the following (without quotes):
    "cd /usr/local/bin && ./rdesktop"
    Hit enter and you should get a list of options available to rdesktop.

  • ACR122U smart card reader not recognized after reboot...

    I am new to POS Windows and have been working with wondows for ever. I was using ACR 122u contactless usb smart card reader with windows XP and communicating with it using java with no problems. Then our I changed the OS to windows Pos ready 2009 and we found out that USB card reader has to be unplugged and plugged back in after rebooting the computer. other than the OS everything else is identicle (driver, reader, java program, ect..). Can any one tell me what could cause this problem and what I can do to solve this.
    I have cheked the device manager and under USB controllers it says that it is unrecognized deivice..I tried changing the reader, changing the port and(actually the reader is pluged in to a linksys external usb hub, but changing this to a internal port did not make any difference)  tried chagning some settings in control panel.
    1. I checked the power option of the root usb hub.
    2. Changed the driver.cab to a normal driver.cab obtained from the normal xp version. Uninstall the driver and reinstall it.
    So far this hasnt been working.
    I hope someone could help me with this.
    ~Tharanga

    After extensive tests with Win 7 Embedded and ACR122U, I can confirm the same problem. It seems that reader firmware hangs and the only way to recover is to unplug and plug again the reader. We shall repeat the tests with readers from other manufacturers.
    For the tests, we use a Win7 Embedded Standard PC with an ACR122U connected. We installed and configured the ACS Monitor program to start automatically with windows. We made a small utility to restart the PC every minute and we placed it on the Startup directory.
    Within the first 5-10 reboots, the reader fails and the ACS monitor program shows " No reader connected" and no reaction from the reader. If we shall unplug and plug the reader again to the USB port everything works fine again.
    Kostas P.

  • Acrobat 9 does not recognize the smart card reader that work with other app. Can someone help me?

    Hi to All,
    Acrobat 9 (included in CS4 design premium) does not recognize the smart card reader. I have a smart card reader ACR38 smart card that works with all applications except Acrobat 9 pro. I tried to uninstall and reinstall it again, but when I try to insert the digital signature message is always the same, that does not find the Acrobat reader. Can someone help me?

    Hi MartinR
    Thank you for your reply, i have tried what you suggest, and it did not work, the i DVD opening title changed but not the embedded movie.
    Perhaps it is a setting in Final Cut Express?
    After capturing my footage, i open a new project then i convert all clips to anamorphic, to give me the letterbox effect, i have tried now with and without anamorphic.
    In my canvas screen, the footage does not fill the square, even if i have not selected anamorphic, and fall well within the TV safe areas, but the only way to ill the canvas up is to crop it bigger, but still when i export it does not give me the full screen view.
    Any ideas?

  • How to install a smart card reader.

    I am trying to install a smart card reader for work.  There are no prompts when connecting via USB or anything else. 

    There shouldn't be a prompt when you connect an empty card reader.  Insert a memory card into it and it should appear on the Desktop.

  • What kind of driver do I need to use for HP Elitebook 8440p RICOH Smart Card Reader?

    I'm using Arch linux x86_64 and need to install Smart Card Reader, but I can't find any drivers for it.
    Best regards,
    Taavi

    What operating system is it? Are you sure you put the card in the correct way? [not trying to be mean here]

  • T450s -- Display, NGFF SSD, Smart Card Reader, and m.2 SSD slots

    I'm looking to order a T450s and have a few questions about options when configuring the order:
    1080 Display -- Does anyone know if the 1080 display (non-touch) is made by LG or AUO or someone else? There was extensive discussion about the T440s, and people got different brands and the AUO was the preferred brand.
    16GB m.2 NGFF SSD -- If I remove this option, and want to add a 3rd party compatible NGFF SSD later, can I do this?
    3rd m.2 SSD Slot -- The options are None, 3rd m.2 SSD slot, or Smart Card Reader. If I select the Smart Card Reader option, can I later remove the Smart Card Reader and use it as a 3rd m.2 SSD slot? Or, if I select 3rd m.2 SSD slot and later want to use it for a Smart Card Reader, can I buy a Smart Card Reader and plug it into the slot?

    Lenovo uses different FHD diplays for the T450s: one by AU Optronics and the other by LG Display.
    However, the T450s uses a different LG display than the T440s. The LG screen of the T450s ("
    LP140WF3-SPD1") seems to be much better than the LG screen of the T440s.
    If you remove the 16GB M.2 SSD option, you can add a M.2 SSD later.
    If you have a device with two M.2 slots, you can't use a M.2 SSD and WWAN at the same time.
    If you have a device with three M.2 slots, you can only use single-sided M.2 SSDs in the third M.2 slot.
    Both the SmartCard reader and the third M.2 slot are attached to the mainboard via a flexible flat cable.
    If you choose the SmartCard reader, the warranty might be lost if you want to use the third M.2 slot, because you have to replace some parts that aren't so-called CRUs (consumer replaceable units).

  • T61/X61 integrated smart card reader

    Hi,
    Does anyone know if the optional smart card reader on the T61/X61 laptops are based on PCMCIA or Expresscard standards, what is the exact make and model, and if they are CCID compliant?
    Thanks.

    http://shop.lenovo.com/SEUILibrary/controller/e/na/LenovoPortal/en_US/catalog.workflow:item.detail?GroupID=38&Code=41N3043
    Add Smart Card security technology to ThinkPad notebook computers equipped with a 54-mm ExpressCard slot. The Gemplus ExpressCard Smart Card Reader from Lenovo offers an ideal interface between a portable computer and a smart card, to control access to databases or corporate computer networks. A smart card is a plastic card that contains personalized information. It's function can range from simple data storage to more advanced memory and processing capabilities. The Gemplus ExpressCard Smart Card Reader from Lenovo is reader hardware only and does not include blank smart cards or smart card management software.
    Features and Benefits:
    Reads and writes(1) to all ISO-7816 compatible smart cards.
    Reader hardware connects to any ThinkPad equipped with a 54-mm ExpressCard slot.
    Includes drivers for Microsoft Windows 2000 and Windows XP to help get you up and running quickly.
    And it's backed by Lenovo's limited warranty with renowned Service and Support available from IBM.
    (1) Although this reader can be used to access any ISO 7816-compliant Smart Card, Lenovo's primary intent is to enable ThinkPad customers to integrate a security authentication application of their choosing.
    have a look it is an express card version built by Gemplus, not sure about the rest.
    Message Edited by wjli2 on 06-25-2008 12:42 PM

  • Compaq 6910p Smart card reader and a sim care

    I have a compaq 6910p laptop, what is a  Smart card reader and the sim card use for

    Hey marionholt,
    I am sorry, but to get your issue more exposure, I would suggest posting it in the commercial forums, since this is a commercial product. You can do this at http://h30499.www3.hp.com/hpeb/
    I hope this helps!
    I worked on behalf of HP

  • Blackberry Z10 and Smart Card Reader Battery Life

    We have several users with new Z10s using Smart Card Reader 2.  After activation with BAS10, users state the Smart Card Sled battery life has dramatically decreased from the old setup with 9930s on BAS5.  One user states he can have it fully charged at work and it will be dead by the time he gets home.
    I searched around a bit, and haven't found anyone else reporting this issue.  Any ideas what might be causing this?

    Hi my two Z10 don't have this issue, what OS version are you running? The newer version should have fixed the battery issue.

Maybe you are looking for

  • Many-to-Many CMR

    hi all, i defined two entity beans, Quiz and Question, with many-to-many cmr and a table named Quiz_questions_Question_quizesTable is created in the database after deployment process. the formed table columns consist of primary key of Quiz and primar

  • Acrobat 6.0 Pro and reader 9.1

    I have both the free Reader 9.1 and Acrobat 6.0 Pro installed on my computer. Is this going to create problems for me, such as being able to read or create files? I attempted an update earlier today and my computer locked up, so I'm figuring I may ha

  • Question about .scr file while running jcwde ???

    I have a tutorial about java card. it has some information about that tutorial. AID: 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x1 Package ID : 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07 in .scr file I found this part of script: 0x80 0xB8 0x00 0x00 0

  • Help! - Tracks linked to application files, not my music !!

    Something very weird is going on here.... I've got about 500 tracks that somehow are linked to application files. For example if I select "Show in Finder" it takes me to: Applications:iWeb.app:Contents:Frameworks:SFApplication.framework:Versions:A:Re

  • Internet Browser missing

    I bought phone from friend.... Its missing the internet browser app I think... I did a wipe out and everything there is no configuration for it is the problem i think. also missing the help app and the brickbreaker game and stuff.... do i need to get