JavaTM-Powered iButtonTM FAQ (November 2000)


This document is intended to answer the most common questions developers ask about the Dallas Semiconductor's Developer's Kit for our JavaTM Powered Crypto iButtonsTM (a.k.a.: iB-IDE). If you have a question which is not answered here, please post your question to the Java Powered iButton Forum at java-powered-ibutton@ibutton.com. If you do not subscribe to this list, you can do so by sending an E-mail to java-powered-ibutton-request@dalsemi.com with subscribe java-powered-ibutton in the body of the message. This list is monitored by interested developers and Dallas Semiconductor engineers.


Questions from Developers

  1. What happened to the JiBKit?
  2. What is Dallas Semiconductor's Java Powered Crypto iButton?
  3. What JDKs are supported by this developer's kit (iB-IDE)?
  4. What platforms are supported by the iB-IDE?
  5. I get the following error message when running under Windows:"Error 2 opening registry key HARDWARE\DEVICEMAP\SERIALCOMM". What can I do about this?
  6. I'm running Windows NT and I can't seem to install the Win32 drivers. What is required to install drivers under Windows NT?
  7. I get the following error when I run the host examples: "access-ibKeyOpen, timeout waiting for port owned". What is wrong?
  8. Why do I keep getting an unsatisfied link error when trying to run the host examples?
  9. Where can I purchase the hardware required for the developer's kit?
  10. What does the return code of 0x6681 mean?
  11. When I try to load an applet I get a return code of 0x6903. What does that indicate?
  12. When I try to load an applet I get a return code of 0x6902. What does that indicate?
  13. When I try to load an applet I get a return code of 0x6A84. What does that indicate?
  14. What causes a return code of 0x8453?
  15. When I try to talk to my applet I get a return code of 0x6985. What does this mean?
  16. When I am talking to my applet it returns a status word 0x6F00. What happened?
  17. I keep getting an Out of Memory Error (status word 0x6400 or error code 0x62), but I don't think I should really be out of memory. What can I do?
  18. Why do I get the error "cannot load class ..." even when my CLASSPATH is correct?
  19. I am writing an applet to store information. I can allocate an array the size I need OK, but I can't seem to send more than 255 bytes to my applet successfully. What's wrong?
  20. I need documentation on the classes "commandAPDU" and "responseAPDU", but I do not see it described anywhere in the online help of the iB-IDE. Where can I get this information?
  21. Where can I get additional documentation?
  22. When I try to compile my applet, I get an exception thrown which says "NoSuchMethodError: CommPortIdentifier: method open() or openPort() not found". What's going on here?
  23. What are the different versions of the iButton, and what cryptographic functions are available on each?
  24. How can I build Java Powered iButton applets outside of the iB-IDE?
  25. How can I build and run the host applications that talk to the Java Powered iButton from outside of the iB-IDE?
  26. What does "Exception opencard.core.util.OpenCardPropertyLoadingException: property file not found" mean?
  27. How can I generate RSA keys in the Java Powered iButton?
  28. Does Sun's new HotSpot work with the iB-IDE?
  29. What does a "java.io.IOException: CreateProcess: javac ..." error mean when I try to compile?
  30. Why doesn't my JDK 1.2 VM appear in the list of available VM's when I try to install iB-IDE?
  31. What do all of the many exceptions mean that appear in the Messages window when I'm using the online help system?
  32. How do I get started programming?
  33. When I use the Project Wizard to create a new Project I get the error: "java.lang.IllegalArgumentException: bad position: ..." What does this mean?
  34. How do I read the Java Powered iButton's real time clock?
  35. Is the Java Powered iButton the same thing as a Java Card? Will my code for the iButton work on a Java Card?
  36. How can I modify my classpath to include more files in my iB-IDE applications?
  37. When I use APDU Sender's Get Last Error function, the response is "None or Coprocessor". What does this mean?
  38. My applet uses the iButton's cryptographic features. Can I debug it using the emulator?
  39. I've set my breakpoints, but they don't show up beside the code--they show up several lines down. What is going on?

Dallas Semiconductor Support Team Answers


  1. What happened to the JiBKit?

    Answer:
    The iB-IDE is a complete replacement and enhancement of the previous JiBKit releases. If you would like to work without the tools in the iB-IDE, see the questions on building applets and running host programs outside of the iB-IDE.


  2. What is Dallas Semiconductor's Java-Powered Crypto iButton?

    Answer:
    The DS Java-Powered Crypto iButton is a secure Java Virtual Machine encased in a stainless-steel circular container only 16mm wide. It is Java-powered and designed according to Sun's Java Card 2.0 specification. Because it has more RAM than other Java Card-based products, your programs can do more, and since it relies on battery-backed static RAM to store its applets, it can be programmed over and over again as needs change. Perhaps best of all, the iButton's small size means it can be integrated into all sorts of personal accessories for both safe keeping and convenience of use. Find out more at http://www.ibutton.com/store/index.html.

    This iButton has a super-fast, 1024-bit modular math coprocessor for cryptographic operations. This is, in fact, the same coprocessor already proven in the DS Crypto iButton with Dallas O/S. Having such a coprocessor makes the Java Powered Crypto iButton ideal as a general-purpose security device, fully capable of performing secure transactions over the internet.


  3. What JDKs are supported by this developer's kit (iB-IDE)?

    Answer:
    This version was developed and tested for on JDK 1.2 and JDK 1.3. This is a requirement to install and run iB-IDE, but the underlying iButton code needed to simply run iButton applications will work on JDK 1.1.x.

    This version fixes the previous problems where no JDK other than 1.2.1 and 1.2 would work with the iB-IDE. Future versions of the JDK should be compatible with iB-IDE, but as long-time users know, problems may arise from future JDK releases.


  4. What platforms are supported by the iB-IDE?

    Answer:
    The iB-IDE supports Windows 9xTM, Windows NTTM, SolarisTM versions 2.5.1 or greater, and Linux.


  5. I get the following error message when running under Windows:"Error 2 opening registry key HARDWARE\DEVICEMAP\SERIALCOMM". What can I do about this?

    Answer:
    Try passing a command line parameter to the application that you are running. The command line parameter is the communications port name on your machine. Example: "java BusinessCardDisplay COM1"


  6. I'm running Windows NT and cannot seem to install the Win32 drivers. What is required to install drivers under Windows NT?

    Answer:
    In order to have "permission" from Windows NT to install drivers, you must be using an Administrator account when you install iB-IDE. Also, please note that in order for the NT drivers to work properly, you must also have Service Pack 2 or greater installed on your machine.

    NOTE: These drivers are only needed if you are using the DS1410E parallel port adapter. They should not be needed for serial port communication, since serial communication can be achieved using pure Java.


  7. I get the following error when I run the host examples: "access-ibKeyOpen, timeout waiting for port owned". What is wrong?

    Answer:
    What you see are debug and test statements sent to the console screen used during development. This, in itself, is not a cause for worry. If your applet still finds the iButton, then these messages may be ignored. If not, first make sure that there are no other applications running that may be using this port. If all else fails, move your Blue Dot adapter to another port.


  8. Why do I keep getting an unsatisfied link error when trying to run the host examples?

    Answer:
    The most likely cause is that Java cannot find a native library it needs in order to continue executing. If you are on Windows 95 or NT, make sure that both the "iButtonLegacy.dll" and "win32com.dll" are in the "[JDK_ROOT]\jre\bin" directory. If you are running Unix, then make sure the appropriate libraries can be found in the directory pointed to by the environment variable LD_LIBRARY_PATH.

    This problem is also seen while using early betas of JDK 1.2. We currently recommend using the release version of JDK 1.2 or later.

    You might also see this sort of problem if you are running a vendor's VM other than the one provided by Sun. While several other vendors VM's have been shown to work well with these libraries, you should check with your vendor to find out whether their VM's are conformant to regular native Java standards, including where the appropriate libraries should reside.


  9. Where can I purchase the hardware required for the developer's kit?

    Answer:
    You can order directly from our Information Security Store or contact Brian Kraman via e-mail at brian.kraman@dalsemi.com for purchasing information.


  10. What does the return code of 0x6681 mean?

    Answer:
    A return code of 0x6681 indicates a security problem while attempting to perform a command function, such as running an applet. All iButtons for Java have potential to be locked using password protection. The rings from JavaOne 1998 use the PIN "1!J1".


  11. When I try to load an applet I get a return code of 0x6903. What does that mean?

    Answer:
    A return code of 0x6903 is very similar to the above code of 0x6681, except that this code occurs as a result of attempting to load an applet. It also indicates that the master password supplied is incorrect. The only password used on Java Powered iButtons supplied at Java One 1998 is "1!J1".


  12. When I try to load an applet I get a return code of 0x6902. What does that mean?

    Answer:
    A return code of 0x6902 (Bad API Version) means that you have tried to load an applet on your iButton that was built for a different iButton version. To fix this, determine the firmware version string of your Java Powered iButton using APDUSender. Then, under COMPILE | OPTIONS, choose the correct Target iButton Version.


  13. When I try to load an applet I get a return code of 0x6A84. What does that indicate?

    Answer:
    This error (Class Length Overrun) can occur when you are trying to load a larger applet onto the Java Powered iButton. The applet must be sent in packets, and transmission errors can cause this failure. You can increase the packet size to reduce the occurance of this error. In your code, add the line

    	jibapi.setLoadPacketSize(120);
    before you load the applet (jibapi is a JiBAPI object--remember that JibMultiFactory extends JiBAPI, as a JibMultiFactory might be easily accessible in your iB-IDE generated code). The default Load Packet Size is 64. You should not go above 120.


  14. What causes a return code of 0x8453?

    Answer:
    A return code of 0x8453 is caused by selecting an applet that does not exist on the Java Ring. This almost always occurs when a developer believes an applet has been loaded, but for some reason it has not.


  15. When I try to talk to my applet I get a return code of 0x6985. What does this mean?

    Answer:
    This usually happens when the applet has failed to load or has not been selected before communication, so the Java iButton does not know what to do with your APDU. Make sure to select the applet before you communicate with it.


  16. When I am talking to my applet it returns a status word 0x6F00. What happened?
  17. Answer:
    A 0x6F00 means "Uncaught Exception". Either an exception was thrown from the iButton and there was no try | catch block around it (like a NullPointerException) or an error was thrown that could not be 'caught' (like an OutOfMemory Error). To determine what happened, you can use APDU Sender and issue the command Get Last Error or in your code you can do something like the following:

                if (statusWord==(short)0x6f00)
                    try
                    {
                        //jibapi is a JiBAPI object
                        ResponseAPDU response = jibapi.getLastError();
                        int err = 0x0ff & response.data()[0];
                        System.out.print("Last Error reported as 0x");
                        if (err<16) System.out.print('0');
                        System.out.println(Integer.toHexString(err));
                    }
                    catch(Exception e)
                    {
                        System.out.println("Could not getLastError!");
                    }
            

    You can determine the meaning of the returned code from the Status Word document. Make sure you know the firmware version of your iButton to determine the meaning of an exception.


  18. I keep getting an Out of Memory Error (status word 0x6400 or error code 0x62), but I don't think I should really be out of memory. What can I do?

    Answer:
    Make sure that both types of garbage collection are enabled. You can do this with the APDU Sender program (press F4 to start it). There are two types of garbage collection: Applet and Ephemeral. Under APDU Sender, there are Get and Set commands for both types. Make sure the Get methods return 1.

    Note that unlike on a PC or workstation, garbage collection in the iButton will not begin until the process method returns. Variables may fall out of scope, but they will not be available for collection until the end of the process method.


  19. Why do I get the error "cannot load class ..." even when my CLASSPATH is correct?

    Answer:
    You probably have environment size problems. You can change this value in Windows 95 by pulling up properties on the DOS shell you are using. Under the Memory tab, change the Initial Environment Size to a larger value. Apply the changes, and try again.

    A similar error, "NoClassDefFoundError" may occur on the Windows 95 platforms for unknown reasons, and may sometimes be corrected by either (A) using the syntax "java -classpath %classpath% <myApplet>", or (B) by changing the order of required jar files in the classpath so that the jar file used by the application for itself is last.


  20. I am writing an applet to store information. I can allocate an array the size I need OK, but I can't seem to send more than 255 bytes to my applet successfully. What's wrong?

    Answer:
    There is a bug in the Java One '98 release of the iButton for Java which prevents the array index parameter to "sendBytesLong()" from completing successfully. This can be worked around by sending arrays which are larger than 255 bytes in pieces. By iteratively sending smaller packets, you can successfully load an array which is larger than 255 bytes. (The code generated by iB-IDE will automatically handle this for you.) This has been fixed in the 1.0 release of the Java-Powered iButton.


  21. I need documentation on the classes "commandAPDU" and "responseAPDU", but I do not see it described anywhere in the online help of iB-IDE. Where can I get this information?

    These classes are a product of the OpenCard consortium and the latest documentation can be downloaded from the associated web site.


  22. Where can I get additional documentation?

    Answer:
    For information on the latest Java Card specification refer to http://www.javasoft.com/products/javacard/index.html. However, the Java Powered iButton conforms to the Java Card 2.0 specification. Documentation is hidden on Sun's website but can still be found at http://www.javasoft.com/products/javacard/javacard20.html#download.

    For the latest in OpenCard technology, visit http://www.opencard.org.

    Check http://www.ibutton.com/iB-IDE for updated documentation on the iB-IDE.


  23. When I try to compile my applet, I get an exception thrown which says "NoSuchMethodError: CommPortIdentifier: method open() or openPort() not found". What's going on here?

    Answer:
    This is an easy problem to fix, once you realize what causes it. The "javax.comm" package changed slightly when Sun promoted the code from EA to Beta status. In doing so, two method names have been changed: openPort() & closePort(). The new names for these methods is simply open() & close(). The latest version is included with the installation for iB-IDE.

    The latest and most current version of our developer's is iB-IDE version 1.0. We strongly encourage all our developers to make the transition to this version if they are currently working with older versions.


  24. What are the different versions of the iButton, and what cryptographic functions are available on each?

    Answer:
    The version 0 iButtons - a.k.a. 1998 JavaOne iButtons - (Java iButton Firmware Version 0.03.0003) have no modular exponentiation capabilities. This ring is therefore not export controlled. It does have a SHA-1 hash class (javacardx.crypto.Sha1MessageDigest) and a random number generator (javacardx.crypto.Random).

    The 1.0 iButtons (Java iButton Firware Versions 1.00.0004, 1.01.0004, 1.02.0005, and 1.03.0005) have a modular exponentiation function in addition to the version 0 iButton functions. This new function can be found in the com.dalsemi.system.Coprocessor class. This allows any modular exponentiation based cryptography schemes (RSA, DSA, etc.) to be implemented on the iButton. (See the RSASign example project in iB-IDE).

    The 1.1 iButtons (Java iButton Firmware Versions 1.10.0006 and 1.11.0006) have the javacardx.crypto package fully implemented (providing DES, RSA implementations). See the javacardx.crypto specification for the available functions.

    The 2.2 iButtons (Java iButton Firmware Versions 2.2.0007) have 134K memory and support RSA keyset generation through a Dallas Semiconductor provided class.


  25. How can I build Java Powered iButton applets outside of the iB-IDE?

    Answer:

    Building a Java Powered iButton applet outside of the iB-IDE is a two step process. First you must compile the applet into a class file (or files), then you must build a .jib file from the class file(s).

    Compiling:
    Find the file rt.jar on your system. On a Windows system, it might be located in C:\Program Files\JavaSoft\JRE\1.2\lib\rt.jar.

    Also determine the Java Powered iButton version that you will be building for. You can determine this using APDUSender. From the firmware version string, determine the database file to use from the iButton Database page. This file will be in the form jibXX.jibdb, where XX is a two digit number, unless you are building for a 1998 Java-One version of the Java Powered iButton, in which case you will need the file javaone.jibdb. You will also need to find the file iButtonXX.jar, with the same XX as for the database file (you will need iButton32.jar for a 1998 Java-One iButton).

    To compile from a prompt, type:
    javac -bootclasspath "d:\iBIDE\class\iButtonXX.jar;C:\Program Files\JavaSoft\JRE\1.2\lib\rt.jar" mysource.java

    Building the Applet:
    Find the file jib.jar. The iB-IDE places this file in a folder in your JDK's directory structure (in the jre\lib\ext path). For instance, it might be in C:\jdk1.2.1\jre\lib\ext.

    To build from a prompt, type:
    java -classpath c:\jdk1.2.1\jre\lib\ext\jib.jar;%classpath% BuildJiBlet -f mysource.class -o mysource.jib -d jibXX.jibdb

    Making an applet from multiple files:
    To make a Java Powered iButton applet from several class files, only a slight modification from the above is necessary.

    Build your class files normally by adding the extra class files to the end of the command line shown above:
    javac -bootclasspath "d:\iBIDE\class\iButtonXX.jar;C:\Program Files\JavaSoft\JRE\1.2\lib\rt.jar" mysource.java myobject.java

    Then move your class files to a new directory. In this example, assume we've moved the files mysource.class and myobject.class to a directory called build. No other files exist in that directory. Now to build the applet:
    java -classpath c:\jdk1.2.1\jre\lib\ext\jib.jar;%classpath% BuildJiBlet -f build -o mysource.jib -d jibXX.jibdb


  26. How can I build and run the host applications that talk to the Java Powered iButton from outside of the iB-IDE?

    Answer:
    You will need to include the following files in your classpath:

    1. exportable_ocf.jar
    2. comm.jar
    3. selector.jar
    4. jibapi.jar
    These files are placed in your JDK's lib\ext directory by the iB-IDE installation program, for instance they might be in C:\jdk1.2.1\jre\lib\ext. You can add these to your classpath in several ways.
    1. You can set the environment variable on your system. For instance, on Windows machines you can type

      set classpath=.;c:\jdk1.2.1\jre\lib\ext\exportable_ocf.jar;c:\jdk1.2.1\jre\lib\ext\comm.jar;c:\jdk1.2.1\jre\lib\ext\selector.jar;c:\jdk1.2.1\lib\ext\jibapi.jar

      This can also be done from a batch file (like autoexec.bat) or a script.

    2. You can set the classpath if you are building from a development tool. For instance, in Visual Cafe, under the PROJECTS menu, select OPTIONS, then select the DIRECTORIES tab. Add the jar files to your classpath here.

    3. You can specify the classpath in your command. For instance, to compile, type:

      javac -classpath .;c:\jdk1.2.1\jre\lib\ext\exportable_ocf.jar;c:\jdk1.2.1\jre\lib\ext\comm.jar;c:\jdk1.2.1\jre\lib\ext\selector.jar;;c:\jdk1.2.1\jre\lib\ext\jibapi.jar myHostSource.java

      You can also specify a classpath to run the project.

      java -classpath .;c:\jdk1.2.1\jre\lib\ext\exportable_ocf.jar;c:\jdk1.2.1\jre\lib\ext\comm.jar;c:\jdk1.2.1\jre\lib\ext\selector.jar;;c:\jdk1.2.1\jre\lib\ext\jibapi.jar myHostSource

    You must also have the file opencard.properties in your [jdk]\jre\lib directory. This file selects which port you are going to use for communication with the iButton. See the discussion on OpenCardPropertyLoadingException for more details on this file, or visit the OpenCard website.


  27. What does "Exception opencard.core.util.OpenCardPropertyLoadingException: property file not found" mean?

    Answer:
    The program is trying to find the file opencard.properties on your system to determine which port it should use to communicate with the iButtons. It should be located in your [jdk]\jre\lib directory. The contents the file should look something like this (on a Windows machine):

    #Only the last uncommented line will be used to search for iButtons.
    #Uncomment the next line to search COM1 using native code
    #OpenCard.terminals=com.ibutton.oc.terminal.jib.iButtonCardTerminalFactory|iButtonAdapter|iBUTTON_PORT_TYPE_LEGACY_SERIAL|COM1

    #Uncomment the next line to search COM2 using native code

    #OpenCard.terminals=com.ibutton.oc.terminal.jib.iButtonCardTerminalFactory|iButtonAdapter|iBUTTON_PORT_TYPE_LEGACY_SERIAL|COM2

    #This line will search the LPT1 for iButtons.
    OpenCard.terminals=com.ibutton.oc.terminal.jib.iButtonCardTerminalFactory|iButtonAdapter|iBUTTON_PORT_TYPE_LEGACY_PARALLEL|LPT1

    #Uncomment the next line to search LPT2 using native code

    #OpenCard.terminals=com.ibutton.oc.terminal.jib.iButtonCardTerminalFactory|iButtonAdapter|iBUTTON_PORT_TYPE_LEGACY_PARALLEL|LPT2


    In this case, parallel port 1 will be searched for iButtons.

    If you continue to have problems with this exception, you might also try copying the opencard.properties file into your working directory.


  28. How can I generate RSA keys in the Java Powered iButton?

    Answer:
    Only the most recent version (2.2) of the Java Powered iButton can generate an RSA keyset. This functionality is available in the com.dalsemi.security.RSAKeyGenerator class.

    Previous versions of the iButton that support RSA operations must have their keysets generated outside the iButton, then loaded into the iButton. Note that some keyset generation programs (including any code in Java that uses the BigInteger class to create primes) can sometimes create what appears to be a prime of N+1 bytes instead of the requested N bytes (for instance, your prime will be 129 bytes instead of 128). In most cases, this extra byte is a leading zero attached to ensure the prime is not interpreted as a negative number. You can usually truncate this leading byte.


  29. Does Sun's new HotSpot work with the iB-IDE?

    Answer:
    If you are using the iB-IDE native drivers for communication to the iButton (which is the default), HotSpot will not work. From the HotSpot FAQ: "Native methods used with the Java HotSpot Performance Engine must conform to the Java Native Interface (JNI) specification. The Java HotSpot Performance Engine does not and will not support native method conventions older than the JNI specification."

    The iB-IDE native drivers conform to the older stubs interface and will therefore not work with HotSpot. If you have HotSpot installed in your system, you need to either uninstall it, or edit the iB-IDE_1_01.bat (or .sh) file and add the "-classic" switch to the call to java. (Note: Windows users must also do the same update to the iB-IDE_1_01.ini file.)

    However, you can choose instead to use javax.comm as your primary communication layer. To do so, edit the [jdk1.2]\jre\lib\opencard.properties file. This file should have all of the ports installed in your system enumerated on separate lines. All of the lines should be commented out with a '#' except for the port you are using. Find the line you are using and remove the embedded string "_LEGACY" from the line. You should now be able to use HotSpot with iB-IDE.


  30. What does a "java.io.IOException: CreateProcess: javac ..." error mean when I try to compile?

    Answer:
    This is caused by [jdk1.2]\bin not being in your PATH environment variable. Add this to your PATH (making sure it is the first Java VM bin directory in your PATH). Windows systems may need to reboot.

    You can also go into Compile -> Options and put the full path to javac.


  31. Why doesn't my JDK 1.2 VM appear in the list of available VM's when I try to install iB-IDE?

    Answer:
    Unix users can choose to specify the path to the desired VM if it doesn't appear in the available list. Java InstallShield will search the PATH for available VM's, so adding the desired VM bin directory to the PATH (as the first Java VM bin directory) will make that VM appear as available.

    On Windows systems, Java InstallShield currently searches the registry for available VM's. These are often missing or altered so that a valid VM might not appear in the available list. Make sure these following registry entries exist. If they do not, use regedit to add them and try running setup again.

    My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\
    JavaDevelopment Kit

    My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\
    JavaDevelopment Kit\1.2>

    The first key should have one string value (other than 'Default') called "CurrentVersion" with a value of "1.2". The second key should have 2 string values. The first is named "JavaHome" with the value being the full path to your JDK installation directory. The second should be named "MicroVersion" and have a value of "0" if using the original JDK 1.2, or "1" if using 1.2.1, or "2" if using 1.2.2.

    This solves 98% of problems Windows users have with Java InstallShield. If this does not solve your problem, please post to the developer list. Details for posting to this list are at the top of this document.


  32. What do all of the many exceptions mean that appear in the Messages window when I'm using the online help system?

    Answer:
    iB-IDE's online help system is built around the JavaHelp API. There are several JavaHelp documented bugs pertaining to harmless exceptions being thrown when using the API. If the help system is responding correctly despite the numerous exceptions being thrown, you can safely ignore the exceptions. You can always clear the exceptions from your display by right clicking in the Message window and choosing to clear messages.


  33. How do I get started programming?

    Answer:
    iB-IDE's online help system has several tutorials that walk you through step-by-step writing your first iButton project. The tutorials are located under Project Creation in the online help and are called Host and Applet Tutorial and Applet and APDUSender Tutorial.


  34. When I use the Project Wizard to create a new Project I get the error: "java.lang.IllegalArgumentException: bad position: ..." What does this mean?

    Answer:
    This error is caused by running previous versions of iB-IDE under JDK 1.2.2. This JDK release introduced several incompatibilities making it unusable with iB-IDE. This problem has been accounted for in the current release of iB-IDE. If you experience this problem, please post to the developer list (see details at the top of the page).


  35. How do I read the Java Powered iButton's real time clock?

    Answer:
    Use com.dalsemi.system.Clock.getClock(). It is a static method returning an int that contains the current value of the clock in seconds.


  36. Is the Java Powered iButton the same thing as a Java Card? Will my code for the iButton work on a Java Card?

    Answer:
    The Java Powered iButton conforms to the Java Card 2.0 specification. It communicates through APDUs and implements the javacard.framework package. Programs written that adhere to the Java Card standard will run on both the iButton and a typical "smart-card-like" Java Card. However, you will not be able to take the jib file (the converted applet) and run it on another Java Card. Once the source has been compiled, it must be converted to a hardware specific format (this is what the BuildJiBlet tool does).

    Also, be aware of differences between Java Card implementations. The Java Powered iButton supports the Java Card cryptography extensions, which are optional in the Java Card specification. There are also a number of iButton specific classes (the com.dalsemi packages) that will not be supported on other Java Cards. In addition, the Java Powered iButton supports integers (int), which is not included in the Java Card specification.


  37. How can I modify my classpath to include more files in my iB-IDE applications?

    Answer:
    The 1.10 Release of iB-IDE now has support for modifying classpaths. There are two CLASSPATH buttons on the project window--one for the applet and one for the host. See Changing a Classpath in the iB-IDE online documentation for a discussion of how to change your classpath.


  38. When I use APDU Sender's Get Last Error function, the response is "None or Coprocessor". What does this mean?

    Answer:
    Due to an oversight in the Java Powered iButton Firmware Release 2.2.0007 only, the exception code byte for a CoprocessorException is 0x00, which is also the response from an iButton Get Last Error call that means "No Error". If you perform a Get Last Error immediately after recieving a 0x6F00 (Uncaught Exception), a response of 0x00 should mean "CoprocessorException".


  39. My applet uses the iButton's cryptographic features. Can I debug it using the emulator?

    Answer:
    The 1.10 Release of iB-IDE now has support for debugging applets that use the iButton's cryptographic functions. In order to avoid legal issues, you must download Sun's Java Cryptography Extension (JCE) from "http://www.javasoft.com/products/jce/index.html". The JCE includes a JAR file that you must put in your classpath, either by including it manually or by putting the file in the same directory iB-IDE puts the files jibapi.jar, exportable_ocf.jar, and others: [JDK home]/jre/lib/ext.

    Note that you can still use the emulators without downloading the JCE, but you will not be able to access the emulated cryptographic features.

    This release of iB-IDE was developed using JCE 1.2.


  40. I've set my breakpoints, but they don't show up beside the code--they show up several lines down. What is going on?

    Answer:
    This can occur when the fonts used by iB-IDE cannot be found. The program will use default fonts instead, but the breakpoints are positioned based on the size of the requested fonts. The breakpoints are really there, they are just being drawn in the wrong place.

iButton Homepage: http://www.ibutton.com/