Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 10:09, 23 August 2007.

KIJ000076 - Nokia 5140 IRComm port name

From Forum Nokia Wiki


 Nokia 5140 IRComm port name
KIJ000076
Overview
The IRComm connection does not work if the "comm:IR0" port name is used. The non-standard name "nokiacomm:IR0" should be used instead.
Reported against
Series 40 2nd Edition, Nokia 5140, software version 3.09
Date identified
September 14, 2004
Symptoms
-
Detailed description
The URL used when requesting an IRComm link should be "nokiacomm:IR0" instead of the public specification ("comm:IR0"). However, the behavior of the API remains the same as before, in other words, it is a connection based on GCF.
How to reproduce
-
Solution
Requesting an IRComm link in the Nokia 5140 device differs from the MIDP 2.0 Specification in usage of URL. In MIDP 2.0 the IRComm link is opened using:
"comm :<port_name">
and in the Nokia 5140 implementation the IRComm link is opened using:
"nokiacomm:<port_name">
Port numbers can be queried using System.getProperty("microedition.commports")
Nokia 5140 returns "IR0" which can be used with URL: nokiacomm for opening the connection.
The following example code requests the IRComm port as defined in the MIDP 2.0 Specification and if ConnectionNotFoundException is thrown, it tries to open the connection using the Nokia Proprietary IRComm API, which is working in Nokia 5140.
try {
    Connector.open("comm:IR0");
} catch (ConnectionNotFoundException cnfe) {
 //Cannot open connection
 //Let’s try the Nokia 5140 way
    try {
        Connector.open("nokiacomm:IR0.....");
    } catch (ConnectionNotFoundException cnfe) {
    //Handle possible exception
    }
    // Do whatever, read or write
  }
Related Discussions
Thread Thread Starter Forum Replies Last Post
Can a Java application use Nokia InfraRed (IR) ? Jan Jaap Mobile Java General 3 2008-03-24 05:33
9210 & Windows XP on port replicator cock PC Suite API and PC Connectivity SDK 1 2003-02-12 13:50
nokia 7650 serial port com0 mbarnig Bluetooth Technology 8 2003-05-16 09:31
Help 7210's IrDA not working! g4l Mobile Java Tools & SDKs 0 2002-11-19 04:32
Please help me.Urgent!!! angjiyong Mobile Java General 3 2005-01-26 10:14
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZKnowledgeBaseContentQ
     qfnZtypeQUqfnTypeZKnownIssueQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX