Java ME Developer Guide

Chapter 28 - CommConnection Interface

28.3 Parameters

The first parameter will be a port identifier, which is a logical device name. These port identifiers are The valid identifiers for a particular device and OS can be queried through the ￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿ method using the key microedition.commports. A list of ports, separated by commas, is returned which can be combined with a comm: prefix as the URL string to open a serial port connection.device specific and should be used with care.

The valid identifiers for a particular device and OS can be queried through the

￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿ method using the key ￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿. A list of ports, separated by commas, is returned which can be combined with a comm: prefix as the URL string to open a serial port connection.

Any additional parameters will be separated by a semi-colon (;) without spaces. If a particular parameter is not applicable to a particular port, the parameter will be ig- nored. The port identifier cannot contain a semi-colon (;).

Legal parameters are defined by the definition of the parameters below. Illegal or un- recognized parameters cause an ￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿. If the value of a para- meter is supported by the device, it will be honored. If the value of a parameter is not supported, a ￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿ is thrown. If a baudrate parameter is re- quested, it is treated the same way that a ￿￿￿￿￿￿￿￿￿￿￿ method handles baudrates. For example, if the baudrate requested is not supported, the system will substitute a valid baudrate which can be discovered using the ￿￿￿￿￿￿￿￿￿￿￿ method.

Table 36 describes optional parameters.

Parameter

Default

Description

baudrate

platform dependent

The speed of the port.

bitsperchar

8

The number bits per character(7 or 8).

stopbits

1

The number of stop bits per char(1 or 2)

parity

none

The parity can be odd, even, or none.

blocking

on

If on, wait for a full buffer when reading.

autocts

on

If on, wait for the CTS line to be on before

 

 

writing.

autorts

on

If on, turn on the RTS line when the input

 

 

buffer is not full. If off, the RTS line is always

DRAFT - Subject to Change [184/201]

Page 184
Image 184
Motorola maxx V6 manual Parameters, Draft Subject to Change 184/201, Parameter Default Description