Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2004

    CommConnection does not work with Series 60 SDK, but works in JWT


    Has anyone got serial communications to work in the Nokia Developers Suite using any emulators?

    I have been trying for quite some time to get serial communications to work in the Series 60 MIDP Concept SDK Beta 0.3 Nokia edition (and 0.31). So far I have had no luck.

    The program is simple. Actually, it is straight out of the MIDP 2.0 API. Her is the relevant code fragment:

    CommConnection cc = (CommConnection)

    InputStream is = cc.openInputStream();
    int ch = 0;
    while(ch != 'Z') {
    ch = is.read();

    The offending line of code is:

    CommConnection cc = (CommConnection)

    With Nokia-DS, this causes a "protocol does not exist" error.
    In JWT this works perfectly.

    Both are using MIDP 2.0.

    I have done allot of digging. I've tried rewriting the connection string every way I could find on the net. And have had no luck.

    I even tried bypassing the Connector.open command, directly writing:

    Class clazz = Class.forName("com.sun.midp.io.j2me.comm.Protocol");
    ConnectionBaseInterface uc = (ConnectionBaseInterface)clazz.newInstance();
    CommConnection cc = (CommConnection) uc.openPrim("comm:0;baudrate=4800", Connector.READ_WRITE, false);

    This got me further, as when I ran this code the emulator got to the point where it asked me if it was okay to establish a connection via the serial port. However, after selecting "yes" I get an "cannot open port" error. This error is actually coming from a c program inside the SDK called commProtocol_md.c. This error is followed by a java IOException that points to an irrelevant line of code.

    After saying all this, I ask again... has anyone got serial communications to work in the Nokia Developers Suite using any emulators at all? Does anyone have any idea what I might be doing wrong?

    Please let me know if you got serial communications to work.

    I would greatly appreciate your assistance on this matter.

    Thank you for your time.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    I haven't heard of any Nokia phone or SDK that supports serial comms. Don't forget that it's not a mandatory protocol.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts