×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    5

    RS232 port in Nokia9210

    Hi,

    I have problem with opening RS232 port on Nokia9210
    side in Java. I'm using standard JavaPhone API javax.comm.*
    from Nokia and I allways obtain exception PortInUseException.
    I'm trying to open COM1 or DATAPORT::0 or IrComm port.
    Nothing works. I found on Symbian site partially solution on
    FAQ-0733. I enclose it for better understanding:
    <symbian>
    Question:
    I am running the SerialChat Java example application on a Nokia 9200 Communicator series SDK for Java. But every time I try to initialise an RS232 port or Ir port I get a PortInUseException. What is wrong here?

    Answer:
    The reasons for this are different for the two different kinds of port.
    In the case of the Ir port, the problem stems from a defect in the javax.comm JavaPhone package which shipped with the Nokia 9210 and corresponding SDK, whereby the wrong name for the Ir port ("IrComm" rather than the correct "IRCOM1") was hard-coded into the com.symbian.javax.comm.EpocCommDriver class in JavaPhone.jar. The solution is to patch this class with an updated version. Unzip the attached zip and copy EpocCommDriver.class into the \erj\classes folder on the SDK or \System\Java\classes folder on the Nokia 9200 communicator. You should find you are then able to initialise the Ir port successfully from the SerialChat application.

    In the case of the RS232 port, this is a device-specific issue with the Nokia 9200 Communicator series which is outside Symbian's control.
    </symbian>

    It is really workig with IRCOM1 for infraport. But I really need
    standard serial cable connection. Is there any solution how to
    open RS232 serial cable port on Nokia9210? I will appreciate any
    solution.

    Regards
    Peter Hanusiak

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    5

    RE: RS232 port in Nokia9210

    I was investigating source of EpocCommDriver from com.symbian.javax.comm package and I found that when somebody try to open COM1 port, _openSerialPort returns zero. Especially this line:
    portHandle = _openSerialPort(handle, name + ":");
    So I think that native library "jcomm" has a bug. Is this bug fixed somewhere? Or at least knows somebody from Nokia, that this module has a bug?!

    Peter Hanusiak

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    16

    RE: RS232 port in Nokia9210

    My application opens the rs232 port successfully but as I try to write it crashes immediatly. Receiving works fine until the first write.
    Dunno where the problem lies but serialchat works one way from the computer to the communicator but not the other way :(

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    16

    RE: RS232 port in Nokia9210

    One question did you turn off your serialport before use ??

Posting Permissions

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