Technical information

Standard Classes Deviations
5-20 G24 KJAVA User’s Guide July 15, 2008
Initialization of a GPS Device
The GPS device should be initialized before usage, in order to wake-up in the periodical
broadcasting NMEA mode. The special commands in binary format could be sent using Comm
Connection APIs. It could be @@Oi, @@OF, @@Oa, @@Oj, @@Ot, @@Oa configuration
commands for basic GPS initialization and $PMOTG commands to assign NMEA format for
broadcasted messages. These commands may be different for different GPS types.
Usage example in Java MIDlet
:
// Open connection with UART2 in order to initialize GPS
CommConnectioncommConnectionUart2
=(CommConnection)Connec-
tor.open("comm:COM2;baudrate=19200;autocts=off;autorts=off",
Connector.READ_WRITE, true);
oStreamUart2 = commConnectionUart2.openOutputStream();
System.out.println("Start GPS initialialization...");
// Initilize GPS
oStreamUart2.write(CommandArray); // When CommandArray is a Byte array of a GPS specific
initialization command.
oStreamUart2.flush();
// Close connection
oStreamUart2.close();
commConnectionUart2.close();
System.out.println("End GPS initialialization.");
Setting of Selected G24-J UART Communication Properties for
Location Session
UART communication properties could be changed by special OSC property oem.uart.config.
Usage
:
OSC.setProperty("oem.uart.config", settings string);
Setting string format
:
"comm:<uart_id>;[baudrate:<baudrate_value>];[databits:<databits_value>];
[stopbits:<stopbits_value>];[parity:<parity_value>];[fc:<fc_value>]"