© 2015 MediaTek Inc.
This document contains information that is proprietary to MediaTek Inc.
Unauthorized reproduction of this information in whole or in part is strictly prohibited.
MediaTek LinkIt™ Assist 2502 Developer's
Guide
Version: 1.1
Release date: 17 June 2015
Specifications are subject to change without notice.
MediaTek LinkIt™ Assist 2502 Developer's Guide
© 2014, 2015 MediaTek Inc.
Page i of v
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
Description
1.0 9 April 2015 Initial release
1.1 17 June Update for board availability
MediaTek LinkIt™ Assist 2502 Developer's Guide
© 2014, 2015 MediaTek Inc.
Page ii of v
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
1.
Introduction ...................................................................................................................................................... 1
1.1. What is MediaTek LinkIt? ................................................................................................................................. 1
1.2. MediaTek LinkIt Assist 2502 development platform ........................................................................ 2
1.3. Related development platforms ............................................................................................................... 11
1.4. Joining the MediaTek Labs Ecosystem....................................................................................................12
2.
Getting started ............................................................................................................................................. 13
2.1. Environment ........................................................................................................................................................13
2.2. Installing Eclipse IDE for C/C++ Developers .........................................................................................13
2.3. Installing LinkIt Assist 2502 SDK 2.0 ........................................................................................................13
2.4. Updating the Firmware ................................................................................................................................... 17
2.5. Creating Your First Project ........................................................................................................................... 19
2.6. Compiling and Uploading to Hardware .................................................................................................. 22
2.7. Running your Project ...................................................................................................................................... 23
2.8. Using the example applications ................................................................................................................ 23
2.9. Using the LinkIt Toolbar ............................................................................................................................... 26
3.
Troubleshooting ..........................................................................................................................................32
3.1. The LinkIt Assist 2502 development board fails to powerup after attaching the USB
cable........................................................................................................................................................................ 32
3.2. VXP Fails to Upload ......................................................................................................................................... 32
3.3. Wi-Fi AP Doesn’t Display After Scanning .............................................................................................. 32
3.4. GSM Function Isn’t Working.........................................................................................................................33
3.5. GPRS Function Isn’t Working.......................................................................................................................33
4.
Programming Guide ....................................................................................................................................33
4.1. Bootup procedure.............................................................................................................................................33
4.2. LinkIt Assist 2502 Application Entry and Exit Point .........................................................................35
4.3. Event-driven Programming Model ...........................................................................................................35
4.4. Threads ................................................................................................................................................................. 36
4.5. Memory Layout of a LinkIt Assist 2502 Application ........................................................................ 36
4.6. Log and Command .......................................................................................................................................... 38
4.7. Hardware Peripheral and Driver Functions ......................................................................................... 38
4.8. Application Resource ..................................................................................................................................... 40
4.9. Power Management ....................................................................................................................................... 44
4.10. Porting Arduino Sketches and Drivers ................................................................................................... 44
5.
API Guide ........................................................................................................................................................ 49
5.1. Basic Types ......................................................................................................................................................... 49
5.2. Return Values .................................................................................................................................................... 49
5.3. Log .......................................................................................................................................................................... 50
5.4. Command ............................................................................................................................................................ 50
5.5. Standard Library ................................................................................................................................................ 51
5.6. Tags ........................................................................................................................................................................ 56
5.7. Resource ............................................................................................................................................................... 57
5.8. Process Control ................................................................................................................................................ 58
5.9. Firmware .............................................................................................................................................................. 58
5.10. Driver API ............................................................................................................................................................. 58
5.11. Network ................................................................................................................................................................ 62
5.12. Wi-Fi ....................................................................................................................................................................... 66
5.13. GSM ......................................................................................................................................................................... 67
5.14. Bluetooth ............................................................................................................................................................ 69
5.15. Audio ........................................................................................................................................................................ 71
MediaTek LinkIt™ Assist 2502 Developer's Guide
© 2014, 2015 MediaTek Inc.
Page iii of v
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.16. GNSS ....................................................................................................................................................................... 72
5.17. Graphics................................................................................................................................................................. 73
5.18. VXP and Firmware Update ........................................................................................................................... 74
5.19. Smartphone Notification .............................................................................................................................. 75
MediaTek LinkIt™ Assist 2502 Developer's Guide
© 2014, 2015 MediaTek Inc.
Page iv of v
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.
Lists of tables and figures
Table 1 Specification of the LinkIt Assist 2502 development board .................................................................. 6
Table 2 Comparison of the LinkIt ONE and Assist 2502 development boards.............................................. 7
Table 3 Summary of LinkIt 2502 API modules .............................................................................................................. 8
Table 4 The functions available to enable and disable hardware components........................................ 44
Table 5 HTTPS callback functions ................................................................................................................................... 66
Figure 1 Wearables and IoT product segments ............................................................................................................. 1
Figure 2 The components of the MediaTek LinkIt Assist 2502 development platform ........................... 2
Figure 3 LinkIt Assist 2502 development board (back view) .................................................................................. 3
Figure 4 LinkIt Assist Development Board (front view) ............................................................................................ 4
Figure 5 Pin-out diagram of the LinkIt Assist 2502 development board ......................................................... 5
Figure 6 The LinkIt Assist 2502 SDK 2.0 installation application ...................................................................... 14
Figure 7 The welcome page of the SDK setup wizard. ............................................................................................ 14
Figure 8 Selecting the folder in which Eclipse IDE is installed ........................................................................... 15
Figure 9 Option to move SDK to a permanent location ......................................................................................... 15
Figure 10 The Ready to Install page of the setup wizard ....................................................................................... 16
Figure 11 Final page of the SDK installer ........................................................................................................................ 16
Figure 12 LinkIt ONE in mass storage mode ................................................................................................................. 17
Figure 13 LinkIt Firmware Updater launch screen ..................................................................................................... 17
Figure 14 The firmware being uploaded to your device .......................................................................................... 18
Figure 15 Firmware Updater Download Complete screen .................................................................................... 18
Figure 16 Creating new LinkIt Assist 2502 application ........................................................................................... 19
Figure 17 Selecting the LinkIt 2.0 application .............................................................................................................. 19
Figure 18 Selecting the right hardware platform ..................................................................................................... 20
Figure 19 LinkIt Assist 2502 libraries ............................................................................................................................... 21
Figure 20 Your First LinkIt Assist 2502 Application ................................................................................................ 22
Figure 21 LinkIt toolbar in Eclipse IDE ............................................................................................................................ 22
Figure 22 Build Application toolbutton in the LinkIt toolbar .............................................................................. 22
Figure 23 LinkIt Console in Eclipse .................................................................................................................................. 23
Figure 24 Selecting LinkIt Assist 2502 example code ........................................................................................... 24
Figure 25 Creating a new LinkIt Assist 2502 application ...................................................................................... 25
Figure 26 LinkIt example code list ................................................................................................................................... 26
Figure 27 Application Settings toolbutton ...................................................................................................................27
Figure 28 Project information window ...........................................................................................................................27
Figure 29 The Build Application toolbutton ............................................................................................................... 28
Figure 30 The Resource Editor toolbutton ................................................................................................................. 28
Figure 31 Monitor Icon............................................................................................................................................................ 28
Figure 32 Monitor Tool .......................................................................................................................................................... 28
Figure 33 Device Manager COM port .............................................................................................................................. 29