Technical information
Chapter 5: JAVA API
July 15, 2008 G24 KJAVA User’s Guide 5-21
Parameters in square brackets are optional. If an optional parameter is omitted, the default value
will be set. The following table shows the possible parameters values:
Usage examples in Java MIDlet
:
OSC.setProperty("oem.uart.config", "comm:com2;databits:8;stopbits:2;parity:odd;");
OSC.setProperty("oem.uart.config", "comm:com1;baudrate:4800;fc:hw;")
OSC.setProperty("oem.uart.config", "comm:com1;")
Location Session
After previous steps, the user can open the Location session in order to obtain relevant location
information.
Request Location example in Java MIDlet
:
QualifiedCoordinates coordinates = null;
// Set criteria for selecting a location provider:
// accurate to 500 meters horizontally
criteria = new Criteria();
criteria.setHorizontalAccuracy(500);
// open selected by OSC serial port(UART1 or UART2)
provider = LocationProvider.getInstance(criteria);
provider.getLocation(timeout);
Parameter Description Port setting Possible values
Default
Value
Comm.. UART number. <uart_id> "com1", "com2" N/A
baudrate UART speed. <baudrate_value> "110","150","300",
"600","1200","2400",4800","
9600",
”14400", "19200", "28800",
"38400", "57600", "115200",
"230500", "460800",
"921600"
19200
databits Number of data bits per
character.
<databits_value> "7", "8" 8
stopbits Number of stop bits per
character.
<stopbits_value> "1", "2" 1
parity Parity. <parity> "odd", "even", "none" None
Fc Flow control. <fc> "hw", "sw", "none" None