Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:Non-standard IRComm port name must be used on Nokia 5140 (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Tested with
Devices(s): Nokia 5140, software version 3.09
Created: User:Technical writer 1 (14 Sep 2004)
Last edited: hamishwillee (22 Oct 2013)


The IRComm connection does not work if the "comm:IR0" port name is used. The non-standard name "nokiacomm:IR0" should be used instead.


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.


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


Port numbers can be queried using:


The 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 {"comm:IR0");
} catch (ConnectionNotFoundException cnfe) {
//Cannot open connection
//Let's try the Nokia 5140 way
try {"nokiacomm:IR0.....");
} catch (ConnectionNotFoundException cnfe) {
//Handle possible exception
// Do whatever, read or write
This page was last modified on 22 October 2013, at 04:29.
42 page views in the last 30 days.