Hi,
My apps (
http://heartbit.sourceforge.net ) is targeted at small
devices ( palm, pocketPC and smartphone ).
Its needs access to socket-based IRda communication.
I know SuperWaba, altough it does not support natively irda-socket,
allows to write JNI-style native libs. which is fine for me.
Which other JVM will allow to irda sockets ( natively or through JNI )
?
will J2ME include this ?
I googled for the answer, without success...
TIA,
--Philippe
Hi,
As long as your device supports MIDP2.x, I would say yes, you can
access the IrDa through a Serial Emulation.
In the Connection URL, use "comm:ir0"
<javadoc-of-CommConnection>
Recommended Port Naming Convention
Logical port names can be defined to match platform naming conventions
using any combination of alphanumeric characters. However, it is
recommended that ports be named consistently among the implementations
of this class according to a proposed convention. VM implementations
should follow the following convention:
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
This naming scheme allows API users to generally determine the type of
port that they would like to use. For instance, if a application desires
to "beam" a piece of data, the app could look for "IR#" ports for
opening the connection. The alternative is a trial and error approach
with all available ports.
Since:
MIDP 2.0
</javadoc-of-CommConnection>
<another-one>
The following example shows how a CommConnection would be used to
discover available comm ports.
String port1;
String ports = System.getProperty("microedition.commports");
int comma = ports.indexOf(',');
if (comma > 0) {
// Parse the first port from the available ports list.
port1 = ports.substring(0, comma);
} else {
// Only one serial port available.
port1 =ports;
}
</another-one>