AjithKP
MediaTekLabs
How to develop advanced
smart home applications
using MediaTek LinkIt™
7688
What’s there in the Box ?
2
• LinkIt Smart 7688 Introduction
• Hardware Development Kit
• Software Development Tools
• Demo
• Peripheral Programming
• Demo
• Q & A
MediaTek Labs™
ADeveloper Centric Ecosystem
▪ Free global program
▪ One Stop Solution
▪ Supporting developers:
• Device creation
• App development
▪ labs.mediatek.com
Enabling Developer & Maker Success
labs.mediatek.com SDKs Technical docs HDKs
Discussion Forums,
FAQ & Dev Support
Newsletter Solutions
Catalog
Partner
Connect
4
What is MediaTek LinkIt™ Smart 7688 ?
5
▪ Open source WiFi platform
▪ Runs Openwrt Linux
▪ Two versions of HDKs
▪ Multiple Programming Options
What you can do with 7688 ?
6
MediaTek LinkIt™ Smart 7688 Platform
7
SOC :MT7688AN
Highly Integrated
compact SOC for IoT
Devices with WiFi
connectivity
SDTs: LinkIt Smart 7688
• OpenWRT
• Python & Node.JS
• Board support
package for Arduino IDE
HDKs : LinkIt Smart 7688
• LinkIt Smart 7688 with
MT7688 MPU
• LinkIt Smart 7688 Duo
with MT7688 MPU + MCU
MEDIATEK LINKIT™ SMART 7688 PLATFORM :
SOC 7688AN DETAILS
8
LinkIt Smart 7688 :
SOC MT7688AN
9
▪ 1T1R 802.11 b/g/n Wi-Fi radio
▪ 580MHz MIPS 24KEc CPU
▪ RAM: 128MB DDR2
▪ Flash: 32MB
▪ USB2.0 host, SD-XC, I2S/PCM, I2C, PWM, UART, GPIO, SPI, SPI-
slave
▪ eMMC, PCIe are also supported in MT7688 SoC
▪ Max RAM/Flash supported in MT7688 is
▪ RAM: 256MB
▪ Flash: 64MB
MEDIATEK
MT7688AN
MEDIATEK LINKIT™ SMART 7688 PLATFORM :
Hardware Development Kit ( HDK)
10
LinkIt Smart 7688 : HDK
11
LinkIt Smart 7688 Duo LinkIt Smart 7688
Two type of HDKs : LinkIt Smart 7688 and LinkIt Smart 7688 Duo
12
LinkItSmart7688
• MT7688
• 128MB DDR2
• 32MB Flash
• Chip Antenna (default)
• IPEX Ext Antenna
• microSD
• USB Host
• JTAG
13
LinkItSmart7688Duo
• MT7688 + ATmega32U4
• 128MB DDR2
• 32MB Flash
• Chip Antenna (default)
• IPEX Ext Antenna
• microSD
• USB Host
• JTAG
MEDIATEK LINKIT™ SMART 7688 PLATFORM :
Software Development Tools ( SDT)
14
LinkIt Smart 7688 SDTs
15
LinkIt Smart 7688 Platform runs OpenWrt
(Chaos Calmer) Linux OS & loaded with range
of packages to enable the development of IoT
device software
You can create applications using
Duo only
16
▪ OpenWrt (Chaos Calmer)
• Built-in OPKG
▪ SSH
▪ Python
▪ Node.js
▪ Firmata
▪ Bridge (from Arduino Yun)
▪ Libmraa (also UPM)
▪ OpenSSL (w/ TLS 1.2)
▪ mDNS
▪ AVRdude (Arduino ICSP)
▪ UVC Webcam support
▪ git
▪ Samba
Software Specification
• BSP related
▪ Ethernet, USB, I2C, UART, GPIO, SPI driver verification
▪ Pin configuration based on HW definition
▪ GPIO control for bypass Bootstrap-pin (LinkIt Smart 7688)
▪ Reset Button Behavior
▪ Wi-Fi Status indicator
▪ Linux Console on UART2
▪ Firmware upgrade by USB (in boot loader)
▪ PWM, I2S driver
▪ Mac80211 Wi-Fi Open source driver (under development)
▪ Will use WCN binary Wi-Fi driver currently
• Setups
▪ Web UI for Initial Setup (Customized UI)
▪ AP Configure File
▪ Pre-defined MenuConfig for required features
▪ Arduino IDE SSH flashing
OpenWrt
▪ Linux distribution focus on embedded devices
• Started from 2004
• Typically wireless router
• Full-featured, easily modifiable OS for routers
▪ A framework to build network applications
• Free from the restriction and configuration
provided by the vendor
17
Supported Programming Language
18
Language Tools & Libraries Applications Host Platform
C/C++ Cross
Compilation Tool
Chain
• System Programming • OS X
• Linux
Python Python runtime
on Linkit Smart
7688
• Prototyping
• Network
• IoT application
• OS X
• Linux
• Windows
Node.js Node.js runtime
on LinkIt Smart
7688
• Prototyping
• Network
• IoT application
• OS X
• Linux
• Windows
Demo
▪ Connect to LinkIt Smart 7688 AP
▪ Log in using WebUI
▪ Login using Putty
▪ Login & transfer file using SCP Tool
▪ Show Openwrt
▪ OPKG Packages
▪ Change to station mode to access Internet
19
MEDIATEK LINKIT™ SMART 7688 PLATFORM :
Peripheral Programming
20
21
Wi-Fi
MT7688
Hardware
Sensors
USB Device/SD
Peripheral Connections in LinkIt
Smart 7688
OpenWrt
LinkIt Smart 7688 : Hardware Architecture
22
Software
libmraa
Python Node.js
UPM
App Logic
OpenWrt
Sensors
C
How can I access sensors from LinkIt
Smart 7688 ?
libmraa: C/C++ library with bindings
to JavaScript & Python for I/O
interface in Linux
UPM : A set of sensor drivers written
in libmraa
23
Basic concepts of MRAA
In MRAA, hardware modules such as GPIO, UART, SPI, and PWM are represented as objects
Libmraa is a C/C++ library to interface with the peripheral on LinkIt Smart 7688
import mraa
pin = mraa.Gpio(44)
pin.dir(mraa.DIR_OUT)
pin.write(1)
Import mraa
pin = mraa.Pwm(18)
pin.period_ms(2)
pin.enable(True)
pin.write(0.25) # set duty cycle
import mraa
i2c = mraa.I2c(0)
i2c.address(0x53)
if 0xE5 == i2c.readReg(0x00):
print "Grove - 3-Axis Digital Accelerometer found on I2C Bus"
else:
print "Grove - 3-Axis Digital Accelerometer not found"
GPIO PWM
I2C
Demo
▪ Login to 7688 using Putty
▪ Connect to LinkIt Smart 7688
▪ Code walk through mraa python examples
• Simple blink using mraa
• Accelerometer eg using UPM
▪ Code walk through Node.js
▪ Control LED from MCS
24
25
Peripheral Connections in LinkIt
Smart 7688 Duo
MT7688
ATMega32U4
UART
USB Device/SD
Sensors
Wi-Fi
Hardware
OpenWrt
Arduino
LinkIt Smart 7688 Duo : Hardware Architecture
26
How can I access sensors from LinkIt
Smart 7688 Duo ?
3 Programming Models
for LinkIt Smart Duo
Primitive UART
Connection
Firmata Protocol
Arduino Yun Bridge
Library
Peripheral Programming : Option-1
27
Software
Python Node.js
UART port
Sensor Drivers
UART Library
App Logic
OpenWrt
Arduino
Sensors
C
28
Software
Firmata
Python Node.js
Sensors
Firmata
App Logic
OpenWrt
Arduino
C
Peripheral Programming : Option-2
29
Software
Sensors
Bridge Library
Sensor Drivers
Bridge Library
App Logic
(MPU provides Wi-Fi & USB Host / SD)
OpenWrt
Arduino
Peripheral Programming : Option-3
Summary:LinkItSmart7688VsDuo
Python Node.js
Sensors
Firmata
Python Node.js
Sensors
UART port
Sensor Drivers
UART Library
App Logic App Logic
Sensors
Bridge Library
Sensor Drivers
Bridge Library
App Logic
(MPU provides Wi-Fi & USB Host)
libmraa
Python
Node.j
s
upm
Sensors
App Logic
Sensors
USB Device/SD
LinkIt Smart 7688
Wi-Fi
MT7688 MT7688
ATMega32U4
UART
USB Device/SD
Sensors
LinkIt Smart 7688 Duo
OpenWrt OpenWrt OpenWrt
OpenWrt
Arduino Arduino Arduino
Hardware
Wi-Fi
Software
MPU (MT7688) with OpenWrt as Host MCU (ATmega32U4) with Arduino as Host
Linux Developers
Arduino Developers
(default)
C C C
Firmata
Demo
▪ Login to 7688 using Putty
▪ Start camera app
▪ Show 3 scenarios with Duo
▪ Upload Arduino Firmata Sketch
▪ Run python code in Linux side and communicate with Arduino
▪ Run Node.js and control lights using browser high/low
31
580
Mhz
CPU
128MB
RAM
Bread
Board
FF
Python
Node.j
s
32MB
FLASH
USB
HOST
& SD-
XC
RICH
I/O
Interfa
ceFully
Open
source
LinkIt Smart 7688 Advantages
Target Audience
33
IoT Gateway Device Developers
OpenWRT Community
Python Developers
Node.Js Developers
Robotics Community
Arduino Yun Community
LinkIt Smart 7688 Testimonials
34
“I have recently decided to learn embedded Linux, and have bought
over 14 different development kits. Though they all run Linux, they all
have their pros and cons. So far out of all of them I have liked the
MediaTek LinkIt Smart 7688 the best,”
Mike Moy, Sr. Design Engineer, Versamodule.com
How can I get it ?
35
Online Order : http://www.seeed.cc/linkit_smart_7688/
Needmoreinfo ?
 Documentation
• Get Started Guides
• Developer’s Guides
• Tutorials & Forums
• HDK information
 Datasheet
 Schematic
 Layout
 Pin-out Diagram
 Toolchains
 Bootloader
• Source codes hosted on
Labs’ repository
 Firmware
• Source codes hosted on
OpenWrt.org
36
labs.mediatek.com
Questions?
37
Download Resources:
labs.mediatek.com/7688
MediaTek Cloud Sandbox:
labs.mediatek.com/mcs
Check the Forum:
labs.mediatek.com/forums
Copyright © MediaTek Inc. All rights reserved.
38
QUESTIONS…?
39

MediaTek Linkit Smart 7688 Webinar

  • 1.
    AjithKP MediaTekLabs How to developadvanced smart home applications using MediaTek LinkIt™ 7688
  • 2.
    What’s there inthe Box ? 2 • LinkIt Smart 7688 Introduction • Hardware Development Kit • Software Development Tools • Demo • Peripheral Programming • Demo • Q & A
  • 3.
    MediaTek Labs™ ADeveloper CentricEcosystem ▪ Free global program ▪ One Stop Solution ▪ Supporting developers: • Device creation • App development ▪ labs.mediatek.com
  • 4.
    Enabling Developer &Maker Success labs.mediatek.com SDKs Technical docs HDKs Discussion Forums, FAQ & Dev Support Newsletter Solutions Catalog Partner Connect 4
  • 5.
    What is MediaTekLinkIt™ Smart 7688 ? 5 ▪ Open source WiFi platform ▪ Runs Openwrt Linux ▪ Two versions of HDKs ▪ Multiple Programming Options
  • 6.
    What you cando with 7688 ? 6
  • 7.
    MediaTek LinkIt™ Smart7688 Platform 7 SOC :MT7688AN Highly Integrated compact SOC for IoT Devices with WiFi connectivity SDTs: LinkIt Smart 7688 • OpenWRT • Python & Node.JS • Board support package for Arduino IDE HDKs : LinkIt Smart 7688 • LinkIt Smart 7688 with MT7688 MPU • LinkIt Smart 7688 Duo with MT7688 MPU + MCU
  • 8.
    MEDIATEK LINKIT™ SMART7688 PLATFORM : SOC 7688AN DETAILS 8
  • 9.
    LinkIt Smart 7688: SOC MT7688AN 9 ▪ 1T1R 802.11 b/g/n Wi-Fi radio ▪ 580MHz MIPS 24KEc CPU ▪ RAM: 128MB DDR2 ▪ Flash: 32MB ▪ USB2.0 host, SD-XC, I2S/PCM, I2C, PWM, UART, GPIO, SPI, SPI- slave ▪ eMMC, PCIe are also supported in MT7688 SoC ▪ Max RAM/Flash supported in MT7688 is ▪ RAM: 256MB ▪ Flash: 64MB MEDIATEK MT7688AN
  • 10.
    MEDIATEK LINKIT™ SMART7688 PLATFORM : Hardware Development Kit ( HDK) 10
  • 11.
    LinkIt Smart 7688: HDK 11 LinkIt Smart 7688 Duo LinkIt Smart 7688 Two type of HDKs : LinkIt Smart 7688 and LinkIt Smart 7688 Duo
  • 12.
    12 LinkItSmart7688 • MT7688 • 128MBDDR2 • 32MB Flash • Chip Antenna (default) • IPEX Ext Antenna • microSD • USB Host • JTAG
  • 13.
    13 LinkItSmart7688Duo • MT7688 +ATmega32U4 • 128MB DDR2 • 32MB Flash • Chip Antenna (default) • IPEX Ext Antenna • microSD • USB Host • JTAG
  • 14.
    MEDIATEK LINKIT™ SMART7688 PLATFORM : Software Development Tools ( SDT) 14
  • 15.
    LinkIt Smart 7688SDTs 15 LinkIt Smart 7688 Platform runs OpenWrt (Chaos Calmer) Linux OS & loaded with range of packages to enable the development of IoT device software You can create applications using Duo only
  • 16.
    16 ▪ OpenWrt (ChaosCalmer) • Built-in OPKG ▪ SSH ▪ Python ▪ Node.js ▪ Firmata ▪ Bridge (from Arduino Yun) ▪ Libmraa (also UPM) ▪ OpenSSL (w/ TLS 1.2) ▪ mDNS ▪ AVRdude (Arduino ICSP) ▪ UVC Webcam support ▪ git ▪ Samba Software Specification • BSP related ▪ Ethernet, USB, I2C, UART, GPIO, SPI driver verification ▪ Pin configuration based on HW definition ▪ GPIO control for bypass Bootstrap-pin (LinkIt Smart 7688) ▪ Reset Button Behavior ▪ Wi-Fi Status indicator ▪ Linux Console on UART2 ▪ Firmware upgrade by USB (in boot loader) ▪ PWM, I2S driver ▪ Mac80211 Wi-Fi Open source driver (under development) ▪ Will use WCN binary Wi-Fi driver currently • Setups ▪ Web UI for Initial Setup (Customized UI) ▪ AP Configure File ▪ Pre-defined MenuConfig for required features ▪ Arduino IDE SSH flashing
  • 17.
    OpenWrt ▪ Linux distributionfocus on embedded devices • Started from 2004 • Typically wireless router • Full-featured, easily modifiable OS for routers ▪ A framework to build network applications • Free from the restriction and configuration provided by the vendor 17
  • 18.
    Supported Programming Language 18 LanguageTools & Libraries Applications Host Platform C/C++ Cross Compilation Tool Chain • System Programming • OS X • Linux Python Python runtime on Linkit Smart 7688 • Prototyping • Network • IoT application • OS X • Linux • Windows Node.js Node.js runtime on LinkIt Smart 7688 • Prototyping • Network • IoT application • OS X • Linux • Windows
  • 19.
    Demo ▪ Connect toLinkIt Smart 7688 AP ▪ Log in using WebUI ▪ Login using Putty ▪ Login & transfer file using SCP Tool ▪ Show Openwrt ▪ OPKG Packages ▪ Change to station mode to access Internet 19
  • 20.
    MEDIATEK LINKIT™ SMART7688 PLATFORM : Peripheral Programming 20
  • 21.
    21 Wi-Fi MT7688 Hardware Sensors USB Device/SD Peripheral Connectionsin LinkIt Smart 7688 OpenWrt LinkIt Smart 7688 : Hardware Architecture
  • 22.
    22 Software libmraa Python Node.js UPM App Logic OpenWrt Sensors C Howcan I access sensors from LinkIt Smart 7688 ? libmraa: C/C++ library with bindings to JavaScript & Python for I/O interface in Linux UPM : A set of sensor drivers written in libmraa
  • 23.
    23 Basic concepts ofMRAA In MRAA, hardware modules such as GPIO, UART, SPI, and PWM are represented as objects Libmraa is a C/C++ library to interface with the peripheral on LinkIt Smart 7688 import mraa pin = mraa.Gpio(44) pin.dir(mraa.DIR_OUT) pin.write(1) Import mraa pin = mraa.Pwm(18) pin.period_ms(2) pin.enable(True) pin.write(0.25) # set duty cycle import mraa i2c = mraa.I2c(0) i2c.address(0x53) if 0xE5 == i2c.readReg(0x00): print "Grove - 3-Axis Digital Accelerometer found on I2C Bus" else: print "Grove - 3-Axis Digital Accelerometer not found" GPIO PWM I2C
  • 24.
    Demo ▪ Login to7688 using Putty ▪ Connect to LinkIt Smart 7688 ▪ Code walk through mraa python examples • Simple blink using mraa • Accelerometer eg using UPM ▪ Code walk through Node.js ▪ Control LED from MCS 24
  • 25.
    25 Peripheral Connections inLinkIt Smart 7688 Duo MT7688 ATMega32U4 UART USB Device/SD Sensors Wi-Fi Hardware OpenWrt Arduino LinkIt Smart 7688 Duo : Hardware Architecture
  • 26.
    26 How can Iaccess sensors from LinkIt Smart 7688 Duo ? 3 Programming Models for LinkIt Smart Duo Primitive UART Connection Firmata Protocol Arduino Yun Bridge Library
  • 27.
    Peripheral Programming :Option-1 27 Software Python Node.js UART port Sensor Drivers UART Library App Logic OpenWrt Arduino Sensors C
  • 28.
  • 29.
    29 Software Sensors Bridge Library Sensor Drivers BridgeLibrary App Logic (MPU provides Wi-Fi & USB Host / SD) OpenWrt Arduino Peripheral Programming : Option-3
  • 30.
    Summary:LinkItSmart7688VsDuo Python Node.js Sensors Firmata Python Node.js Sensors UARTport Sensor Drivers UART Library App Logic App Logic Sensors Bridge Library Sensor Drivers Bridge Library App Logic (MPU provides Wi-Fi & USB Host) libmraa Python Node.j s upm Sensors App Logic Sensors USB Device/SD LinkIt Smart 7688 Wi-Fi MT7688 MT7688 ATMega32U4 UART USB Device/SD Sensors LinkIt Smart 7688 Duo OpenWrt OpenWrt OpenWrt OpenWrt Arduino Arduino Arduino Hardware Wi-Fi Software MPU (MT7688) with OpenWrt as Host MCU (ATmega32U4) with Arduino as Host Linux Developers Arduino Developers (default) C C C Firmata
  • 31.
    Demo ▪ Login to7688 using Putty ▪ Start camera app ▪ Show 3 scenarios with Duo ▪ Upload Arduino Firmata Sketch ▪ Run python code in Linux side and communicate with Arduino ▪ Run Node.js and control lights using browser high/low 31
  • 32.
  • 33.
    Target Audience 33 IoT GatewayDevice Developers OpenWRT Community Python Developers Node.Js Developers Robotics Community Arduino Yun Community
  • 34.
    LinkIt Smart 7688Testimonials 34 “I have recently decided to learn embedded Linux, and have bought over 14 different development kits. Though they all run Linux, they all have their pros and cons. So far out of all of them I have liked the MediaTek LinkIt Smart 7688 the best,” Mike Moy, Sr. Design Engineer, Versamodule.com
  • 35.
    How can Iget it ? 35 Online Order : http://www.seeed.cc/linkit_smart_7688/
  • 36.
    Needmoreinfo ?  Documentation •Get Started Guides • Developer’s Guides • Tutorials & Forums • HDK information  Datasheet  Schematic  Layout  Pin-out Diagram  Toolchains  Bootloader • Source codes hosted on Labs’ repository  Firmware • Source codes hosted on OpenWrt.org 36 labs.mediatek.com
  • 37.
    Questions? 37 Download Resources: labs.mediatek.com/7688 MediaTek CloudSandbox: labs.mediatek.com/mcs Check the Forum: labs.mediatek.com/forums
  • 38.
    Copyright © MediaTekInc. All rights reserved. 38
  • 39.