Namespaces
Variants
Actions

Infrared Ports

Jump to: navigation, search
Article Metadata

Article
Created: jimgilmour1 (16 Mar 2007)
Last edited: hamishwillee (27 Jul 2012)

The communication over infrared is by built in ports. In early devices these were simply described as "COM1". The main problem is the need to be with not further than 40cm between devices, but there is a further problem that both transmitter and reciever must be in a straight line and not closer than 9cm. If the transmitter is closer that 9cm the receiver may be "blinded" by the infrared light source.

Find IR Ports in S60

Java ME and IR ports

MIDlets can query available comm ports using the System.getProperty() method call with string "microedition.commports". This returns a comma-separated list of ports.

According to the MIDP spec, following convention should be used.

Port names contain a text abbreviation indicating port capabilities followed by a sequential number for the port. The following device name types should be used:

  • COM#, where COM is for RS-232 ports and # is a number assigned to the port
  • IR#, where IR is for IrDA IRCOMM ports and # is a number assigned to the port

The name of the port can then be combined with a comm: prefix as the URL string to be used to open a serial port connection.

This page was last modified on 27 July 2012, at 09:27.
107 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved