© 2015 MediaTek Inc.
This document contains information that is proprietary to MediaTek Inc.
Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.
Version: 1.2
Release date: 2015-04-13
Specifications are subject to change without notice.
[Mediatek SmartDevice Library]
User Guideline
MTXXXX
Chip Name
Internal Use
MediaTek Confidential © 2015 MediaTek Inc. Page 2 of 42
This document contains information that is proprietary to MediaTek Inc.
Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.
Document Revision History
Revision Date Author Description
1.0 2014-09-26 Initial Version
1.1 2014-12-15 Add updateAlertThreshhold interface
1.2 2015-04-13 Add/deprecated APIs for new feature/change feature
MTXXXX
Chip Name
Internal Use
MediaTek Confidential © 2015 MediaTek Inc. Page 3 of 42
This document contains information that is proprietary to MediaTek Inc.
Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.
Table of Contents
Document Revision History ......................................................................................................................... 2
Table of Contents ................................................................................................................................... 3
1
Overview........................................................................................................................................ 6
2
MTKBleManager ........................................................................................................................... 7
2.1
Initializing a MTKBleManager ............................................................................................... 7
2.2
Scanning or Stopping Scans of Peripherals ......................................................................... 7
2.3
Establishing Connections with Peripherals .......................................................................... 8
2.4
Register and Unregister Delegate ........................................................................................ 8
2.5
Forget paired device ............................................................................................................. 9
2.6
Constants .............................................................................................................................. 9
2.6.1
Scanning States ................................................................................................... 9
2.6.2
Connection States ................................................................................................ 9
2.7
Protocols to AP ................................................................................................................... 10
2.7.1
BleDiscoveryDelegate ........................................................................................ 10
2.7.2
BleConnectDlegate ............................................................................................ 10
2.7.3
BleScanningStateChangeDelegate .................................................................... 10
2.7.4
BluetoothAdapterStateChangeDelegate ............................................................ 11
3
Proximity ..................................................................................................................................... 12
3.1
Getting the Shared MTKBleProximityService Instance ...................................................... 12
3.2
Update PXP Settings .......................................................................................................... 12
3.3
Getting Current Distance of Remote Device ...................................................................... 13
3.4
Getting Alert State of Remote Device ................................................................................ 13
3.5
Calibrate the Threshold of PXP Alert Range ...................................................................... 14
3.6
Modify Range Alert Threshold ............................................................................................ 14
3.7
Register and unRegister Delegate ..................................................................................... 14
3.8
Constants ............................................................................................................................ 15
3.8.1
Range Types ...................................................................................................... 15
3.8.2
Range Distance .................................................................................................. 15
3.8.3
Alert Level .......................................................................................................... 15
4
FMP .............................................................................................................................................. 16
4.1
Getting the Shared FMPGattClient Instance ...................................................................... 16
4.2
Find Remote Wearable Device........................................................................................... 16
5
Health ........................................................................................................................................... 17
5.1
PdmsSleepService ............................................................................................................. 17
5.1.1
Get the Shared PdmsSleepService Instance ..................................................... 17
5.1.2
Start Reading Data from Remote Wearable Device .......................................... 17
5.1.3
Stop Reading Data from Remote Device ........................................................... 18
5.1.4
Register/unRegister Pedometer and Sleep Delegate ........................................ 18
5.1.5
PdmsSleepUpdateDelegate ............................................................................... 18
MTXXXX
Chip Name
Internal Use
MediaTek Confidential © 2015 MediaTek Inc. Page 4 of 42
This document contains information that is proprietary to MediaTek Inc.
Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.
5.2
Blood Pressure ................................................................................................................... 19
5.2.1
Getting Shared BloodPressureService Instance ................................................ 19
5.2.2
Register/unregister Blood Pressure Delegate .................................................... 19
5.2.3
BloodPressureUpdateDelegate .......................................................................... 20
5.3
Body Temperature .............................................................................................................. 20
5.3.1
Getting the Shared BodyTemperatureService Instance .................................... 20
5.3.2
Register/unregister Body Temperature Delegate .............................................. 21
5.3.3
BodyTemperatureUpdateDelegate .................................................................... 21
6
SOS Call ...................................................................................................................................... 22
6.1
Getting the Shared SOSCallOperator Instance .................................................................. 22
6.2
Register/unRegister delegate for Getting Result from Remote Device .............................. 22
6.3
Setting Contact to Remote Device ..................................................................................... 23
6.4
Setting Contact Name to Remote Device ........................................................................... 23
6.5
Setting Phone Number to Remote Device ......................................................................... 24
6.6
Retrieve Contact Info which already exist at remote device .............................................. 24
6.7
Delete Contact from Remote Device .................................................................................. 24
6.8
Retrieve Call Mode from remote device ............................................................................. 25
6.9
Set Call Mode to Remote Device ....................................................................................... 25
6.10
Retrieve Repeat Times from Remote Device ..................................................................... 25
6.11
Set Repeat Times to Remote Device ................................................................................. 26
6.12
SOSCallDataDelegate ........................................................................................................ 26
6.12.1
Indication from Remote device after Connected ................................................ 26
6.12.2
Getting Read Contact Info Result ...................................................................... 27
6.12.3
Getting Read Call Mode Result .......................................................................... 27
6.12.4
Getting Read Repeat Times Result ................................................................... 28
6.12.5
Getting Writing Result ........................................................................................ 28
7
DOGP ........................................................................................................................................... 30
7.1
Initialization ......................................................................................................................... 30
7.2
Set Tags ............................................................................................................................. 30
7.3
Sending Data ...................................................................................................................... 31
7.4
Receiving Data ................................................................................................................... 31
7.5
Getting Sending Progress .................................................................................................. 31
8
FOTA ............................................................................................................................................ 33
8.1
Overview ............................................................................................................................. 33
8.1.1
FotaOperator ...................................................................................................... 33
8.1.2
FotaVersion ........................................................................................................ 33
8.1.3
FotaDelegate ...................................................................................................... 33
8.2
FotaOperator ...................................................................................................................... 33
8.2.1
+(id)sharedInstance ........................................................................................... 33
8.2.2
–(void)registerFotaDelegate: (id<FotaDelegate>)delegate; .............................. 34
8.2.3
–(void)unregisterFotaDelegate: (id<FotaDelegate>)delegate; .......................... 34
8.2.4
–(void)sendFotaTypeCheckCommand; ............................................................. 34
8.2.5
–(BOOL)sendFotaVersionGetCommand: (int)whichType; ................................. 34
8.2.6
–(BOOL)sendFotaFirmwareData: (int)whichType dataFromFile: (NSData*)data;35
MTXXXX
Chip Name
Internal Use
MediaTek Confidential © 2015 MediaTek Inc. Page 5 of 42
This document contains information that is proprietary to MediaTek Inc.
Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.
8.3
FotaVersion ........................................................................................................................ 35
8.4
FotaDelegate ...................................................................................................................... 35
8.4.1
–(void)onFotaTypeReceived: (int)fotaType; ....................................................... 35
8.4.2
–(void)onVersionReceived: (FotaVersion*)version; ........................................... 36
8.4.3
– (void)onStatusReceived: (int)status; ............................................................... 36
8.4.4
–(void)onConnectionStateChange: (int)newState; ............................................. 36
8.4.5
–(void)onPorgress: (int)progress; ....................................................................... 37
8.5
FOTA Operation Sample Sequence ................................................................................... 37
9
VXP Install ................................................................................................................................... 38
9.1
Overview ............................................................................................................................. 38
9.1.1
VxpOperator ....................................................................................................... 38
9.1.2
RemoteVxpInformation....................................................................................... 38
9.1.3
VxpChangeListener ............................................................................................ 38
9.2
VxpOperator ....................................................................................................................... 38
9.2.1
+(id)getInstance; ................................................................................................ 38
9.2.2
-(void)registerChangeListener:(id<VxpChangeListener>)listener; ..................... 38
9.2.3
-(void)unregisterChangeListener:(id<VxpChangeListener>)listener; ................. 39
9.2.4
-(void)installVxp:(NSString*)vxpName vxpFileData:(NSData*)data
vxpType:(int)type; ............................................................................................... 39
9.2.5
-(void)uninstallVxp:(NSString*)vxpName; .......................................................... 39
9.2.6
-(void)uninstallAllVxp; ......................................................................................... 40
9.2.7
-(void)getVxpInstallStatus:(NSArray*)vxpNameList; .......................................... 40
9.2.8
-(void)deleteVxp:(NSString*)vxpName; .............................................................. 40
9.2.9
-(void)getAllVxpInformation; ............................................................................... 40
9.3
RemoteVxpInformation ....................................................................................................... 41
9.4
VxpChangeListener ............................................................................................................ 41
9.4.1
-(void)notifyConnectionStateChange:(int)connectionState ................................ 41
9.4.2
-(void)notifyInstallResult:(BOOL)result vxpName: (NSString*)name
errorCode:(int)code; ........................................................................................... 41
9.4.3
-(void)notifyUninstallResult:(BOOL)result vxpName: (NSString*)name
errorCode:(int)code; ........................................................................................... 41
9.4.4
-(void)notifyUninstallAllResult:(BOOL)result; ..................................................... 42
9.4.5
-(void)notifyDeleteResult:(BOOL)result vxpName:(NSString*)name; ................ 42
9.4.6
-(void)notifyProgressChange:(int)progress; ....................................................... 42
9.4.7
-(void)notifyVxpList:(NSArray*)vxpList resultList:(NSArray*)results; ................. 42
9.4.8
-(void)notifyAllVxpInformation:(NSArray*)results; .............................................. 42