MT7697 API Reference  LinkIt SDK v4
Introduction

Overview

MediaTek LinkItâ„¢ Development Platform for RTOS provides a comprehensive software solution for devices based on the MediaTek MT7697 SOC, including the MT7697 hardware development kit (HDK). The platform supports hardware abstraction layers, peripheral drivers, FreeRTOS, Wi-Fi, light weight IP (lwIP) and Bluetooth Low Energy modules. This API reference describes the features of and how to use the APIs for each of the supported modules. Each module has a readme.txt under the module root directory. It contains the information about the module dependency, feature options, notes and brief introduction. Please refer to the readme.txt to learn the basic usage of the module.


Architecture

LinkItâ„¢ SDK for RTOS consists of several software modules, as shown below:

MT7697_SDK_architecture.PNG

There are three layers for the architecture:

  • Drivers
    • Hardware drivers provide peripheral drivers for the development platform, such as ADC, I2S, I2C, SPI, RTC, GPIO, UART, Flash, Security Engine, TRNG, GDMA, PWM, WTD and IRDA TX/RX.
    • Hardware Abstraction Layer (HAL) provides driver Application Programming Interface (API) encapsulating low-level functions of peripheral drivers for the operating system (OS), middleware features and applications.
    • FreeRTOS provides real-time OS with open source software for middleware features and projects.
  • Middleware
    • Wi-Fi provides OS dependent function calls, including Wi-Fi APIs that control the bridge supplicant and network processor messages.
    • BLE provides stack and protocol-layer access profiles for data transfer and management control, such as Generic Access Profile (GAP), Generic Attribute Profile (GATT) and Security Manager(SM).
    • Network provides OS dependent features, such as IPv4, Hyper-Text Transfer Protocol (HTTP) client and the Simple Network Time Protocol (SNTP).
    • Other features include Non-Volatile Random Access Memory (NVRAM), JavaScript Object Notation (JSON) and other features that are dependent on HAL and the OS.
  • Example project
    • Pre-configured projects, such as Wi-Fi station and Wi-Fi access point.

Major Features

The SDK supports the following features when used with the LinkIt 7697 HDK or devices based on the MT7697:

  • Wi-Fi
    Supports station and Access Point (AP) modes released as a single library.
    Wi-Fi station mode features are listed below:
    Item Features
    Standard 802.11 b/g/n station
    Channel Channels 1~13
    Personal Security Open, WEP-Open, WPA, WPA2
    Enterprise Security N/A
    Advanced AMPDU, Rx-Filter, DTIM
    Wi-Fi AP mode features are listed below:
    Item Features
    Standard 802.11 b/g/n Soft AP
    Channel Channels 1~13
    Personal Security Open, WEP-Open, WPA, WPA2
    Enterprise Security N/A
    Support Clients 9 STAs (AP only mode)
    .
  • Network
    Includes IPv4, TCP and HTTP protocol support, as shown below.
    Item Features
    IP Stack IPv4 (lwIP), TCP, UDP, ICMP, DHCP Client/Server, NETCONN, SOCKET
    SNTP Simple Network Time Protocol, RFC4330
    HTTP HTTP 1.1, Client
    HTTPS HTTP 1.1, Client
    SSL/TLS mbedTLS, Server/Client, SSL 3.0, TLS 1.0/1.1/1.2
    .
  • BLE
    Bluetooth Low Energy is one of the key features of the LinkIt SDK, including Generic Attribute Profile (GATT) server and GATT client. It it released as a single library.
    Bluetooth Low Energy features are listed as below:
    Item Features
    Standard Bluetooth 4.1
    GATT GATT Server and GATT client
    Maximum Links 4 for Master and/or Slave
    Advanced Background Scan and/or Advertisement
    .
  • HAL
    Provides convenient and advanced APIs based on low-level functions of the peripheral drivers. These APIs can interact with upper layers, such as middleware and the OS.
  • Other features
    The SDK also provides utilities, such as XML supporting Entity, Index, Search, JSON supporting string parser.

Folder Structure

The folder structure of the LinkIt SDK is shown below:

SDK_folder_structure.PNG

The details of the folder contents:

  • doc
    • The platform related documentation, such as getting started and module development guides.
  • driver
    • board. Includes drivers associated with the board, such as capacitive touch panel and the LCD.
    • chip. Includes common drivers for the modules associated with the chip, such as UART and I2C.
    • CMSIS. Includes Cortex Microcontroller Software Interface Standard (CMSIS-CORE).
  • kernel
    • rtos. Includes third party open source FreeRTOS.
    • service. Includes system service, such as the system log and exception handler.
  • middleware
    • Includes the network features, such as lwIP and SNTP.
    • Includes advanced features, such XML and cJSON.
  • project
    • The SDK includes example projects with pre-configured module features.
  • tools
    • gcc. Includes GCC compiler.

Terms and acronyms

Terms Details
FOTA Firmware Over-The-Air (FOTA) is a Mobile Software Management technology in which the operating firmware of a mobile device is wirelessly upgraded and updated by its manufacturer. Please refer to FOTA in Techopedia.
HAL Hardware Abstraction Layer, to guarantee the uniform SDK API for the different hardware and the different chips.
NVRAM Non-volatile RAM Access Memory, is random-access memory that retains its information when power is turned off(non-volatile).
HOSTAPD Host Access Point Daemon, is a user space software access point capable of turning normal network interface cards into access points and authentication servers.
GAP Generic Access Profile (GAP), provides the basis for all other profiles. GAP defines how two Bluetooth units discover and establish a connection with each other. Please refer to GAP in Wikipedia.
GATT Generic Attribute Profile (GATT), provides profile discovery and description services for Bluetooth Low Energy protocol. It defines how ATT attributes are grouped together into sets to form services. Please refer to GATT in Wikipedia.
SM The SMP (Security Manager Protocol) The security manager defines the procedures for pairing, authentication, and encryption between LE devices. Please refer to SM introduction in artechhouse.

License

Copyright Statement:

(C) 2005-2016 MediaTek Inc. All rights reserved.

This software/firmware and related documentation ("MediaTek Software") are protected under relevant copyright laws. The information contained herein is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors. Without the prior written permission of MediaTek and/or its licensors, any reproduction, modification, use or disclosure of MediaTek Software, and information contained herein, in whole or in part, shall be strictly prohibited. You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software if you have agreed to and been bound by the applicable license agreement with MediaTek ("License Agreement") and been granted explicit permission to do so within the License Agreement ("Permitted User"). If you are not a Permitted User, please cease any access or use of MediaTek Software immediately. BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.