×
Namespaces

Variants
Actions

Infrared Ports

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: jimgilmour1 (16 Mar 2007)
Last edited: hamishwillee (30 May 2013)

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 30 May 2013, at 23:30.
50 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×