Getac Handheld Device
Software Development Kit
Getac Handheld Device Software Development Kit
Getac Handheld Device
Software Development Kit
Date: 2013/3/14
Page: 1
Total: 79
Revision History
Title Getac Handheld Device Software Development Kit
Rev Date Page Sec
01 6/22/2010 All All
02 9/29/2010 5
6
03 10/04/2010 55-57 All
04 3/4/2011 All All
05 3/9/2011
06 3/14/2011 6
07 3/16/2011 19-21 All
56 All
57 All
08 05/05/2011 45
09 07/27/2011 65 All
10 09/13/2011 All All
11 09/21/2011 63 All
71 All
12 09/28/2011 58-61 All
68-69 All
13 12/02/2011 10-64 5
14 12/05/2011 76 7.4
15 11/12/2012 All All
16 03/12/2013 68,78 All
17 03/14/2013 6 2
Getac Handheld Device Software Development Kit
Getac Handheld Device Software Development Kit
Sec Description
All Initial release.
Revise PS535F1 to PS535F (WM6.5)
Remove version format 2 related information
All Add FAQ x 3
All Integrate MH132 product
Revise Appendix A for PS535 series API table
Add PS236 Key mapping section
All Add table for listing different product GPS port
All Remove ReplaceDefaultCameraApp()
All Remove Button_SetCameraKey()
Revise the 2nd parameter of GetSerialNumber
All Add Appendix B for demo application quick summary.
All Remove watermark for whole document
All Add FAQ4
All Add Appendix C for Microsoft standard API
All Add new APIs for PS236EXT Flexiconn expension port
All Add new APIs into table
Update R08 SWV018 SDK
7.4 Merge appendix C and FAQ4
All Add PS336 Support description
All Support SetExpansionPOWER/ GetExpansionPOWER For PS336
Modify “WM6.5” to “Windows Embedde
For PS336
Date: 2013/3/14
Page: 2
Total: 79
Getac Handheld Device Software Development Kit
Remove version format 2 related information
Revise Appendix A for PS535 series API table
Add table for listing different product GPS port
Remove ReplaceDefaultCameraApp()
parameter of GetSerialNumber
Add Appendix B for demo application quick summary.
Remove watermark for whole document
Add Appendix C for Microsoft standard API
Add new APIs for PS236EXT Flexiconn expension port
ed Handheld 6.5”
Table of Contents
Revision History ................................................................
Table of Contents ................................
1. Overview ................................................................
2. System Support ................................
Hardware ................................................................
What You Need to Get Started ................................
3. Naming Rule of OS Version Label ................................
3.1 PS236/PS535/MH132 ................................
3.2 PS336 ................................................................
4. Architecture ................................................................
ExternAPI.DLL ................................
GPSID ................................................................
5. Getac APIs Reference ................................
5.1 E-compass/G-sensor API’s ................................
EComAcc_InitDevice ................................
EComAcc_DeinitDevice ................................
EComAcc_GetData ................................
ECompass_GetRawData ................................
GSensor_GetData ................................
GSensor_GetRawData ................................
5.2 Pressure sensor API’s ................................
Pressure_InitDevice ................................
Pressure_DeinitDevice ................................
Pressure_GetPaTemp ................................
5.3 GPS API’s ................................
GPS with GPS Intermediate Driver
GPS without GPS Intermediate Drive
5.4 System Acoustic Control ................................
Speaker_GetVolume ................................
Speaker_SetVolume ................................
Receiver_GetVolume ................................
Receiver_SetVolume ................................
Microphone Gain Control (Only for MH132)
5.5 System LED control ................................
Charging LED Indicator Control
Getac Handheld Device Software Development Kit
Table of Contents
................................................................................................
................................................................................................................................
................................................................................................
................................................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................................................
GPS with GPS Intermediate Driver ................................................................
GPS without GPS Intermediate Driver ................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
Microphone Gain Control (Only for MH132) ................................................................
................................................................................................
ED Indicator Control .............................................................................................
Date: 2013/3/14
Page: 3
Total: 79
....................................... 2
..................................... 3
.............................................. 6
..................................... 6
.......................................... 6
.......................................... 6
........................................ 7
.............................................. 7
...................................... 7
.......................................... 8
................................ 8
.............................................. 8
......................................................... 10
........................................ 10
............................................. 10
......................................... 11
................................................. 12
......................................... 13
................................................... 14
............................................ 15
................................................ 16
................................................ 16
............................................ 17
.............................................. 18
................................. 19
......................................................... 19
.................................................... 21
........................................... 23
................................................ 23
................................................ 24
.............................................. 25
............................................... 26
.......................................... 27
.................................................. 28
............................. 28
Camera Flash LED control ................................
Set_BT_LED_ON ................................
Set_WIFI_LED_ON ................................
Set_3G_LED_ON ................................
Set_GPS_LED_ON ................................
5.6 System Backlight Control ................................
Backlight_GetLevel ................................
Backlight_SetLevel ................................
5.7 Connectivity Component APIs
Phone_OnOff ................................
WLAN_OnOff ................................
Bluetooth_OnOff ................................
FlightMode_OnOff ................................
5.8 System Information APIs ................................
GetSystemUUID ................................
GetDeviceName ................................
GetDeviceSKUID ................................
GetLanguageID ................................
GetOSVersion ................................
GetROMImageVersion ................................
GetROMImageVersionMinor
GetOSImgVersion ................................
GetMicroPVersion ................................
GetPhoneVersion ................................
GetSerialNumber ................................
GetBluetoothMAC ................................
GetWLANMAC ................................
GetMemoryStatus ................................
GetProcessorName ................................
GetIMEI ................................
GetCPUSpeed ................................
SystemReboot ................................
5.9 Personal Information APIs ................................
GetOwnerName ................................
GetOwnerCompany................................
GetOwnerAddress ................................
GetOwnerTelephone ................................
GetOwnerEMail ................................
Getac Handheld Device Software Development Kit
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
ty Component APIs ................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
GetROMImageVersionMinor ................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
Date: 2013/3/14
Page: 4
Total: 79
...................................... 29
................................................... 31
............................................... 32
................................................... 33
................................................. 33
......................................... 34
................................................ 34
................................................. 35
.................................. 36
.......................................................... 36
........................................................ 37
.................................................... 38
................................................. 39
.......................................... 40
..................................................... 40
...................................................... 41
................................................... 42
....................................................... 43
......................................................... 44
............................................ 45
.................................. 46
................................................... 47
................................................... 48
..................................................... 49
.................................................... 50
.................................................. 51
...................................................... 52
................................................... 53
.................................................. 54
.................................. 55
......................................................... 56
......................................................... 57
........................................ 58
...................................................... 58
................................................. 59
................................................... 60
............................................... 61
...................................................... 62
5.10 MISC APIs ................................
Button_SetFNKeyStatus................................
Button_GetFNKeyStatus ................................
SetExpansionUART ................................
GetExpansionUART ................................
SetExpansionPOWER ................................
GetExpansionPOWER ................................
IsUsingAABattery ................................
6. How to Remap Keypad Definition ................................
6.1 Concept ................................
6.2 Pseudo-Code ................................
6.3 Example ................................................................
6.4 Camera Key (PS236/PS236 EXT/PS336 series)
7. Frequently Asked Questions ................................
7.1 How can I run an application from SD card automatically?
7.2 How can I rotate the system screen thru my application?
7.3 How can I pack my applications and settings for multiple units’ deployment?
7.4 How can I keep the unit awake if specific application running?
Appendix A : API List For Each Product
Appendix B : Sample Application Summary
B.1 SystemInfo ................................
B.2 CameraCapture ................................
B.3 Level Gauge ................................
B.4 GPS Sample Application ................................
B.5 MenuChange ................................
B.6 SensorsDemo ................................
Getac Handheld Device Software Development Kit
..............................................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................
................................................................................................................................
.............................................................................................................................
................................................................................................
6.4 Camera Key (PS236/PS236 EXT/PS336 series) ................................................................
................................................................................................
1 How can I run an application from SD card automatically? ................................
7.2 How can I rotate the system screen thru my application? ...........................................................
7.3 How can I pack my applications and settings for multiple units’ deployment? ...........................
7.4 How can I keep the unit awake if specific application running? ................................
Appendix A : API List For Each Product ................................................................................................
Appendix B : Sample Application Summary ...........................................................................................
...............................................................................................................................
................................................................................................
.............................................................................................................................
................................................................................................
............................................................................................................................
...........................................................................................................................
Date: 2013/3/14
Page: 5
Total: 79
.............................. 63
.......................................... 63
......................................... 64
................................................ 65
............................................... 66
............................................. 67
............................................ 68
................................................... 69
...................................... 70
.................................. 70
............................. 70
.................................... 70
........................................ 71
............................................... 73
....................................................... 73
........................... 74
........................... 75
................................................. 76
................................. 77
........................... 79
............................... 79
......................................................... 79
............................. 79
.......................................... 79
............................ 79
........................... 79
1. Overview
This document describes the architecture and functionalities of the
(Software Development Kit). The SDK will pro
Pressure sensor, GPS data and system related information.
2. System Support
Hardware
This SDK supports the following Getac Handheld devices
• Getac PS236
• Getac PS236 EXT (Flexiconn port implementation)
• Getac PS535F/PS535F (Windows
• Getac PS535E
• Getac MH132 (Windows Mobile
• Getac PS336 (Windows Embed
What You Need to Get Started
Since Getac Handheld Device is using Microsoft Windows Mobile Operating System, please m
the following software is installed on your development environment.
• Microsoft Visual Studio 2005/2008 or even higher
• Microsoft ActiveSync 4.5 (for XP) or Windows Mobile Device Center (for Vista/Win7)
• Related Platform SDKs which provided by Micros
application.
Getac Handheld Device
Getac PS535E
Getac PS535F
Getac PS535F (WM6.5)
Getac PS236 W/O 3G
Getac PS236 W/ 3G
Getac Handheld Device Software Development Kit
This document describes the architecture and functionalities of the Getac Handheld Device
The SDK will provide the API set to access/control E-compass, G
Pressure sensor, GPS data and system related information.
Getac Handheld devices:
Getac PS236 EXT (Flexiconn port implementation)
indows Mobile 6.5)
obile 6.5)
dded Handheld 6.5)
Since Getac Handheld Device is using Microsoft Windows Mobile Operating System, please m
the following software is installed on your development environment.
Microsoft Visual Studio 2005/2008 or even higher
Microsoft ActiveSync 4.5 (for XP) or Windows Mobile Device Center (for Vista/Win7)
Related Platform SDKs which provided by Microsoft to support you to develop specific
Required SDK
Developing Environment
Microsoft Windows Mobile
5.0 SDK for Pocket PC
Visual Studio 2005/2008
Microsoft Windows Mobile
6.0 Professional SDK
Visual Studio 2005/2008
Microsoft Windows Mobile
6.5 DTK
Visual Studio 2005/2008
Microsoft Windows Mobile
6.0 Professional SDK
Visual Studio 2005/2008
Microsoft Windows Mobile
6.0 Professional SDK
Visual Studio 2005/2008
Date: 2013/3/14
Page: 6
Total: 79
Getac Handheld Device SDK
compass, G-sensor,
Since Getac Handheld Device is using Microsoft Windows Mobile Operating System, please make sure
Microsoft ActiveSync 4.5 (for XP) or Windows Mobile Device Center (for Vista/Win7)
oft to support you to develop specific
Developing Environment
Visual Studio 2005/2008
Visual Studio 2005/2008
Visual Studio 2005/2008
Visual Studio 2005/2008
Visual Studio 2005/2008
Getac PS236 EXT W/O 3G
Getac PS236 EXT W/3G
Getac MH132 (WM 6.5)
Getac PS336 (WEH6.5)
3. Naming Rule of OS Version Label
3.1 PS236/PS535/MH132
The version number of Getac Handheld Produ
is 1.XXX.LLL.
XXX: Means Getac OS image version record
LLL: Means language abbreviation
3.2 PS336
The version number of Getac Handheld Produ
is 1.XXX.YYY.LLL.
XXX: SKU No.
YYY: Means Getac OS image version record
LLL: Means language abbreviation
No. Language Description 1 World Wide English 2 Traditional Chinese 3 Simplified Chinese 4 German 5 Spanish
6 Italian 7 Japanese 8 French
Getac Handheld Device Software Development Kit
Microsoft Windows Mobile
6.0 Professional SDK
Visual Studio 2005/2008
Microsoft Windows Mobile
6.0 Professional SDK
Visual Studio 2005/2008
Microsoft Windows Mobile
6.5 DTK
Visual Studio 2005/2008
Microsoft Windows Mobile
6.5 DTK
Visual Studio 2005/2008
3. Naming Rule of OS Version Label
The version number of Getac Handheld Product has general naming rule. The format of section
XXX: Means Getac OS image version record
The version number of Getac Handheld Product has general naming rule. The format of section
Means Getac OS image version record
Language CodeENG/EN CHT/TC CHS/SC GER/GE ESP/ES
ITA/IT JPN/JP FRA/FR
Date: 2013/3/14
Page: 7
Total: 79
Visual Studio 2005/2008
Visual Studio 2005/2008
Visual Studio 2005/2008
Visual Studio 2005/2008
The format of section
The format of section
Language Code
4. Architecture
ExternAPI.DLL
This DLL will be shipped as part of the ROM image on
support all functions referenced by this document.
defined within the DLL. The intention of this DLL is to allow other applications to query and set
characteristics for the Getac PS236/PS336/PS535
GPSID
The GPS Intermediate Driver that proposed by Microsoft is usefu
that use GPS (Global Positioning System) devices as well as to GPS hardware manufacturers. It is useful
because it provides an intermediate layer that abstracts the actual GPS device from developers and
manufacturers.
- GPS Without the GPS Intermediate Driver
Without the GPS Intermediate Driver, applications generally access GPS hardware directly through a
Getac Handheld Device Software Development Kit
This DLL will be shipped as part of the ROM image on Getac PS236/PS336/PS535 and it
support all functions referenced by this document. The header file will be published to
The intention of this DLL is to allow other applications to query and set
/PS336/PS535 hardware and software.
The GPS Intermediate Driver that proposed by Microsoft is useful to developers writing applications
that use GPS (Global Positioning System) devices as well as to GPS hardware manufacturers. It is useful
because it provides an intermediate layer that abstracts the actual GPS device from developers and
GPS Without the GPS Intermediate Driver
Without the GPS Intermediate Driver, applications generally access GPS hardware directly through a
Date: 2013/3/14
Page: 8
Total: 79
and it will have to
The header file will be published to expose all APIs
The intention of this DLL is to allow other applications to query and set
l to developers writing applications
that use GPS (Global Positioning System) devices as well as to GPS hardware manufacturers. It is useful
because it provides an intermediate layer that abstracts the actual GPS device from developers and
Without the GPS Intermediate Driver, applications generally access GPS hardware directly through a
COM port.
Applications interact directly with the GPS hardware by calling
device. With most GPS devices, this connection is exclusive, so onl
interact with the GPS hardware.
Applications then call ReadFile repeatedly to retrieve GPS location data encoded using the National
Marine Electronics Association (NMEA) standard or GPS raw data.
- Benefits of the GPS Intermediate Driver
With the GPS Intermediate Driver, applications u
interacting with the GPS hardware directly. The GPS Intermediate Driver is the only code that
interacts directly with GPS hardware.
The GPS Intermediate Driver provides two main advantages:
• Enable multiple applications to use GPS hardware at the same time. The GPS Intermediate
Driver makes it appear that each application has its own dedicated GPS hardware.
• Remove the need for applications to parse NMEA strings to obtain meaningful data. The GPS
Intermediate Driver internally parses the NMEA strings obtained from the GPS hardware and
makes the parsed information available through a friendly API that contains structures like
GPS_POSITION and calls like
backward-compatible stream/ReadFile
applications to use the GPS Intermediate Driv
For more detail information, please refer to the MSDN documentation.
Getac Handheld Device Software Development Kit
Applications interact directly with the GPS hardware by calling CreateFile to obtain a handle to the
device. With most GPS devices, this connection is exclusive, so only one application at a time can
repeatedly to retrieve GPS location data encoded using the National
Marine Electronics Association (NMEA) standard or GPS raw data.
Benefits of the GPS Intermediate Driver
With the GPS Intermediate Driver, applications use the GPS Intermediate Driver instead of
interacting with the GPS hardware directly. The GPS Intermediate Driver is the only code that
interacts directly with GPS hardware.
The GPS Intermediate Driver provides two main advantages:
applications to use GPS hardware at the same time. The GPS Intermediate
Driver makes it appear that each application has its own dedicated GPS hardware.
Remove the need for applications to parse NMEA strings to obtain meaningful data. The GPS
Driver internally parses the NMEA strings obtained from the GPS hardware and
makes the parsed information available through a friendly API that contains structures like
and calls like GPSGetLocation. Applications can also use a
ReadFile interface. This ability provides an easy way for existing
applications to use the GPS Intermediate Driver without requiring modification.
For more detail information, please refer to the MSDN documentation.
Date: 2013/3/14
Page: 9
Total: 79
to obtain a handle to the
y one application at a time can
repeatedly to retrieve GPS location data encoded using the National
se the GPS Intermediate Driver instead of
interacting with the GPS hardware directly. The GPS Intermediate Driver is the only code that
applications to use GPS hardware at the same time. The GPS Intermediate
Driver makes it appear that each application has its own dedicated GPS hardware.
Remove the need for applications to parse NMEA strings to obtain meaningful data. The GPS
Driver internally parses the NMEA strings obtained from the GPS hardware and
makes the parsed information available through a friendly API that contains structures like
interface. This ability provides an easy way for existing
er without requiring modification.
5. Getac APIs Reference
5.1 E-compass/G-sensor API’s
EComAcc_InitDevice
Syntax
INT16 EComAcc_InitDevice(void)
Description
This function will initialize E
handling. It has to be called prior to get the data.
Parameters
None
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
INT16 EComAcc_InitDevice(void)
initialize E-compass/G-sensor hardware and related software memory
handling. It has to be called prior to get the data.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 10
Total: 79
hardware and related software memory
EComAcc_DeinitDevice
Syntax
INT16 EcomAcc_DeinitDevice(void)
Description
This function will de-initialize E
handling. It has to be called after finishing data query procedure. Otherwise, it might have memory
leakage or handle leakage problem.
Parameters
None
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
EcomAcc_DeinitDevice(void)
initialize E-compass/G-sensor hardware and related software memory
handling. It has to be called after finishing data query procedure. Otherwise, it might have memory
problem.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 11
Total: 79
sensor hardware and related software memory
handling. It has to be called after finishing data query procedure. Otherwise, it might have memory
EComAcc_GetData
Syntax
BOOL EComAcc_GetData(int data[])
Description
This function will used to get E
status.
Parameters
� data
[out] Pointer to an array that receives the output data for the operation.
data[0] � Theta
data[1] � Pitch
data[2] � Roll angle
data[3] � HDST, 0 and 1 means calibration is NOT completed
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL EComAcc_GetData(int data[])
This function will used to get E-compass/G-sensor Theta, Pitch, Roll angle data, and HDST
[out] Pointer to an array that receives the output data for the operation.
Roll angle
HDST, 0 and 1 means calibration is NOT completed
2 and 3 means calibration is completed
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 12
Total: 79
Pitch, Roll angle data, and HDST
ECompass_GetRawData
Syntax
BOOL ECompass_GetRawData(int data[],eDataType eType)
Description
This function will used to get E
Parameters
� eType
[in] Data type� MEASUREMENT_RAW_DATA
� data
[out] Pointer to an array that receives the output data for the operation.
data[0] � Theta
data[1] � Pitch
data[2] � Roll angle
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL ECompass_GetRawData(int data[],eDataType eType)
This function will used to get E-compass raw Theta, Pitch and Roll angle data
MEASUREMENT_RAW_DATA
[out] Pointer to an array that receives the output data for the operation.
Roll angle
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 13
Total: 79
oll angle data.
GSensor_GetData
Syntax
BOOL GSensor_GetData(int data[])
Description
This function will used to get G
Parameters
� data
[out] Pointer to an array that receives the output data for the operation.
data[0] � Reserved, set 0
data[1] � Pitch
data[2] � Roll angle
data[3] � Reserved, set 0
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
_GetData(int data[])
used to get G-sensor Pitch and Roll angle data.
Pointer to an array that receives the output data for the operation.
Reserved, set 0
Roll angle
Reserved, set 0
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 14
Total: 79
GSensor_GetRawData
Syntax
BOOL GSensor_GetRawData
Description
This function will used to get G
Parameters
� data
[out] Pointer to an array that receives the output data for the operation.
data[0] � Theta
data[1] � Pitch
data[2] � Roll angle
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
GSensor_GetRawData (int data[])
used to get G-sensor Pitch and Roll angle data.
[out] Pointer to an array that receives the output data for the operation.
Roll angle
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 15
Total: 79
5.2 Pressure sensor API’s
Pressure_InitDevice
Syntax
BOOL Pressure_InitDevice(void)
Description
This function will initialize Pressure sensor hardware and related software memory handling.
It has to be called prior to get the data.
Parameters
None
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL Pressure_InitDevice(void)
Pressure sensor hardware and related software memory handling.
It has to be called prior to get the data.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 16
Total: 79
Pressure sensor hardware and related software memory handling.
Pressure_DeinitDevice
Syntax
BOOL Pressure_DeinitDevice(void)
Description
This function will de-initialize Pressure sensor hardware and related software memory
handling. It has to be called after finishing data query procedure. Otherwise, it might have memory
leakage or handle leakage problem.
Parameters
None
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL Pressure_DeinitDevice(void)
initialize Pressure sensor hardware and related software memory
handling. It has to be called after finishing data query procedure. Otherwise, it might have memory
e problem.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 17
Total: 79
initialize Pressure sensor hardware and related software memory
handling. It has to be called after finishing data query procedure. Otherwise, it might have memory
Pressure_GetPaTemp
Syntax
BOOL Pressure_GetPaTemp(
Description
This function will used to get Pressure sensor
Parameters
� data
[out] Pointer to an array that receives the output data for the operation.
data[0] � PA raw data
data[1] � Temperature raw data
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL Pressure_GetPaTemp(float data[])
This function will used to get Pressure sensor PA and Temperature raw data.
[out] Pointer to an array that receives the output data for the operation.
PA raw data
Temperature raw data
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 18
Total: 79
5.3 GPS API’s
GPS with GPS Intermediate Driver
CreateFile
Syntax
HANDLE CreateFile( LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile)
Description
This API is provided by Microsoft which is used for
It returns a handle to access the device
Parameters
lpFileName
[in] Pointer to a null
be set as GPD1 for GPS usage
Note: The table list as below describes the different setting during Getac Products.
Model
PS535E/F
PS236
MH132
PS336
dwDesiredAccess
[in] Type of access to the object. It has to be
GENERIC_WRITE)
dwShareMode
[in] Share mode for the object. It has to be
WRITE) for GPS usage.
Getac Handheld Device Software Development Kit
GPS with GPS Intermediate Driver
HANDLE CreateFile( LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile)
This API is provided by Microsoft which is used for opening a GPS device po
ns a handle to access the device.
[in] Pointer to a null-terminated string that specifies the name of the object. It has to
for GPS usage
The table list as below describes the different setting during Getac Products.
GPS Intermediate Driver
GPD1:
GPD1:
N/A
GPD1:
Type of access to the object. It has to be (GENERIC_READ |
GENERIC_WRITE) for GPS usage.
Share mode for the object. It has to be (FILE_SHARE_READ | FILE_SHARE_
for GPS usage.
Date: 2013/3/14
Page: 19
Total: 79
GPS device port.
terminated string that specifies the name of the object. It has to
The table list as below describes the different setting during Getac Products.
(FILE_SHARE_READ | FILE_SHARE_
lpSecurityAttributes
[in] Not used. It has to be set as
dwCreationDisposition
[in] Action to take on files that exist, and which action to take when files do not exist. It
has to be OPEN_EXISTING
dwFlagsAndAttributes
[in] File attributes and flags for the file. It has to be
GPS usage.
hTemplateFile
[in] Ignored. It has to be set as
Return value
An openned handle to the specified file indicates success
function call and dwCreationDisposition is set to CREATE_ALWAYS or OPEN_ALWAYS, a
call to GetLastError returns ERROR_ALREADY_EXISTS, even though the function has
succeeded. If the file does not exist before the call,
INVALID_HANDLE_VALUE indicates failure. To get extended error information, call
GetLastError.
Example Sample Code
Getac Handheld Device Software Development Kit
Not used. It has to be set as NULL for GPS usage.
Action to take on files that exist, and which action to take when files do not exist. It
OPEN_EXISTING for GPS usage.
File attributes and flags for the file. It has to be FILE_ATTRIBUTE_NORMAL
Ignored. It has to be set as NULL for GPS usage.
handle to the specified file indicates success. If the specified file exists before the
function call and dwCreationDisposition is set to CREATE_ALWAYS or OPEN_ALWAYS, a
returns ERROR_ALREADY_EXISTS, even though the function has
succeeded. If the file does not exist before the call, GetLastError returns zero.
INVALID_HANDLE_VALUE indicates failure. To get extended error information, call
Date: 2013/3/14
Page: 20
Total: 79
Action to take on files that exist, and which action to take when files do not exist. It
FILE_ATTRIBUTE_NORMAL for
. If the specified file exists before the
function call and dwCreationDisposition is set to CREATE_ALWAYS or OPEN_ALWAYS, a
returns ERROR_ALREADY_EXISTS, even though the function has
returns zero.
INVALID_HANDLE_VALUE indicates failure. To get extended error information, call
GPS without GPS Intermediate Driver
CreateFile
Syntax
HANDLE CreateFile( LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile)
Description
This API is provided by Microsoft which is used for
It returns a handle to access the device
Parameters
lpFileName
[in] Pointer to a null
Note: The table list as below
Model
PS535E/F
PS236
MH132
PS336
dwDesiredAccess
[in] Type of access to the object. It has to be
GENERIC_WRITE)
dwShareMode
[in] Share mode for the object. It has to be
WRITE) for GPS usage.
lpSecurityAttributes
[in] Not used. It has to be set as
dwCreationDisposition
[in] Action to take on files that exist, and which action t
Getac Handheld Device Software Development Kit
GPS without GPS Intermediate Driver
HANDLE CreateFile( LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile)
This API is provided by Microsoft which is used for opening a GPS device po
ns a handle to access the device.
[in] Pointer to a null-terminated string that specifies the name of the objec
The table list as below describes the different setting during Getac Products.
Direct Access
COM2:
COM4:
COM7:
COM4:
Type of access to the object. It has to be (GENERIC_READ |
GENERIC_WRITE) for GPS usage.
Share mode for the object. It has to be (FILE_SHARE_READ | FILE_SHARE_
for GPS usage.
Not used. It has to be set as NULL for GPS usage.
Action to take on files that exist, and which action to take when files do not exist.
Date: 2013/3/14
Page: 21
Total: 79
GPS device port.
terminated string that specifies the name of the object
describes the different setting during Getac Products.
(FILE_SHARE_READ | FILE_SHARE_
o take when files do not exist.
It has to be OPEN_EXISTING
dwFlagsAndAttributes
[in] File attributes and flags for the file. It has to be
for GPS usage.
hTemplateFile
[in] Ignored. It has to be set as
Return value
An openned handle to the specified file indicates success. If the specified file exists before the
function call and dwCreationDisposition is set to CREATE_ALWAYS or OPEN_ALWAYS, a
call to GetLastError returns ERROR_ALREADY_EXISTS, even though the function has
succeeded. If the file does not exist before the call,
INVALID_HANDLE_VALUE indicates failure. To get extended error information, call
GetLastError.
Example Sample Code
Getac Handheld Device Software Development Kit
OPEN_EXISTING for GPS usage.
File attributes and flags for the file. It has to be FILE_ATTRIBUTE_NORMAL
Ignored. It has to be set as NULL for GPS usage.
handle to the specified file indicates success. If the specified file exists before the
function call and dwCreationDisposition is set to CREATE_ALWAYS or OPEN_ALWAYS, a
returns ERROR_ALREADY_EXISTS, even though the function has
not exist before the call, GetLastError returns zero.
INVALID_HANDLE_VALUE indicates failure. To get extended error information, call
Date: 2013/3/14
Page: 22
Total: 79
FILE_ATTRIBUTE_NORMAL
handle to the specified file indicates success. If the specified file exists before the
function call and dwCreationDisposition is set to CREATE_ALWAYS or OPEN_ALWAYS, a
returns ERROR_ALREADY_EXISTS, even though the function has
returns zero.
INVALID_HANDLE_VALUE indicates failure. To get extended error information, call
5.4 System Acoustic Control
Speaker_GetVolume
Syntax
BOOL Speaker_GetVolume(DWORD*
Description
This function will used to get
Parameters
� pdwLevel
[out] Pointer that receives the
volume level will be 0 to 5.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
Volume(DWORD* pdwLevel)
This function will used to get the volume level of system speaker.
that receives the current volume level of system speaker. The range of
volume level will be 0 to 5.
success. FALSE indicates failure
Date: 2013/3/14
Page: 23
Total: 79
The range of
Speaker_SetVolume
Syntax
BOOL Speaker_SetVolume(DWORD
Description
This function will used to set
Parameters
� dwLevel
[in] DWORD parameter contains the
speaker mute.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
Volume(DWORD dwLevel)
set the volume level of system speaker.
DWORD parameter contains the speaker level value from 0 to 5. 0 means system
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 24
Total: 79
speaker level value from 0 to 5. 0 means system
Receiver_GetVolume
Syntax
BOOL Receiver_GetVolume(DWORD*
Description
This function will used to get
Parameters
� pdwLevel
[out] Pointer that receives the
volume level will be 0 to 5.
Remark
This API is supported in Phone SKU (ID =
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
Volume(DWORD* pdwLevel)
This function will used to get the volume level of system receiver.
that receives the current volume level of system receiver. The range of
volume level will be 0 to 5.
This API is supported in Phone SKU (ID = 50) only.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 25
Total: 79
The range of
Receiver_SetVolume
Syntax
BOOL Receiver_SetVolume(DWORD
Description
This function will used to set
Parameters
� dwLevel
[in] DWORD parameter contains the receiver level value from 0 to 5. 0 means system
receiver mute.
Remark
This API is supported in Phone SKU (ID = 50) only.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
Volume(DWORD dwLevel)
set the volume level of system receiver.
DWORD parameter contains the receiver level value from 0 to 5. 0 means system
This API is supported in Phone SKU (ID = 50) only.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 26
Total: 79
DWORD parameter contains the receiver level value from 0 to 5. 0 means system
Microphone Gain Control (Only for MH132)
Description
The settings for system microphone gain control
[HKEY_LOCAL_MACHINE
"VOL"=dword:B
"VolumeSliderIndex"=dword:5
Range of VOL is 0x00~0x1F(
Users can define their own "VolumeSliderIndex" for applet UI.
Note: For Getac MH132H, range of VOL is 0x00 ~ 0x18(
Example Sample Code
Change registry and send an event can make the setting working.
#define MIC_OEM_REGISTRY_PATH L"Software
#define MIC_OEM_VOLUME_REGSKEY L"VOL"
#define MIC_OEM_VOLUME_SLIDER_INX_REGSKEY L"VolumeSliderIndex"
static DWORD dwMicVolume;
static DWORD dwSliderMicVolumeIndex;
HANDLE ghevNotCameraMode = NULL;
ghevNotCameraMode = OpenEvent(EVENT_ALL_ACCESS, FALSE, L"SYSTEM/NotCameraMode");
dwMicVolume = 0x01;
dwSliderMicVolumeIndex = 0x00;
WriteToRegistry(MIC_OEM_REGISTRY_PATH, MIC_OEM_VOLUME_REGSKEY, dwMicVolume);
WriteToRegistry(MIC_OEM_REGISTRY_PATH, MIC_OEM_VOLUM
dwSliderMicVolumeIndex);
SetEvent(ghevNotCameraMode);
Getac Handheld Device Software Development Kit
(Only for MH132)
The settings for system microphone gain control
[HKEY_LOCAL_MACHINE\Software\APP\MTC\MICVOL]
"VolumeSliderIndex"=dword:5
Range of VOL is 0x00~0x1F(-16.5dB~+30dB, 1.5dB per step).
Users can define their own "VolumeSliderIndex" for applet UI.
Note: For Getac MH132H, range of VOL is 0x00 ~ 0x18(-12dB ~ 12dB, 1 dB per step).
Change registry and send an event can make the setting working.
MIC_OEM_REGISTRY_PATH L"Software\\APP\\MTC\\MICVOL"
#define MIC_OEM_VOLUME_REGSKEY L"VOL"
#define MIC_OEM_VOLUME_SLIDER_INX_REGSKEY L"VolumeSliderIndex"
static DWORD dwSliderMicVolumeIndex;
HANDLE ghevNotCameraMode = NULL;
tCameraMode = OpenEvent(EVENT_ALL_ACCESS, FALSE, L"SYSTEM/NotCameraMode");
dwSliderMicVolumeIndex = 0x00;
WriteToRegistry(MIC_OEM_REGISTRY_PATH, MIC_OEM_VOLUME_REGSKEY, dwMicVolume);
WriteToRegistry(MIC_OEM_REGISTRY_PATH, MIC_OEM_VOLUME_SLIDER_INX_REGSKEY,
Date: 2013/3/14
Page: 27
Total: 79
12dB ~ 12dB, 1 dB per step).
tCameraMode = OpenEvent(EVENT_ALL_ACCESS, FALSE, L"SYSTEM/NotCameraMode");
WriteToRegistry(MIC_OEM_REGISTRY_PATH, MIC_OEM_VOLUME_REGSKEY, dwMicVolume);
E_SLIDER_INX_REGSKEY,
5.5 System LED control
Charging LED Indicator Control
Syntax
BOOL WINAPI NLedSetDevice(
Description
This function allows user to control
The ID number of Charging LED Indicator is 0.
Parameters
� nDeviceId
[in] Integer that specifies what information to set. You can set it to
NLED_SETTINGS_INFO_ID to indicate that the pInput buffer contains
about the current settings for the notification LED.
� pInput
[in] Pointer to the buffer that contains the
structure contains the new settings for the notification LED.
Example Sample Code
NLED_SETTINGS_INFO *pNLED;
// Turn the charging LED On
pNLED->LedNum = 0;
pNLED->OffOnBlink = 1;
NLedSetDevice(NLED_SETTINGS_INFO_ID, pNLED);
// Turn the charging LED Off
pNLED->OffOnBlink = 0;
NLedSetDevice(NLED_SETTINGS_INFO_ID, pNLED);
// Blink the charging LED
pNLED->OffOnBlink = 2;
NLedSetDevice(NLED_SETTINGS_INFO_ID, pNLED);
Getac Handheld Device Software Development Kit
Charging LED Indicator Control
BOOL WINAPI NLedSetDevice( UINT nDeviceId,
void* pInput);
This function allows user to control Charging LED for On, Off or Blinking.
The ID number of Charging LED Indicator is 0.
[in] Integer that specifies what information to set. You can set it to
NLED_SETTINGS_INFO_ID to indicate that the pInput buffer contains
about the current settings for the notification LED.
[in] Pointer to the buffer that contains the NLED_SETTINGS_INFO structure. This
structure contains the new settings for the notification LED.
*pNLED;
NLedSetDevice(NLED_SETTINGS_INFO_ID, pNLED);
NLedSetDevice(NLED_SETTINGS_INFO_ID, pNLED);
NLedSetDevice(NLED_SETTINGS_INFO_ID, pNLED);
Date: 2013/3/14
Page: 28
Total: 79
NLED_SETTINGS_INFO_ID to indicate that the pInput buffer contains information
structure. This
Camera Flash LED control
Syntax
BOOL WINAPI NLedSetDevice(
Description
This function allows user to control
Camera Flash LED does not support Blinking feature.
The ID number of Camera Flash LED is 1.
The ID number of Camera Flash LED is
Parameters
� nDeviceId
[in] Integer that specifies what information to set. You can set it to
NLED_SETTINGS_INFO_ID to indicate that the pInput buffer contains information
about the current settings for the notification LED.
� pInput
[in] Pointer to the buffer that contains the
structure contains the new settings for the notification LED.
Example Sample Code
NLED_SETTINGS_INFO *pNLED;
// Turn the Camera Flash LED On
pNLED->LedNum = 1;
pNLED->OffOnBlink = 1;
NLedSetDevice(NLED_SETTINGS_INFO_ID, pNLED);
// Turn the Camera Flash LED Off
pNLED->OffOnBlink = 0;
NLedSetDevice(NLED_SETTINGS_INFO_ID, pNLED);
Getac Handheld Device Software Development Kit
BOOL WINAPI NLedSetDevice( UINT nDeviceId,
void* pInput);
This function allows user to control Camera Flash LED in the back side for On
Camera Flash LED does not support Blinking feature.
The ID number of Camera Flash LED is 1.
The ID number of Camera Flash LED is 4 For PS336.
[in] Integer that specifies what information to set. You can set it to
NLED_SETTINGS_INFO_ID to indicate that the pInput buffer contains information
about the current settings for the notification LED.
[in] Pointer to the buffer that contains the NLED_SETTINGS_INFO structure. This
tains the new settings for the notification LED.
pNLED;
NLedSetDevice(NLED_SETTINGS_INFO_ID, pNLED);
// Turn the Camera Flash LED Off
NLedSetDevice(NLED_SETTINGS_INFO_ID, pNLED);
Date: 2013/3/14
Page: 29
Total: 79
for On and Off only.
NLED_SETTINGS_INFO_ID to indicate that the pInput buffer contains information
structure. This
Note : For Getac MH132H, the definition of
And pInput contains the NLED_SETTINTS_INFO structure, where
pInput->LedNum 0 : Red LED
1 : Green LED
2 : White LED
Getac Handheld Device Software Development Kit
, the definition of nDeviceId shall be NLED_SETTINGS_INFO_ID
contains the NLED_SETTINTS_INFO structure, where:
1 : Green LED
2 : White LED
Date: 2013/3/14
Page: 30
Total: 79
NLED_SETTINGS_INFO_ID.
Set_BT_LED_ON
Syntax
BOOL Set_BT_LED_ON(BOOL OnOff)
Description
This function will used to set
Parameters
� OnOff
[in] Set LED on/off.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL Set_BT_LED_ON(BOOL OnOff)
et the bluetooth LED indicator on/off.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 31
Total: 79
Set_WIFI_LED_ON
Syntax
BOOL Set_WIFI_LED_ON(BOOL OnOff)
Description
This function will used to set
Parameters
� OnOff
[in] Set LED on/off.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL Set_WIFI_LED_ON(BOOL OnOff)
et the WiFi LED indicator on/off.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 32
Total: 79
Set_3G_LED_ON
Syntax
BOOL Set_3G_LED_ON(BOOL OnOff)
Description
This function will used to set
Parameters
� OnOff
[in] Set LED on/off.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Set_GPS_LED_ON
Syntax
BOOL Set_GPS_LED_ON(BOOL OnOff)
Description
This function will used to set
Parameters
� OnOff
[in] Set LED on/off.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL Set_3G_LED_ON(BOOL OnOff)
et the 3G LED indicator on/off.
TRUE indicates success. FALSE indicates failure
_LED_ON(BOOL OnOff)
et the GPS LED indicator on/off.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 33
Total: 79
5.6 System Backlight Control
Backlight_GetLevel
Syntax
BOOL Backlight_GetLevel(DWORD*
Description
This function will used to get
Parameters
� pdwLevel
[out] Pointer that receives the
level will be 0 to 9. Zero means turn off backlight.
Note: For Getac MH132, pdwLevel will be 0 to 10. Return False if out of this range.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
Level(DWORD* pdwLevel)
This function will used to get the brightness level of backlight.
that receives the current brightness level of system receiver
level will be 0 to 9. Zero means turn off backlight.
Note: For Getac MH132, pdwLevel will be 0 to 10. Return False if out of this range.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 34
Total: 79
current brightness level of system receiver. The range of
Note: For Getac MH132, pdwLevel will be 0 to 10. Return False if out of this range.
Backlight_SetLevel
Syntax
BOOL Backlight_SetLevel(DWORD
Description
This function will used to set
Parameters
� dwLevel
[in] DWORD that contains
will be 0 to 9. Zero means turn off backlight.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
SetLevel(DWORD dwLevel)
set the brightness level of backlight.
contains the brightness level for backlight control. The range of level
ll be 0 to 9. Zero means turn off backlight.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 35
Total: 79
The range of level
5.7 Connectivity Component APIs
Phone_OnOff
Syntax
BOOL Phone_OnOff(BOOL
Description
This function will be used to
Parameters
� bPowerOn
[in] Boolean that controls
FALSE will turn off the Phone module.
Remark
This API is supported in Phone SKU (ID = 50)
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
5.7 Connectivity Component APIs
Phone_OnOff(BOOL bPowerOn)
used to turn On/Off the power of the phone module.
controls the power state of the Phone module. TRUE will turn on and
FALSE will turn off the Phone module.
This API is supported in Phone SKU (ID = 50) only.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 36
Total: 79
TRUE will turn on and
WLAN_OnOff
Syntax
BOOL WLAN_OnOff(BOOL
Description
This function will be used to
Parameters
� bPowerOn
[in] Boolean that controls
FALSE will turn off the WLAN module.
Remark
This API is supported in WLAN module integrated product
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
WLAN_OnOff(BOOL bPowerOn)
used to turn On/Off the power of the WLAN module.
controls the power state of the WLAN module. TRUE will turn on and
FALSE will turn off the WLAN module.
WLAN module integrated product only.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 37
Total: 79
TRUE will turn on and
Bluetooth_OnOff
Syntax
BOOL Bluetooth_OnOff(BOOL
Description
This function will be used to
Parameters
� bPowerOn
[in] Boolean value that controls
on and FALSE will turn off the Bluetooth module.
Remark
This API is supported in Bluetooth
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
Bluetooth_OnOff(BOOL bPowerOn)
used to turn On/Off the power of the Bluetooth module
controls the power state of the Bluetooth module
on and FALSE will turn off the Bluetooth module.
Bluetooth module integrated product only.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 38
Total: 79
turn On/Off the power of the Bluetooth module.
Bluetooth module. TRUE will turn
FlightMode_OnOff
Syntax
BOOL FlightMode_OnOff(BOOL
Description
This function will be used to
the aviation regulatory and back on according to the previous status.
Parameters
� bModeOn
[in] Boolean value that controls
Phone, WLAN, Bluetooth & GPS modules
and turn the power off. FALSE will turn back on the power of RF components accord
to the previous state.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
FlightMode_OnOff(BOOL bModeOn)
used to enter/exit Flight mode. It will turn off all RF components to meet
the aviation regulatory and back on according to the previous status.
controls the power state of all RF components which contain
Phone, WLAN, Bluetooth & GPS modules. TRUE will force system to enter Flight mode
and turn the power off. FALSE will turn back on the power of RF components accord
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 39
Total: 79
enter/exit Flight mode. It will turn off all RF components to meet
power state of all RF components which contain
TRUE will force system to enter Flight mode
and turn the power off. FALSE will turn back on the power of RF components according
5.8 System Information APIs
GetSystemUUID
Syntax
BOOL GetSystemUUID(BYTE* lpUUID, DWORD dwSize)
BOOL GetSystemUUID(BYTE* lpUUID)
Description
This function will be used to
value used to identify objects
Parameters
� lpUUID
[out] The pointer to an UUID value must alloc
� dwSize
[in] The buffer size of lpUUID, must bigger than 16
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetSystemUUID(BYTE* lpUUID, DWORD dwSize)
BOOL GetSystemUUID(BYTE* lpUUID) for MH132
used to receive the UUID of this device. UUID, is a unique, 128
value used to identify objects. User must allocate enough memory for 16 bytes at least.
The pointer to an UUID value must allocated 16 bytes at least.
buffer size of lpUUID, must bigger than 16. MH132 doesn’t have this parameter.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 40
Total: 79
UUID, is a unique, 128-bit
. User must allocate enough memory for 16 bytes at least.
MH132 doesn’t have this parameter.
GetDeviceName
Syntax
BOOL GetDeviceName(TCHAR*
BOOL GetDeviceName(TCHAR* lpszName)
Description
This function will get the product name of this device. User must allocate enough memory for
20 characters wide string at least.
Parameters
� lpszName
[out] The pointer to a string with allocated memory of 20 characters wide string at least.
� dwSize
[in] The buffer size of lpszName
parameter.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetDeviceName(TCHAR* lpszName, DWORD dwSize)
BOOL GetDeviceName(TCHAR* lpszName) for MH132
get the product name of this device. User must allocate enough memory for
20 characters wide string at least.
a string with allocated memory of 20 characters wide string at least.
lpszName, must bigger than 20. MH132 doesn’t have this
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 41
Total: 79
get the product name of this device. User must allocate enough memory for
a string with allocated memory of 20 characters wide string at least.
MH132 doesn’t have this
GetDeviceSKUID
Syntax
BOOL GetDeviceSKUID(TCHAR* lpszID
Description
This function will get the product SKU ID of this device.
Parameters
� lpszID
[out] The pointer to a string with allocated memory of 5 characters wide string at least.
Note: For Getac MH132, the definitions of lpszID as follow:
lpszID “10”: EU Bband
“11”: US Bband
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
GetDeviceSKUID(TCHAR* lpszID)
get the product SKU ID of this device.
The pointer to a string with allocated memory of 5 characters wide string at least.
Getac MH132, the definitions of lpszID as follow:
lpszID “10”: EU Bband
“11”: US Bband
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 42
Total: 79
The pointer to a string with allocated memory of 5 characters wide string at least.
GetLanguageID
Syntax
BOOL GetLanguageID(TCHAR* lpszID
int GetLanguageID(TCHAR* lpszID, DWORD dwSize)
Description
This function will get the product language ID of this device.
Parameters
� lpszID
[out] The pointer to a string with allocated memory of 5 characters wide string at least.
� dwSize
[in] The buffer size of lpszID
Return value
TRUE indicates success. FALSE indicates failure
Buffer size for PS336
Example Sample Code
Getac Handheld Device Software Development Kit
GetLanguageID(TCHAR* lpszID)
GetLanguageID(TCHAR* lpszID, DWORD dwSize) For PS336
get the product language ID of this device.
The pointer to a string with allocated memory of 5 characters wide string at least.
lpszID.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 43
Total: 79
The pointer to a string with allocated memory of 5 characters wide string at least.
GetOSVersion
Syntax
BOOL GetOSVersion(TCHAR* lpszVersion, DWORD dwSize)
BOOL GetOSVersion(TCHAR* lpszVersion
Description
This function will get the version string of OS platform of this device.
Parameters
� lpszVersion
[out] The pointer to a string with allocated memory of 30 characters wide string at least
.
� dwSize
[in] The buffer size of lpszVersion
parameter.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetOSVersion(TCHAR* lpszVersion, DWORD dwSize)
GetOSVersion(TCHAR* lpszVersion) for MH132
get the version string of OS platform of this device.
The pointer to a string with allocated memory of 30 characters wide string at least
lpszVersion, must bigger than 30. MH132 doesn’t have this
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 44
Total: 79
The pointer to a string with allocated memory of 30 characters wide string at least
MH132 doesn’t have this
GetROMImageVersion
Syntax
BOOL GetROMImageVersion(TCHAR* lpszVersion, DWORD dwSize)
BOOL GetROMImageVersion(TCHAR* lpszVersion
Description
This function will get the version string of ROM Image of this device.
Parameters
� lpszVersion
[out] The pointer to a string with allocated memory of 30 characters wide string at least.
� dwSize
[in] The buffer size of lpszVersion
parameter.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetROMImageVersion(TCHAR* lpszVersion, DWORD dwSize)
GetROMImageVersion(TCHAR* lpszVersion) for MH132
get the version string of ROM Image of this device.
The pointer to a string with allocated memory of 30 characters wide string at least.
lpszVersion, must bigger than 30. MH132 doesn’t have this
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 45
Total: 79
The pointer to a string with allocated memory of 30 characters wide string at least.
MH132 doesn’t have this
GetROMImageVersionMinor
Syntax
BOOL GetROMImageVersionMinor(TCHAR* lpszVersi
Description
This function will get the minor version string of ROM Image of this device.
Parameters
� lpszVersion
[out] The pointer to a string with allocated memory of 10 characters wide string at least.
� dwSize
[in] The buffer size of lpszVersion
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetROMImageVersionMinor(TCHAR* lpszVersion, DWORD dwSize)
get the minor version string of ROM Image of this device.
The pointer to a string with allocated memory of 10 characters wide string at least.
lpszVersion, must bigger than 10.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 46
Total: 79
on, DWORD dwSize)
get the minor version string of ROM Image of this device.
The pointer to a string with allocated memory of 10 characters wide string at least.
GetOSImgVersion
Syntax
int GetOSImgVersion(char* pVersionInfo, DWORD dwSize)
Description
This function will get the PS236 R02 version
Parameters
� lpszVersion
[out] The pointer to a string with allocated memory of 10 characters wide string at least.
� dwSize
[in] The buffer size of lpszVersion
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
int GetOSImgVersion(char* pVersionInfo, DWORD dwSize)
get the PS236 R02 version string of ROM Image of this device.
The pointer to a string with allocated memory of 10 characters wide string at least.
lpszVersion, must bigger than 10.
success. FALSE indicates failure
Date: 2013/3/14
Page: 47
Total: 79
string of ROM Image of this device.
The pointer to a string with allocated memory of 10 characters wide string at least.
GetMicroPVersion
Syntax
BOOL GetMicroPVersion(TCHAR* lpszVersion
Description
This function will get the version string of Micro
Parameters
� lpszVersion
[out] The pointer to a string with allocated memory of 10 characters wide string at least.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
GetMicroPVersion(TCHAR* lpszVersion)
get the version string of Micro-controller firmware of this device.
The pointer to a string with allocated memory of 10 characters wide string at least.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 48
Total: 79
controller firmware of this device.
The pointer to a string with allocated memory of 10 characters wide string at least.
GetPhoneVersion
Syntax
BOOL GetPhoneVersion(TCHAR* lpszVersion, DWORD dwSize)
BOOL GetPhoneVersion(TCHAR* lpszVersion
Description
This function will get the version string of WCDMA firmware of this device.
Parameters
� lpszVersion
[out] The pointer to a string with allocated memory of 10 characters wide string at least.
� dwSize
[in] The buffer size of lpszVersion
parameter.
Remark
This API is supported in Phone SKU (ID = 50) only.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetPhoneVersion(TCHAR* lpszVersion, DWORD dwSize)
GetPhoneVersion(TCHAR* lpszVersion) for MH132
get the version string of WCDMA firmware of this device.
The pointer to a string with allocated memory of 10 characters wide string at least.
lpszVersion, must bigger than 10. MH132 doesn’t have this
This API is supported in Phone SKU (ID = 50) only.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 49
Total: 79
get the version string of WCDMA firmware of this device.
The pointer to a string with allocated memory of 10 characters wide string at least.
MH132 doesn’t have this
GetSerialNumber
Syntax
BOOL GetSerialNumber(TCHAR* lpszSN, DWORD dwSize, DWORD dwMode)
R07 / PS236 EXT / PS336
BOOL GetSerialNumber(TCHAR* lpszSN,
Description
This function will get the serial number string
Parameters
� lpszSN
[out] The pointer to a string with allocated memory of 20 characters wide string at least.
� dwSize
[In] Allocated buffer size of lpszSN. Upper layer application has to allocate enough
memory buffer for usage.
� dwMode
[In] dwMode = 0, get PCB SN. dwMode = 1, dwSize = 10, get S
PS236 R07 / EXT / PS336
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetSerialNumber(TCHAR* lpszSN, DWORD dwSize, DWORD dwMode)
GetSerialNumber(TCHAR* lpszSN, DWORD dwSize) for MH132 and PS236 R02
get the serial number string of this device.
The pointer to a string with allocated memory of 20 characters wide string at least.
[In] Allocated buffer size of lpszSN. Upper layer application has to allocate enough
memory buffer for usage. This value must be greater or equal to 8.
dwMode = 0, get PCB SN. dwMode = 1, dwSize = 10, get System SN. Only for
/ PS336.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 50
Total: 79
BOOL GetSerialNumber(TCHAR* lpszSN, DWORD dwSize, DWORD dwMode) for PS236
for MH132 and PS236 R02
The pointer to a string with allocated memory of 20 characters wide string at least.
[In] Allocated buffer size of lpszSN. Upper layer application has to allocate enough
ystem SN. Only for
GetBluetoothMAC
Syntax
BOOL GetBTMac(BYTE* pBTMac, BYTE dwSize)
BOOL GetBluetoothMAC(TCHAR* lpszMAC
Description
This function will get the Bluetooth MAC address string of this device.
Parameters
� lpszMAC
[out] The pointer to a string with allocated memory of 20
For MH312.
� pBTMac
[out] The pointer to a 6 bytes array to indicate the BT MAC.
� dwSize
[in] size = 6.
Remark
This API is supported in Bluetooth
Return value
TRUE indicates success. FALSE
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetBTMac(BYTE* pBTMac, BYTE dwSize)
GetBluetoothMAC(TCHAR* lpszMAC) for MH132
get the Bluetooth MAC address string of this device.
The pointer to a string with allocated memory of 20 characters wide string at least.
inter to a 6 bytes array to indicate the BT MAC.
Bluetooth module integrated device only.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 51
Total: 79
characters wide string at least.
GetWLANMAC
Syntax
BOOL GetWLANMAC(BYTE* pWLANMac, BYTE dwSize)
BOOL GetWLANMAC(TCHAR* lpszMAC
Description
This function will get the WLAN MAC address string of this device.
Parameters
� lpszMAC
[out] The pointer to a string with allocated memory of 20 characters wide string at least.
� dwSize
[in] The buffer size of lpszMAC
Remark
This API is supported in WLAN
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetWLANMAC(BYTE* pWLANMac, BYTE dwSize)
GetWLANMAC(TCHAR* lpszMAC) for MH132
get the WLAN MAC address string of this device.
The pointer to a string with allocated memory of 20 characters wide string at least.
lpszMAC, must bigger than 20. MH132 doesn’t have this
WLAN module integrated device only.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 52
Total: 79
The pointer to a string with allocated memory of 20 characters wide string at least.
MH132 doesn’t have this
GetMemoryStatus
Syntax
BOOL GetMemoryStatus(MEM_STATUS* lpNAND, MEM_STATUS* lpRAM
Description
This function will get the memory status of the device.
Parameters
� lpNAND
[out] The pointer to a MEM_STATUS structure includes total NAND size and available
size.
� lpRAM
[out] The pointer to a MEM
size.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Typedef struct {
DWORD dwTotalSize;
DWORD dwAvailable;
} MEM_STATUS, *PMEM_STATUS;
MEM_STATUS* lpNAND;
MEM_STATUS* lpRAM;
GetMemoryStatus(lpNAND, lpRAM);
Getac Handheld Device Software Development Kit
GetMemoryStatus(MEM_STATUS* lpNAND, MEM_STATUS* lpRAM
get the memory status of the device.
pointer to a MEM_STATUS structure includes total NAND size and available
] The pointer to a MEM_STATUS structure includes total RAM size and available
TRUE indicates success. FALSE indicates failure
dwTotalSize;
dwAvailable;
} MEM_STATUS, *PMEM_STATUS;
GetMemoryStatus(lpNAND, lpRAM);
Date: 2013/3/14
Page: 53
Total: 79
GetMemoryStatus(MEM_STATUS* lpNAND, MEM_STATUS* lpRAM)
pointer to a MEM_STATUS structure includes total NAND size and available
size and available
GetProcessorName
Syntax
int GetProcessorName(TCHAR* lpszName, DWORD dwSize)
BOOL GetProcessorName(TCHAR* lpszName
Description
This function will get the string of the chip vendor and model of this device. User must
allocate enough memory for 30 characters wide string at least.
Parameters
� lpszName
[out] The pointer to a string with allocated memory of 30 characters wide string at least.
� dwSize
[in] The buffer size of lpszName
Return value
Return a integer indicates its name length for PS236.
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
int GetProcessorName(TCHAR* lpszName, DWORD dwSize)
GetProcessorName(TCHAR* lpszName) for MH132
get the string of the chip vendor and model of this device. User must
allocate enough memory for 30 characters wide string at least.
to a string with allocated memory of 30 characters wide string at least.
lpszName, must bigger than 30. MH132 doesn’t have this
Return a integer indicates its name length for PS236.
FALSE indicates failure for MH132.
Date: 2013/3/14
Page: 54
Total: 79
get the string of the chip vendor and model of this device. User must
to a string with allocated memory of 30 characters wide string at least.
MH132 doesn’t have this
GetIMEI
Syntax
BOOL GetIMEI(TCHAR* lpszIMEI, DWORD dwSize)
BOOL GetIMEI(TCHAR* lpszIMEI
Description
This function will get the IMEI string of this device. User must allocate
30 characters wide string at least.
Parameters
� lpszIMEI
[out] The pointer to a string with allocated memory of 30 characters wide string at least.
� dwSize
[in] The buffer size of lpszIMEI
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetIMEI(TCHAR* lpszIMEI, DWORD dwSize)
GetIMEI(TCHAR* lpszIMEI) for MH132
get the IMEI string of this device. User must allocate enough memory for
30 characters wide string at least.
The pointer to a string with allocated memory of 30 characters wide string at least.
lpszIMEI, must bigger than 30. MH132 doesn’t have this
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 55
Total: 79
enough memory for
The pointer to a string with allocated memory of 30 characters wide string at least.
MH132 doesn’t have this
GetCPUSpeed
Syntax
BOOL GetCPUSpeed(DWORD* Speed)
Description
This function will get the CPU speed of system.
Parameters
� Speed
[out] A double word pointer for CPU speed.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetCPUSpeed(DWORD* Speed)
get the CPU speed of system.
A double word pointer for CPU speed.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 56
Total: 79
SystemReboot
Syntax
void SystemReboot(void)
Description
Reboot System.
Parameters
� None
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 57
Total: 79
5.9 Personal Information APIs
GetOwnerName
Syntax
BOOL GetOwnerName(TCHAR* lpszName, DWORD dwSize)
BOOL GetOwnerName(TCHAR* lpszName
Description
This function will get the name string of the owner of this device. User must allocate
memory for 40 characters wide string at least.
Parameters
� lpszName
[out] The pointer to a string with allocated memory of 40 characters wide string at least.
� dwSize
[in] The buffer size of lpszName
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetOwnerName(TCHAR* lpszName, DWORD dwSize)
GetOwnerName(TCHAR* lpszName) for MH132
get the name string of the owner of this device. User must allocate
memory for 40 characters wide string at least.
The pointer to a string with allocated memory of 40 characters wide string at least.
lpszName, must bigger than 40. MH132 doesn’t have this.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 58
Total: 79
get the name string of the owner of this device. User must allocate enough
The pointer to a string with allocated memory of 40 characters wide string at least.
MH132 doesn’t have this.
GetOwnerCompany
Syntax
BOOL GetOwnerCompany(TCHAR* lpszName, DWORD dwSize)
BOOL GetOwnerCompany(TCHAR* lpszName
Description
This function will get the name string of the owner company of this device. User must allocate
enough memory for 40 characters wide string at least.
Parameters
� lpszName
[out] The pointer to a string with allocated memory of 40 characters wide string at least.
� dwSize
[in] The buffer size of lpszName
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetOwnerCompany(TCHAR* lpszName, DWORD dwSize)
GetOwnerCompany(TCHAR* lpszName) for MH132
name string of the owner company of this device. User must allocate
enough memory for 40 characters wide string at least.
The pointer to a string with allocated memory of 40 characters wide string at least.
lpszName, must bigger than 40. MH132 doesn’t have this.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 59
Total: 79
name string of the owner company of this device. User must allocate
The pointer to a string with allocated memory of 40 characters wide string at least.
MH132 doesn’t have this.
GetOwnerAddress
Syntax
BOOL GetOwnerAddress(TCHAR* lpszAddress, DWORD dwSize)
BOOL GetOwnerAddress(TCHAR* lpszAddress
Description
This function will get the name string of the owner company of this device. User must allocate
enough memory for 128 characters wide string at least.
Parameters
� lpszAddress
[out] The pointer to a string with allocated memory of 128 characters wide string at least.
� dwSize
[in] The buffer size of lpszAddress
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetOwnerAddress(TCHAR* lpszAddress, DWORD dwSize)
GetOwnerAddress(TCHAR* lpszAddress) for MH132
get the name string of the owner company of this device. User must allocate
enough memory for 128 characters wide string at least.
string with allocated memory of 128 characters wide string at least.
lpszAddress, must bigger than 128. MH132 doesn’t have this.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 60
Total: 79
get the name string of the owner company of this device. User must allocate
string with allocated memory of 128 characters wide string at least.
MH132 doesn’t have this.
GetOwnerTelephone
Syntax
BOOL GetOwnerTelephone(TCHAR* lpszTel, DWORD dwSize)
BOOL GetOwnerTelephone(TCHAR* lpszTel
Description
This function will get the string of the owner telephone of this device. User must allocate
enough memory for 30 characters wide string at least.
Parameters
� lpszTel
[out] The pointer to a string with allocated memory of 30 characters wide string at least.
� dwSize
[in] The buffer size of lpszTel
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetOwnerTelephone(TCHAR* lpszTel, DWORD dwSize)
GetOwnerTelephone(TCHAR* lpszTel) for MH132
get the string of the owner telephone of this device. User must allocate
characters wide string at least.
The pointer to a string with allocated memory of 30 characters wide string at least.
lpszTel, must bigger than 30. MH132 doesn’t have this.
indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 61
Total: 79
get the string of the owner telephone of this device. User must allocate
The pointer to a string with allocated memory of 30 characters wide string at least.
MH132 doesn’t have this.
GetOwnerEMail
Syntax
BOOL GetOwnerEMail(TCHAR* lpszEMail, DWORD dwSize)
BOOL GetOwnerEMail(TCHAR* lpszEMail
Description
This function will get the string of the owner e
enough memory for 54 characters wide string at least.
Parameters
� lpszEMail
[out] The pointer to a string with allocated memory of 54 characters wide string at least.
� dwSize
[in] The buffer size of lpszEMail
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL GetOwnerEMail(TCHAR* lpszEMail, DWORD dwSize)
GetOwnerEMail(TCHAR* lpszEMail) for MH132
get the string of the owner e-mail address of this device. User must allocate
enough memory for 54 characters wide string at least.
The pointer to a string with allocated memory of 54 characters wide string at least.
lpszEMail, must bigger than 54. MH132 doesn’t have this.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 62
Total: 79
address of this device. User must allocate
The pointer to a string with allocated memory of 54 characters wide string at least.
MH132 doesn’t have this.
5.10 MISC APIs
Button_SetFNKeyStatus
Syntax
BOOL Button_SetFNKeyStatus(BOOL bLock
Description
This function will allow user to lock or unlock the FN button in the application.
Parameters
� bLock
[in] Boolean TRUE to lock the FN button to enable alternately keyboard function.
FALSE to unlock the FN button and the keyboard function will back to normal setting.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
Button_SetFNKeyStatus(BOOL bLock)
user to lock or unlock the FN button in the application.
Boolean TRUE to lock the FN button to enable alternately keyboard function.
FALSE to unlock the FN button and the keyboard function will back to normal setting.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 63
Total: 79
user to lock or unlock the FN button in the application.
Boolean TRUE to lock the FN button to enable alternately keyboard function.
FALSE to unlock the FN button and the keyboard function will back to normal setting.
Button_GetFNKeyStatus
Syntax
BYTE Button_GetFNKeyStatus(void
Description
This function will allow user to check the status of FN button in the application.
Parameters
None
Return value
1 indicates FN key is locked. 0 indicates unlock.
Example Sample Code
Getac Handheld Device Software Development Kit
Button_GetFNKeyStatus(void)
allow user to check the status of FN button in the application.
1 indicates FN key is locked. 0 indicates unlock.
Date: 2013/3/14
Page: 64
Total: 79
allow user to check the status of FN button in the application.
SetExpansionUART
Syntax
BOOL SetExpansionUART(BOOL bMode
Description
This function will allow user to inform system switching the UART port between the
Flexiconn UART port or the bottom side UART port.
Parameters
� bMode
[in] Boolean
TRUE to set the bottom side UART port to the upper side Flexiconn UART port.
FALSE to set the Flexiconn UART port back to bottom side UART port.
Return value
TRUE indicates success. FALS
Example Sample Code
1 No matter using upper side Flexiconn UART port or bottom side UART, from software developer point of view, it is
“COM1:” in the system.
Getac Handheld Device Software Development Kit
SetExpansionUART(BOOL bMode)
allow user to inform system switching the UART port between the
port or the bottom side UART port.1
TRUE to set the bottom side UART port to the upper side Flexiconn UART port.
FALSE to set the Flexiconn UART port back to bottom side UART port.
TRUE indicates success. FALSE indicates failure
No matter using upper side Flexiconn UART port or bottom side UART, from software developer point of view, it is
Date: 2013/3/14
Page: 65
Total: 79
allow user to inform system switching the UART port between the
TRUE to set the bottom side UART port to the upper side Flexiconn UART port.
FALSE to set the Flexiconn UART port back to bottom side UART port.
No matter using upper side Flexiconn UART port or bottom side UART, from software developer point of view, it is
GetExpansionUART
Syntax
BOOL GetExpansionUART(BYTE* lpMode
Description
This function will allow user to check the status of which UART port can be used in current
system configuration.
Parameters
� lpMode
[out] pointer to a byte
*lpMode = 0; means the system configuration has been switched to
External UART
*lpMode=1; means the system configuration has been switched
UART port.
Return value
TRUE indicates success. FALSE
Example Sample Code
Getac Handheld Device Software Development Kit
GetExpansionUART(BYTE* lpMode)
allow user to check the status of which UART port can be used in current
*lpMode = 0; means the system configuration has been switched to the bottom side
*lpMode=1; means the system configuration has been switched the upper side Flexiconn
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 66
Total: 79
allow user to check the status of which UART port can be used in current
the bottom side
the upper side Flexiconn
SetExpansionPOWER
Syntax
BOOL SetExpansionPOWER(BOOL bEnable)
Description
This function will enable the power for Flexiconn port device.
Parameters
� bMode
[in] Boolean
TRUE to enable the power for Flexiconn port.
FALSE to disable the power of Flexiconn port.
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL SetExpansionPOWER(BOOL bEnable)
enable the power for Flexiconn port device.
TRUE to enable the power for Flexiconn port.
FALSE to disable the power of Flexiconn port.
TRUE indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 67
Total: 79
GetExpansionPOWER
Syntax
BOOL GetExpansionPOWER(
BOOL GetExpansionPOWER(
Description
This function will allow user to check the power status of Flexiconn port.
Parameters
� lpEnable
[out] Boolean
0, means the power of Flexiconn port is OFF.
1; means the power of Flexiconn port is ON
Return value
TRUE indicates success. FALSE indicates failure
Example Sample Code
Getac Handheld Device Software Development Kit
GetExpansionPOWER(DWORD* bEnable) For PS336
GetExpansionPOWER(BOOL* bEnable) For PS236EXT,PS236R07
allow user to check the power status of Flexiconn port.
0, means the power of Flexiconn port is OFF.
1; means the power of Flexiconn port is ON.
indicates success. FALSE indicates failure
Date: 2013/3/14
Page: 68
Total: 79
IsUsingAABattery
Syntax
BOOL IsUsingAABattery(void)
Description
This function can get if using AA battery.
Parameters
� None
Return value
TRUE indicates using AA battery
Example Sample Code
Getac Handheld Device Software Development Kit
BOOL IsUsingAABattery(void)
can get if using AA battery.
using AA battery. FALSE indicates not using AA battery.
Date: 2013/3/14
Page: 69
Total: 79
6. How to Remap Keypad Definition
6.1 Concept
When key is pressed, keypad driver sent a virtual
define each key for other purpose, we need to use the
6.2 Pseudo-Code
Here are the steps to create a hook for keypad.
1 Create a thread for keypad hook
2 Setting up hook function and key processing
2.1 Call Windows API to activate a hook.
2.2 Catch keys we want, and handle it.
3 Handle Windows message
6.3 Example static HINSTANCE g_hHookApiDLL = NULL;static HHOOK g_hInstalledLLKBDhook = NULL; CreateThread(NULL, 0, HookThread, &g_hInst, 0, &dwThreadID) DWORD WINAPI HookThread(LPVOID lpNull){ MSG message; ActivateKBHook(g_hInst, HookProc); while(GetMessage(&message, NULL, 0, 0)) { TranslateMessage(&message); DispatchMessage(&message); } DeactivateKBHook(); return 1 } BOOL ActivateKBHook(HINSTANCE hInstance, HOOKPROC LLKeyboardHookCallbackFunction){ //we need to manually load these standard Win32 API calls //MSDN states that these aren't supported in WinCE HINSTANCE SetWindowsHookEx HHOOK CallNextHookEx HANDLE UnhookWindowsHookEx // load the coredll.dll g_hHookApiDLL = LoadLibrary(_T("coredll.dll"));
//load the SetWindowsHookEx API call //the SetWindowsHookEx function installs an application //You would install a hook procedure to monitor the system for certain types of events. //here we use use the hook to monitor kyeboard events SetWindowsHookEx = (_SetWindowsHookExW)GetProcAddress(g_hHookApiDLL, _T("SetWindowsHookExW")); //install the KB hook //the handle needs to be saved for default processing of the events and to uninstall the hook, once we are done with it g_hInstalledLLKBDhook = SetWindowsHookEx(WH_KEYBOARD_LL, LLKeyboardHookCallbackFunction, hInstance, 0);
//load CallNextHookEx() API call //the CallNextHookEx function passes the hook information to the next hook procedure in the current hook chain. //we use this call for default processing of events. CallNextHookEx = (_CallNextHookEx)GetProcAddress(g_hHookApiDLL, _T("CallNextHookEx"));
Getac Handheld Device Software Development Kit
How to Remap Keypad Definition
When key is pressed, keypad driver sent a virtual-key to OS except camera key. So, if we want to
define each key for other purpose, we need to use the Windows API “hook” to achieve this.
Here are the steps to create a hook for keypad.
hook.
up hook function and key processing.
Call Windows API to activate a hook.
Catch keys we want, and handle it.
= NULL; //handle to coredll.dll, where all the hook related APIs are presentstatic HHOOK g_hInstalledLLKBDhook = NULL; //g_hInstalledLLKBDhook represents handle to the installed KB hook
eateThread(NULL, 0, HookThread, &g_hInst, 0, &dwThreadID)
DWORD WINAPI HookThread(LPVOID lpNull)
while(GetMessage(&message, NULL, 0, 0))
BOOL ActivateKBHook(HINSTANCE hInstance, HOOKPROC LLKeyboardHookCallbackFunction)
//we need to manually load these standard Win32 API calls //MSDN states that these aren't supported in WinCE
= NULL; = NULL;
= NULL;
g_hHookApiDLL = LoadLibrary(_T("coredll.dll"));
//the SetWindowsHookEx function installs an application-defined hook procedure into a hook chain. //You would install a hook procedure to monitor the system for certain types of events. //here we use use the hook to monitor kyeboard events
okEx = (_SetWindowsHookExW)GetProcAddress(g_hHookApiDLL, _T("SetWindowsHookExW"));
e needs to be saved for default processing of the events and to uninstall the hook, once we are done with itindowsHookEx(WH_KEYBOARD_LL, LLKeyboardHookCallbackFunction, hInstance, 0);
//the CallNextHookEx function passes the hook information to the next hook procedure in the current hook chain. rocessing of events.
CallNextHookEx = (_CallNextHookEx)GetProcAddress(g_hHookApiDLL, _T("CallNextHookEx"));
Date: 2013/3/14
Page: 70
Total: 79
key to OS except camera key. So, if we want to
Windows API “hook” to achieve this.
//handle to coredll.dll, where all the hook related APIs are present //g_hInstalledLLKBDhook represents handle to the installed KB hook
okEx = (_SetWindowsHookExW)GetProcAddress(g_hHookApiDLL, _T("SetWindowsHookExW"));
e needs to be saved for default processing of the events and to uninstall the hook, once we are done with it indowsHookEx(WH_KEYBOARD_LL, LLKeyboardHookCallbackFunction, hInstance, 0);
//the CallNextHookEx function passes the hook information to the next hook procedure in the current hook chain.
//load UnhookWindowsHookEx() API //the UnhookWindowsHookEx function removes a hook procedure installed in a hook chain by the SetWindowsHookEx fu //we use this call to unistall the hook. UnhookWindowsHookEx = (_UnhookWindowsHookEx)GetProcAddress(g_hHookApiDLL, _T("UnhookWindowsHookEx")); //all the APIs are loaded and the application is hooked return true; } LRESULT HookProc(int code, WPARAM wParam, LPARAM lParam){ if (code < 0) { CallNextHookEx(NULL, code, wParam, lParam); } //here, we add process for keys we want to modify
switch (wParam) {
case WM_KEYDOWN://catch key down message switch((((KBDLLHOOKSTRUCT*)lParam) { case VKF2://if VK_ keybd_event(VK_TSTAR, 0, KEYEVENTF_SILENT, 0); keybd_event(VK_TSTAR, 0, KEYEVENTF_SILENT|KEYEVENTF_KEY return 1; break; } break; case WM_KEYUP://catch key up message switch((((KBDLLHOOKSTRUCT*)lParam) { case VKF2://if VK_ keybd_event(VK_TSTAR, 0, KEYEVENTF_SILENT, 0); keybd_event(VK_TSTAR, 0, return 1; break; } default: break; } //pass control to next hook in the hook chain. return ( CallNextHookEx(NULL, code, wParam, lParam) ); } BOOL DeactivateKBHook() { //unload the hook if(g_hInstalledLLKBDhook != NULL) { UnhookWindowsHookEx(g_hInstalledLLKBDhook); g_hInstalledLLKBDhook = NULL; } //unload the coredll.dll if(g_hHookApiDLL != NULL) { FreeLibrary(g_hHookApiDLL); g_hHookApiDLL = NULL; } //we have terminated gracefully return true; }
6.4 Camera Key (PS236/PS236 EXT
Camera key use independent GPIO pin to trigger, So we cannot use hook function to remap it. If
we want to use camera key for other purpose, we may need to modify the keypad driver.
Getac Handheld Device Software Development Kit
//the UnhookWindowsHookEx function removes a hook procedure installed in a hook chain by the SetWindowsHookEx fu
UnhookWindowsHookEx = (_UnhookWindowsHookEx)GetProcAddress(g_hHookApiDLL, _T("UnhookWindowsHookEx"));//all the APIs are loaded and the application is hooked
WPARAM wParam, LPARAM lParam)
code, wParam, lParam);
//here, we add process for keys we want to modify
//catch key down message switch((((KBDLLHOOKSTRUCT*)lParam)->vkCode))
_F2 is down, remap VK_F2 to VK_TSTAR keybd_event(VK_TSTAR, 0, KEYEVENTF_SILENT, 0); keybd_event(VK_TSTAR, 0, KEYEVENTF_SILENT|KEYEVENTF_KEYDOWN
//catch key up message switch((((KBDLLHOOKSTRUCT*)lParam)->vkCode))
_F2 is up, remap VK_F2 to VK_TSTAR keybd_event(VK_TSTAR, 0, KEYEVENTF_SILENT, 0); keybd_event(VK_TSTAR, 0, KEYEVENTF_SILENT|KEYEVENTF_KEYUP, 0);
//pass control to next hook in the hook chain. return ( CallNextHookEx(NULL, code, wParam, lParam) );
UnhookWindowsHookEx(g_hInstalledLLKBDhook); g_hInstalledLLKBDhook = NULL;
6.4 Camera Key (PS236/PS236 EXT/PS336 series)
Camera key use independent GPIO pin to trigger, So we cannot use hook function to remap it. If
we want to use camera key for other purpose, we may need to modify the keypad driver.
Date: 2013/3/14
Page: 71
Total: 79
//the UnhookWindowsHookEx function removes a hook procedure installed in a hook chain by the SetWindowsHookEx function.
UnhookWindowsHookEx = (_UnhookWindowsHookEx)GetProcAddress(g_hHookApiDLL, _T("UnhookWindowsHookEx"));
DOWN, 0);
KEYEVENTF_SILENT|KEYEVENTF_KEYUP, 0);
Camera key use independent GPIO pin to trigger, So we cannot use hook function to remap it. If
we want to use camera key for other purpose, we may need to modify the keypad driver.
Getac Handheld Device Software Development Kit
Date: 2013/3/14
Page: 72
Total: 79
7. Frequently Asked Questions
7.1 How can I run an application from SD card automatically?
Microsoft Windows Mobile Operation System has provided the “Autorun” feature to assist
user executing specific application automatically. To take the advantage of
please follow these steps to configure your SD card.
Step1 – Prepare a SD card
Step2 – Create a folder which named “2577” in the SD card
Step3 – Copy all the related files into “2577” including the executable file
Step4 – Rename the executable file to “autorun.exe”
Step5 – Insert the SD card into the SD slot of Getac’s handheld product.
Step6 – Press the power button to resume the system. (PS236 series does not support
Auto-wake by SD card)
For more detail information, please refer to Micros
http://msdn.microsoft.com/en-us/library/bb159776.aspx
Getac Handheld Device Software Development Kit
7. Frequently Asked Questions
.1 How can I run an application from SD card automatically?
Microsoft Windows Mobile Operation System has provided the “Autorun” feature to assist
user executing specific application automatically. To take the advantage of
please follow these steps to configure your SD card.
Create a folder which named “2577” in the SD card
Copy all the related files into “2577” including the executable file
le file to “autorun.exe”
Insert the SD card into the SD slot of Getac’s handheld product.
Press the power button to resume the system. (PS236 series does not support
For more detail information, please refer to Microsoft MSDN website:
us/library/bb159776.aspx
Date: 2013/3/14
Page: 73
Total: 79
Microsoft Windows Mobile Operation System has provided the “Autorun” feature to assist
user executing specific application automatically. To take the advantage of this feature,
Press the power button to resume the system. (PS236 series does not support
7.2 How can I rotate the system screen thru my application?
For some specific scenarios, landscape mode might be a
information to the end user. Microsoft Windows Mobile Operation System has provided
“Screen Rotation” feature as part of it. To implement this feature into your application,
please refer to the implementation guide on the Microsoft
http://msdn.microsoft.com/en-us/library/ms911017.aspx
Getac Handheld Device Software Development Kit
.2 How can I rotate the system screen thru my application?
For some specific scenarios, landscape mode might be a better mode to provide
information to the end user. Microsoft Windows Mobile Operation System has provided
“Screen Rotation” feature as part of it. To implement this feature into your application,
please refer to the implementation guide on the Microsoft MSDN website.
us/library/ms911017.aspx
Date: 2013/3/14
Page: 74
Total: 79
better mode to provide
information to the end user. Microsoft Windows Mobile Operation System has provided
“Screen Rotation” feature as part of it. To implement this feature into your application,
7.3 How can I pack my applications and settings for multiple units’ deployment?
For some Enterprise users, the easier
system settings into Windows Mobile device is creating a “Customized Cab file”.
Microsoft has provided this feature in Visual Studio 2005/2008 and makes the Cab file
creation easily.
Please refer to the MSDN website for detail information.
http://msdn.microsoft.com/en-us/library/bb158529.aspx
Getac Handheld Device Software Development Kit
.3 How can I pack my applications and settings for multiple units’ deployment?
For some Enterprise users, the easier way to deploy specific application and related
system settings into Windows Mobile device is creating a “Customized Cab file”.
Microsoft has provided this feature in Visual Studio 2005/2008 and makes the Cab file
website for detail information.
us/library/bb158529.aspx
Date: 2013/3/14
Page: 75
Total: 79
.3 How can I pack my applications and settings for multiple units’ deployment?
way to deploy specific application and related
system settings into Windows Mobile device is creating a “Customized Cab file”.
Microsoft has provided this feature in Visual Studio 2005/2008 and makes the Cab file
7.4 How can I keep the unit awake if specific application running?
For some specific scenarios, av
is necessary. Microsoft Windows Mobile Operation System has provided
“SystemIdleTimerReset” function to reset idle timer to avoid unit enter suspend mode.
This function resets a system timer that co
automatically go into a suspended state
Syntax
void WINAPI SystemIdleTimerReset(void);
Parameter
None.
Return
None
Notes
This function must be use appropriately. On battery
never suspends (or sleeps) by continually calling
drain the batteries.
Getac Handheld Device Software Development Kit
7.4 How can I keep the unit awake if specific application running?
For some specific scenarios, avoid enter suspend mode when specific application running
is necessary. Microsoft Windows Mobile Operation System has provided
“SystemIdleTimerReset” function to reset idle timer to avoid unit enter suspend mode.
This function resets a system timer that controls whether or not the device will
automatically go into a suspended state
void WINAPI SystemIdleTimerReset(void);
This function must be use appropriately. On battery-powered devices, a program that
never suspends (or sleeps) by continually calling SystemIdleTimerReset
Date: 2013/3/14
Page: 76
Total: 79
oid enter suspend mode when specific application running
“SystemIdleTimerReset” function to reset idle timer to avoid unit enter suspend mode.
ntrols whether or not the device will
a program that
SystemIdleTimerReset can quickly
Appendix A : API List For Each Product
PS236
R02
EComAcc_InitDevice ○
EComAcc_DeinitDevice ○
EComAcc_GetData ○
GSensor_InitDevice X
GSensor_DeinitDevice X
GSensor_GetData X
GSensor_GetRawData ○
Pressure_InitDevice ○
Pressure_DeinitDevice ○
Pressure_GetPaTemp ○
CreateFile3 ○
Speaker_GetVolume X Speaker_SetVolume X Receiver_GetVolume X
Receiver_SetVolume X Microphone Gain Control X
Charging LED Indicator Control
○
Camera Flash LED control ○
Set_BT_LED_ON ○
Set_WIFI_LED_ON ○
Set_3G_LED_ON ○
Set_GPS_LED_ON X
Backlight_GetLevel X
Backlight_SetLevel X
Phone_OnOff X
WLAN_OnOff X
Bluetooth_OnOff X
FlightMode_OnOff X
GetSystemUUID X
GetDeviceName X
GetDeviceSKUID X
GetLanguageID X
GetOSVersion X
GetROMImageVersion X
GetROMImageVersionMinor X
GetOSImgVersion ○
GetMicroPVersion ○
GetPhoneVersion X
GetSerialNumber ○
GetBluetoothMAC (GetBTMac)
○
2 For MH132, G-Sensor is initialized in system boot, developer need not to do this.
3 GPS without GPS Intermediate Driver, For PS236/PS236EXT, please use COM4; For PS535F/PS535E, please use COM2;
When develop with MH132, please use COM7
Getac Handheld Device Software Development Kit
Appendix A : API List For Each Product
Getac Handheld PS236
R02 PS236 EXT
PS236 R07
PS535F (WM 6.5)
PS535E MH132
(WM 6.5)
○ ○ ○ ○ X
○ ○ ○ ○ X
○ ○ ○ ○ X
X X X X X
X X X X X
X X X X ○
○ ○ X X X
○ ○ ○ ○ X
○ ○ ○ ○ X
○ ○ ○ ○ X
○ ○ ○ ○ ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
X X X X ○
○ ○ X X ○
○ ○ X X X
○ ○ X X X
○ ○ X X X
○ ○ X X X
X X X X X
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
X X X X ○
X X X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X X
X X X X X
○ ○ X X X
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
Sensor is initialized in system boot, developer need not to do this.
, For PS236/PS236EXT, please use COM4; For PS535F/PS535E, please use COM2;
When develop with MH132, please use COM7
Date: 2013/3/14
Page: 77
Total: 79
MH132 (WM 6.5)
PS336 (WEH6.5)
X ○
X ○
X ○
X 2 X
X X
○ X
X ○
X ○
X ○
X ○
○ ○
○ ○
○ ○
○ ○
○ ○
○ X
○ X
X ○
X ○
X ○
X ○
X ○
○ ○
○ ○
○ ○
○ ○
○ ○
○ ○
○ ○
○ ○
○ ○
○ ○
○ ○
○ ○
X ○
X X
X ○
○ ○
○ ○
○ ○
, For PS236/PS236EXT, please use COM4; For PS535F/PS535E, please use COM2;
GetWLANMAC X
GetMemoryStatus X
GetProcessorName X
GetIMEI X
GetCPUSpeed ○
SystemReboot ○
GetOwnerName X
GetOwnerCompany X
GetOwnerAddress X
GetOwnerTelephone X
GetOwnerEMail X
Button_SetFNKeyStatus X
Button_GetFNKeyStatus X
SetExpansionUART X
GetExpansionUART X
SetExpansionPOWER X
GetExpansionPOWER X
IsUsingAABattery X
Getac Handheld Device Software Development Kit
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X X
○ ○ X X X
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X ○
○ ○ X X X
○ ○ X X X
○ ○ X X X
○ ○ X X X
○ ○ X X X
○ ○ X X X
○ ○ X X X
Date: 2013/3/14
Page: 78
Total: 79
○ ○
○ ○
○ ○
○ ○
X ○
X ○
○ ○
○ ○
○ ○
○ ○
○ ○
X ○
X ○
X X
X X
X ○
X ○
X X
Appendix B : Sample Application Summary
B.1 SystemInfo
This demo application is designed for how to use Getac APIs to access product information.
B.2 CameraCapture
This demo application is provided by Microsoft for how to use DirectShow to create a camera
application.
B.3 Level Gauge
This demo application is designed for how to use G
B.4 GPS Sample Application
This demo application is designed for how to access data from built
product.
B.5 MenuChange
This demo application is designed for how to change system menu display on the taskbar
dynamically.
B.6 SensorsDemo
This demo application is designed for how to access MEMS data from the built
Product.
Getac Handheld Device Software Development Kit
Appendix B : Sample Application Summary
This demo application is designed for how to use Getac APIs to access product information.
This demo application is provided by Microsoft for how to use DirectShow to create a camera
This demo application is designed for how to use G-sensor data to design a level gauge application.
This demo application is designed for how to access data from built-in GPS module in Getac’s
This demo application is designed for how to change system menu display on the taskbar
o application is designed for how to access MEMS data from the built-in sensor in Getac
Date: 2013/3/14
Page: 79
Total: 79
This demo application is designed for how to use Getac APIs to access product information.
This demo application is provided by Microsoft for how to use DirectShow to create a camera
sensor data to design a level gauge application.
in GPS module in Getac’s
This demo application is designed for how to change system menu display on the taskbar
in sensor in Getac