TOC PREV NEXT INDEX



comm


The comm protocol allows access to the serial port of a device. In the case of Simplicity for Mobile Devices, it will attempt to obtain access to the physical serial ports on the computer. This is particularly useful for connecting to modems or bar code scanners that a MIDlet might want to make use of.

The usage is comm:portname;parameters

where portname is the name of the serial port, and parameters are any combination of the following, separated by semicolons:

For example, to open COM1 using 8 bits, 1 stop bit, and no parity, the URL would be "comm:COM1;bitsperchar=8;stopbits=1;parity=none". Any parameters not specified will default to the OS's settings, so in many cases, all you will need is "comm:COM1".

An additional feature is included to determine the available ports on the computer where Simplicity for Mobile Devices is running. Opening a connection to "comm:;help" will print a list of port names to the Java Console.

To use the comm protocol in Simplicity for Mobile Devices, you must first install the javax.comm optional package from Sun Microsystems. You can download this for Windows and Solaris at http://java.sun.com/products/javacomm/. Implementations for other operating systems may be available from other locations.


Data Representations, Inc.
http://www.datarepresentations.com
support@datarepresentations.com
sales@datarepresentations.com
TOC PREV NEXT INDEX