Gemalto is now part of the Thales Group, find out more.

You are here

TC65i --- I don't find any SPI*.class under the installation disk -- Help! | Thales IoT Developer Community

February 3, 2015 - 5:45pm, 1663 views

Hello,

I think there is something wrong about the SPI class.My modem is TC65i.

I don't find any SPI*.class under the installation disk

Product name: TC65 Release 3
WTK Version : "REVISION 03.000"

at+cgmr
REVISION 03.000

Date of WTK generation:  12.11.2008

How can I get this class?

Again. There isn't any SPI*.class under the installation disk I received when I bought the TC65i/

JAVA ERROR: MIDlet initialization failed: java.lang.Error: ClassFormatError: 15


package spi;


import java.io.IOException;
import java.io.*;
import javax.microedition.io.Connector;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import com.siemens.icm.io.SpiConnection;

public class SPI extends MIDlet {

    InputStream isSPI;
    OutputStream osSPI;
   
    protected void startApp() throws MIDletStateChangeException {

       
       
       
        byte[] buffer = new byte[1024];
        try {
            System.out.println("Start");
            SpiConnection spiConn = (SpiConnection) Connector.open("spi:0;baudrate=100;clockMode=1");
            isSPI = spiConn.openInputStream();
            osSPI = spiConn.openOutputStream();
            osSPI.write("<a000004aabbccdd>".getBytes());
            int pos = isSPI.read(buffer);
            if (pos>0) {
                System.out.println(new String(buffer,0,pos));
            }
            System.out.println("END");
 
        } catch (IOException ex) {
            ex.printStackTrace();

        }
    }

    protected void pauseApp() {
    }

    protected void destroyApp(boolean bln) throws MIDletStateChangeException {
                  
   
    }




}