J2me and java card, need help to communicate

we are trying to put together a reader to read smartcards using j2me and we figure that it would be easiest if we could develop it to work with java cards rather than standard smart cards, the problem is we get garbage when we communicate to it, the chip sends us crap, any suggestions what might be wrong, any calls we might be missing, has anyone worked with j2me and java cards or smart cards, any help would be appreciated.
einar

.... reader app and the ME behind it .... smells like mobile ....
First of all - if you want to have one mobile application running on this just make sure that whatever is written in ME can use drivers from the reader chip ....
Workin on the PC is something completely different. There was one good example how to develop one host application in Java provided with the JCOP tools long ago ... I don't know if this is now in the new Eclipse tools.
But - there was a small API provided that can give you good hints what to do - and - once you have it on the reader side - you can easily integrate ME methods with this ...

Similar Messages

  • Image size and mime type.. non-java guy needs help

    Image size, mime type.. non-java guy needs help
    Im not at all familiar with java so this is really weird for me to work out. I?ve been doing it all day (and half of yesterday).
    Im trying to write a custom clodFusion tag in java that gets the width, height, size and MIME types of a given file. I?ve been trying to get it to work on the command line first. I can get the width and height but cant get the size and the MIME type.
    Here is what I got
    /*import com.allaire.cfx.*;*/
    import java.awt.image.renderable.*;
    import javax.media.jai.*;
    import com.sun.media.jai.codec.*;
    import java.io.*;
    import java.util.*;
    public class ImageInfo {
    private RenderedOp image = null;
    private RenderedOp result = null;
    private int height = 0;
    private int width = 0;
    private String type = "";
    private String size = "";
    public void loadf(String file) throws IOException
    file = "80by80.jpg";
    FileSeekableStream fss = new FileSeekableStream(file);
    image = JAI.create("stream", fss);
    height = image.getHeight();
    width = image.getWidth();
    System.out.println(height + "\n");
    System.out.println(width);
    System.out.println(type);
    public static void main(String[] args) throws IOException {
    ImageInfo test = new ImageInfo();
    test.loadf(args[0]);
    can anyone please help me out to modify the above so I can also print the mime type and the file size to screen.
    thanks for any help

    any suggestions?

  • Differences between Java Card 2.1.1 and Java Card 2.2

    Hi guys, how are you?
    My name is Érica and I’m taking Electric Engineering and I love mobile communication.
    I’m reading a PDF about SIM cards for cellular networks and I have a doubt that is “killing” me!
    What is the most relevant differences between Java Card 2.1.1 and Java Card 2.2?
    Could you please help me?
    Best regards.
    Thanks in advance.
    Érica Borsato de Souza Lima – Rio de Janeiro/Brazil

    2.2.x API will be more complete than 2.1.x, just compare the javadocs and specs.

  • Information Retrieval with Genetic Programming using J2ME and Java WTK

    i have a big project to make a software using java programming especially n using J2ME and Java Wireless Toolkit, and i'm a begginer for java programming. I have no idea for the interface and how to setting connection between my phone mobile and GPRS. what should i do? thank you

    I believe MIT has lots of sourcecode. Try searching their site.

  • I have printers at home and work. i need help programing my macbook print utility so computer knows which printer to use depending on where i am. thanks

    i have printers at home and work. i need help programing my macbook print utility so computer knows which printer to use depending on where i am. thanks

    Look for cloud solutions such as DropBox, OneDrive, SugarSync or others. They are all cloud based services that sync documents between computers via the cloud. Of course another solution is simply a flash drive formatted in exFat so that Macs and Windows computers can read it.

  • Java Card Please Help!

    Please I am doing my final year project on secure mobile application using Java Card Technology.
    I need to write and an application that can send SMS on a SIM card to another SIM card with the same application. The application will have a server side which manage the storage of messages and at the same time communicate information to the client on the SIM remotely. I am suppose to use wi-fi (TCP/IP) for transmission.
    Can anybody please give me ideas and possible working codes and simulators.
    I mean step by step procedure of how to start.
    THANK YOU.

    Hi,
    I found the following resources helpful when starting out in JavaCard.
    JavaCard documentation:
    Java Card Technology for Smart Cards: Architecture and Programmer's Guide (Book)
    http://java.sun.com/docs/books/javacard/index.html
    JavaCard specifications:
    http://java.sun.com/products/javacard/specs.html
    Global Platform specifications:
    http://www.globalplatform.org/specificationview.asp?id=card
    Communication between SmartCards and terminals is based on ISO 7816 part 3 and 4 so if you�re completely new to the SmartCard environment it may be helpful getting an overview regarding these specifications. Unfortunately these specifications are not free, they�re available from.
    http://www.iso.org/iso/en/ISOOnline.frontpage
    Software:
    The basis for all development is the JavaCard and Java Development kits.
    Java Development Kit
    http://java.sun.com/j2se/1.4.2/download.html
    JavaCard Development Kit
    http://java.sun.com/products/javacard/dev_kit.html
    Full installation instructions can be found in JCDevKit_User_Guide.pdf which is contained in the JavaCard Development Kit distribution.
    Several companies provide IDE�s that will aid you in developing and deploying applets to JavaCard.
    For example:
    Aspects Developer
    http://www.aspectssoftware.com/devtools/index.html
    There are others out there as well. You may need to also buy physical sample cards; however, the IDE�s usually have simulators built in.
    Hardware:
    To interact with physical cards you�ll require a PCSC compatible card reader.
    Omnikey
    http://www.omnikey.com/
    GemPlus
    http://support.gemplus.com/gemdownload/readers/index.aspx
    Hope this helps.
    Cheers,
    Alasdair

  • Smart Card and  Java Card (URGENT)

    Dear everyone.
    I have purchased a card reader (which is supposed to be java card compatible).
    I have 2 problems.
    1. I just wonder if i can use a Smart Card generally available. Do i need to have a special card for Java Card??
    2. Can i use card kit to interface to the reader/writer? How do i install my applets??
    Please reply soon.
    Thank you very much.

    I tried to execute the OCF samples.
    this code
    OpenCard.services = com.ibm.opencard.factory.MFCCardServiceFactory
    did not give any trouble
    this code
    OpenCard.terminals = com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminalFactory
    gave some troubles. May be because iam not using ibm terminal(card).
    And also, i think the OCF samples will not work anyhow, because the Reflex reader is not OCF complaint.
    So the following may not work
    OpenCard.services = com.slb.opencard.Cyberflex
    I have most imp. questions to ask you now.
    1. What card should i purchase and from whom (along with some software if necessary)?
    2. What is the procedure for reading/writing to that card using the Reflex reader.
    Please help.
    Thanks
    Goldy.

  • WTK and Java Card SDK 2.2.2 emulator( cref ) communication problem.

    Hello everybody
    Just for own interest I was playing with the Java Card SDK 2.2.2 and WTK 2.5.2. But I am getting "Protocol mismatch error" as WTK runs on T=0 and cref runs on T=1. Does anybody have ever faced this problem and how to get rid of it?
    Thanks in advance.
    Shan!!!

    [email protected] wrote:
    Hi friends,
    I am new to Java Card technologies, previously i worked in SCOSTA cards using java application. Now i want to develop java applet and mask into the javacard.
    I tried Java_card_kit-2.2.1 package to build cap file using sample class files based on the specification.
    In command prompt, i configured path and classpath perfectly....
    But when i tried to make cap file by using the following command i am getting error.
    set JC_HOME=C:\java_card_kit-2_2_1
    set JAVA_HOME=C:\j2sdk1.4.2_09
    SET PATH=%JC_HOME%\bin;%PATH%
    SET CLASSPATH=%JC_HOME%\lib\api21.jar;%CLASSPATH%
    converter.bat -out JCA -classdir %JC_HOME%\samples\classes\com\sun\javacard\samples\HelloWorld 0xF2:0x34:0x12:0x34:0x56:0x10:0x10:0x00 1.10I am getting the following error,
    error: invalid AID 1.0.
    Usage:  converter  <options>  package_name  package_aid  major_version.minor_versionSo kindly help me the best way to make cap file.
    regards,
    dhaya.You could try the following:
    converter.bat -classdir %JC_HOME%\samples\classes com.sun.javacard.samples 0xF2:0x34:0x12:0x34:0x56:0x10:0x10:0x00 1.0You only need to specify the base directory for the classes and you need to specify the package separately.
    If you only want to convert to a JCA file you would use the following otherwise all 3 artifacts will be gernerated (CAP, JCA and EXP)
    converter.bat -out JCA -classdir %JC_HOME%\samples\classes com.sun.javacard.samples 0xF2:0x34:0x12:0x34:0x56:0x10:0x10:0x00 1.0I hope this helps.
    Shane

  • EclipseJCDE and Java Card 2.2.1

    Hello all :)
    I need to use Java Card 2.2.1 for Nokia 6131 but my Eclipse IDE only accepts Java Card 2.2.2. Is there anyway that I can get the EclipseJCDE to work with JC 2.2.1 ?
    I need to do this because when trying to upload the .class into the Nokia 6131 emulator's virtual secure element it won't take it and I get an error, I figured the reason is that I'm using a newer version of Java Card.
    Is there any other way that I can test my app.'s behavior, meaning testing how the applet and MIDlet interact?
    Thaaaaaaaaank you in advance for any help
    :)

    Hi,
    I assume you are only using the Eclipse plugin to generate CAP files to use in the Nokia emulator? If so, you can just use Eclipse to compile your classes (using the JCDK 2.2.1 libraries and Java 1.3 as the compilation target) and then use the command line CAP file converter from JCDK 2.2.1 to create the files you require.
    Cheers,
    Shane

  • IMac: Install Java 7 need help!

    Hello, I've an iMac with the newest software version, I want to install java 7 on it for a game server, but when I download it from java.com and I install it and start the server, it still says: Computer on java 6, update to 7 to run server. I already tryed to install with Terminal and direct acess to System Library, it shows that java 7 is installed, but I have to delete java 6. When I delete all java versions, apple says I have to install java SE6, what isn't java 7 but java 6! Help please!!!

    The Oracle JRE is only a web plugin. If you need server-side Java, you'll have to use the Apple-supplied Java 6 runtime, or else the Oracle JDK (which is not a drop-in replacement for Apple's Java.) If your server application depends on Java 7, you'll most likely have to run it on another operating system.

  • Newbie to Java who needs help..

    Hello all.
    I am having some troubles making a random walker/Drunkard. What I have to do is make it that the user inputs the starting X, Y coordinates and the amount of steps he has to walk. After that, it is post to print back the new coordinates he walked to and the distance of his new coordinates is to the starting one. I am new to java so I am confused.. This is what I have so far..
    import java.util.*;
    public class Drunkard {
        private int x;
        private int y;
        private int numSteps;
        private int Distance;
        private int moveDrunk;
        public Drunkard() {
            this.x = x;
            this.y = y;
            this.numSteps = 0;
        public int getX() {
            return x;
        public int getY() {
            return y;
         public int getSteps() {
            return this.numSteps;
        private void move(int numSteps);
        private void moveDrunk(){
        moveDrunk = (int) (Math.random() * 4);
        public int getmoveDrunk() {
            return moveDrunk;
    public boolean getDistance{
    (int)(Math.sqrt((getX()*getX()) + (getY()*getY())));{
    return Distance
    import java.util.Scanner;
    public class DrunkardSimulator
        public static void main (String[] args)
            Scanner scan = new Scanner(System.in);
            System.out.print ("Enter the number of steps: ");
            numSteps = scan.nextInt();
            System.out.print ("Enter the starting x coordinate: ");
            x = scan.nextInt();
            System.out.print ("Enter the starting y coordinate: ");
            y = scan.nextInt();
            Drunkard drunk = new Drunkard();
            System.out.println("The drunk moved to X" +drunk.getX() + ", y " + drunk.getY() && "a distance of " + drunk.getDistance());
    }Any help would be nice.
    Edited by: orlfman on Apr 9, 2008 5:26 PM

    Sorry. I should have stated what I need help with..
    I need help with making him move randomly when the user types in the x,y starting coords, and the amount of steps he has to walk from what the user inputs. I also need help printing out the new x,y coords he walked to randomly and the distance his new coords are from where he first started at (the coords the user the typed in.)
    I have two files:
    Drunkard.java
    import java.awt.*;
    import java.util.*;
    public class Drunkard {
        private int x;
        private int y;
        private int numSteps;
        private int Distance;
        private int moveDrunk;
        public Drunkard(int x, int y) {
            this.x = x;
            this.y = y;
            this.numSteps = 0;
        public int getX() {
            return x;
        public int getY() {
            return y;
         public int getSteps() {
            return this.numSteps;
        public void moveDrunk(int numSteps){
             for (int i=0;i<numSteps;i++) {
            if(rand.nextInt(2)==1) { x+=1; } else { y+=1; } }
        public int getDistance(){
    (int)(Math.sqrt((getX()*getX()) + (getY()*getY())));{
    return Distance
      }And DrunkardSimulator.java
    import java.util.Scanner;
    public class DrunkardSimulator
        public static void main (String[] args)
    int x;
    int y;
    int numSteps;
            Scanner scan = new Scanner(System.in);
            System.out.print ("Enter the number of steps: ");
            numSteps = scan.nextInt();
            System.out.print ("Enter the starting x coordinate: ");
            x = scan.nextInt();
            System.out.print ("Enter the starting y coordinate: ");
            y = scan.nextInt();
            Drunkard drunk = new Drunkard(x,y);
            drunk.moveDrunk(5); //5 steps
            System.out.println("The drunk moved to X,Y" + drunk.getX() + drunk.getY() + drunk.getDistance());
    }Edited by: orlfman on Apr 10, 2008 12:29 AM
    Edited by: orlfman on Apr 10, 2008 12:31 AM

  • ANT tools and java card

    Hi,
    I used the ant tools going with the java card development kit 2.2 and I have the following errors when I run the build.xml
    testinit:
    [apdutool] Java Card Ant Tasks, Version 1.0
    [apdutool] Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    [apdutool] Note: Usage of Java Card Ant Tasks is optional. Java Card Ant Tasks are not supported by Sun Microsystems, Inc.
    [apdutool] Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/javacard/apdutool/Main
    If you have ever had this error, can you help me please to solve it?
    Thanks in advance.

    Hi,
    You are missing a JAR file. Check to make sure you have your classpath setup in your build file with the required libraries.
    Cheers,
    Shane

  • HT201272 Need help guys i purchased a gems using my credit card but i didnt get the gems in that game but i was charge on my credit card, need help :(

    I tried to purchased gems in the game castle master i used my credit card but when i tried to purchase for the first time no gems was added on my account i tried it again it went thru but when i saw my invoice for my purchase i got charged twice but i only got the gems once, NEED HELP PLEASE

    Hi..
    If this is an In-App purchase, turn off the subscription until the matter is resolved >  iTunes Store: Purchasing and managing auto-renewing subscriptions
    iTunes Store: About In-App Purchases

  • Wish I didn't upgrade! and now I need help to figure out how to make it wor

    I have a Windows XP Pro 2nd edition with IE ver 6.0.2 (but I normally use FireFox)
    I've never had any trouble with iTunes until iTunes "forced" me to upgrade my iTunes applicaiton to version 6 if I wanted to "purchase" music. (note to self: Purchase music from stores it's much safer)...
    I upgraded and received no error messages. Trouble is now, when I launch the iTunes application it doesn't "open" ... although the iTunes process begins to run in the background process (ctraltdelete).
    I have uninstalled and installed 5 different times and ways.
    First uninstall was "typical" uninstall. THat didn't fix it.
    Second uninstall was "typical" unistall from the Control Panel, and then I removed the folders from the "program File" folder. Still wouldn't work.
    Third unintall was "typical" then I removed folders from local drive and removed all "known" registry "itune" keys. That didn't work.
    Fourth uninstall was first a "repair" to itunes, and then a "typical" uninstall, then I removed folders, removed registry (does anyone know all of itunes registry keys? Maybe I am missing a few.. the only ones I know of is the "itune" reg). Then I looked through my start up menu from "msconfig" and took a look at my firewall program to see if there was anything preventing the program from running...
    Fifth uninstall pretty much fruitless as my previous attempts.
    I know it HAS to be a registry key of some sort.. here's why:
    When I uninstall and reinstall (no matter how thourough) every time I install the iTunes program Windows XP has never ONCE recognized the new install of iTunes as a "NEW PROGRAM" and it should!
    I need help... what registry keys should I be removing? ANyone suggest for me to remove Quick Time too? What about the ipod updater software? Any connection?
    HELP??????????????????
    THanks
    W.

    hi wmchisholm!
    Trouble is now, when I launch the iTunes application it doesn't "open" ... although the iTunes process begins to run in the background process (ctraltdelete).
    hmmm. is itunes.exe persisting in Task Manager? if so, first check up on these two possibilities:
    iTunes 6 won't open on a Windows computer if firewall software is not up-to-date
    iTunes for Windows doesn't open after upgrading
    but if itunes.exe is disappearing after a few seconds, try the following technique:
    Using MSCONFIG to troubleshoot conflicts in Windows
    ... and let us know the names (exact spelling please) of the start-up items that you had to disable in order to get itunes to launch. (there's a nasty piece of malware out there that has been causing "error-less" itunes launch failures since late October.)
    love, b

  • I recently sold my iphone 4s back to at&t and bought a galaxy s5 but my brother still has an iphone and when he sends me a text it dosnt always go through and i really need help on what to do next please

    I recently sold my iphone 4s back to att and they whiped it clean and now i have a galaxy s5 and my brother still has the iphone but when he sends me texts they dont always go through and i need help on what to do next

    See if this helps:
    iMesssage to old phone
    If you move to another phone and forget to turn off iMessage then read “if you no longer have the device inhttp://support.apple.com/kb/HT5661  If you still cannot resolve it call Apple http://support.apple.com/kb/HE57
    To deactivate iMessage http://support.apple.com/kb/ts5185
    Read http://m.samsung.com/us/support/SupportOwnersFAQPopup.do?faq_id=FAQ00053450&fm_s eq=62995

Maybe you are looking for

  • Import quality issue with AVC/H.264 and workaround

    When I import from my Sanyo Xacti HD700 using "Import from Camera..." the import quality has significant blocking / compression artifacts. However, if I copy the same file off the SD card from the camera and play it back in QTplayer it does not have

  • Fault! error packaging media.http request error

    when i click the package media ,the screen gives me the tip on title. i check the flashaccess.log found  [com.adobe.flashaccess.refimpl.util.ParamsReader] Error loading key encryption certificate java.io.IOException: Unable to load license server cer

  • Problem starting design studio

    Hello to all, Installed BAM 10.1.2.1 on Windows 2000 server. All services start OK and Oracle BAM start page works fine. When I try and start the design studio I get the following error: "VBA initialization failed" and then "failed to create empty do

  • FocusListener problem

    Hello, I have a focus listener that detects errors in my user interface. When the user enters a non Integer parsable entry, an exception is thrown and the focus is set back to the entry with the error. However, it seems as if two focus lost function

  • Any problems with QuickTime update?

    My QT has stopped working viewing videos on websites. I have attempted to download both the 7.3 and 7.4 version. After many attempts, I always receive the message "an unexpected error has occurred during installation." Does anyone have any suggestion