Quick Start Guide for LinkIt Smart 7688 (Duo) Board

Mediatek Labs has announced LinkIt Smart 7688 development boards powered by Mediatek MT7688 WiSoC earlier today, but I was selected for a close beta several weeks before the launch, and I’ve had time to play a little with the boards, so today I’ll report my experience getting started with LinkIt Smart 7688 amd 7688 Duo by writing a Quick Start Guide showing how to setup the boards, upgrade firmware, access the serial console, run “Blink LED” sample applications with Python and JavaScript, as well as the Arduino IDE, and connect to the Internet.

Initial Setup

You’ll only need a micro USB cable and a computer with WiFi and USB ports to get started with the board. The green LED (top) for the MCU will turn on immediately, while the red LED (bottom) for WiFI will blink once, and only turn on continuously after 5 seconds, and within 30 seconds after that you should get WiFi connectivity.

LinkIt_Smart_7688_USB_Power

Since you just need a web browser any operating system will do, and at first I used a desktop computer running Ubuntu 14.04 without WiFi (and not working WiFi dongle left), so I wondered if I could access the serial console via the USB connection, and ran dmesg:


The device is recognized as a USB modem, so it was not an option, and instead I fired up my Ubuntu laptop instead. You can still access the serial console over UART with your own USB to serial debug board by connecting TX and Rx to P8 and P9 pins of Smart Link 7688 (DUO) board. I’ll show that a little later in this guide.

The next step is to connect to LinkIt_Smart_7688_XXXXXX access point with your computer, where XXXXXX is your board’s MAC address suffix. Once you’ve connected to this open WiFi network, simply open a web browser, and type mylinkit.local to access LinkIt Smart 7688 webUI and input a root password of your choice.

linkit_smart_7688_setup
Click to Enlarge

This step will work out of the box with Linux, Windows 8.1/10 and Mac OS X operating systems, but you’ll need to install Bonjour Print Service in Windows 7. If you don’t want mDNS, you can also use the default address: 192.168.100.1.

SDK and Firmware Upgrade

Before upgrading the firmware, you’ll need to download the SDK, which Mediatek calls “LinkIt Smart 7688 SDT” from MediaTek Labs website which will contains the bootloader and firmware directories, documentation including a Getting Stated Guide and a developer’s guide, as well as the toolchain.

After signing to the web UI, you should find the “Software information” section where you can see the bootloader and firmware version, and an “Upgrade firmware” button.

Click to Enlarge
Click to Enlarge
Click to Enlarge
Click to Enlarge

Once you click Upgrade Firmware button, you’ll be able to browse for the lks7688.img file in firmware directory of the SDT, and click on Upgrade & Restart to complete the installation.

If for some reasons you can’t access your board anymore, you can also perform the upgrade by copying lks7688.img file to a USB flash drive and connect it via a USB OTG adapter.

LinkIt_Smart_7688_Serial_Console_USB_OTG
LinkIt Smart 7688 Board with USB Flash and USB to TTL Board (Click to Enlarge)

While the board is running, keep pressing the WiFi button, while pressing the MPU button for a short time, and only release the WiFi button after it becomes solid after around 5 seconds, and the firmware update should start with the red WiFi LED blinking slowly until the update is complete (2 to 3 minutes).

Serial Console on LinkIt Smart 7688 (DUO)

If you don’t get any issues, the easiest way to connect to the board is via SSH:


or


But in case you encounter some problems with the configuration, and want to find out what’s going on you’ll need to connect a USB to TTL board as shown in the picture above. You’ll need to connect GND, Tx to P9 pin and Tx to P8 pin, and configure you favorite console program be it minicom, screen or putty to 57600 8N1.

Here’s the full boot log in LinkIt Smart 7688 board:

Running Sample Code in LinkIt Smart 7688

So now that you should have access the terminal either via SSH or UART, you can run some pre-loaded JavaScripts or Python sample in /IOT/examples/ directory:


Let’s blink the WiFi LED with the Python script:


The red LED should blink around twice per second. Press Ctrl+C to interrupt the program. So what’s the code like?


If Python is not your thing, but you’re quite happy coding with JavaScript (node.js), you can blink the LED too:


The program takes a little longer to start, but it works, and the LED blinks once a second. Here’s the code:

Running Sample Code in LinkIt Smart 7688 DUO

If you have a LinkIt Smart 7688 DUO, you’ll have want to install Arduino IDE. I could not perform this step fully, as I had troubles to connect and upgrade the firmware to the beta board. But here are the main steps:

  1. Download and install Arduino 1.6.5
  2. Start Arduino, and go to File->Preferences and add http://download.labs.mediatek.com/package_mtk_linkit_smart_7688_test_index.json to Additional Boards Manager URLs.
    LinkIt_Smart_7688_DUO_Arduino_BSP
  3. Click OK, and go to Tools->Boards->Board Manager, and scroll down to install Mediatek LinkIT Smart Boards by Seeed Studio and MediaTek Labs.

    Click to Enlarge
    Click to Enlarge

  4. Now select LinkIt Smart 7688 Duo in Tools->Boards, and the serial interface for LinkIt Smart 7688 in Tools->Serial. (It was /dev/ttyACM0 with my old firmware)
  5. Write a short sketch to blink D13 LED on the board:
  6. Click on verify, click on upload, but it’s not done yet as you have to run a python program to send command over the serial interface between MediaTek MT7688 and the Atmel AVR MCU. So connect to the board and write blink_on_duo.py Python script using vi / vim:
  7. And now you can blink the LED with the script:

So LinkIt Smart 7688 Duo is more versatile thanks to its MCU, but it takes some efforts to blink a simple LED.

Connecting to the Internet and OpenWRT Configuration

So far we’ve done everything in the local network using the board as an access point, but many application will require some connection to the Internet. To connect your board to your WiFi router login to the webUI again, and select Network.

Mediatek_LinkIt_Smart_7688_AP_Configuration

Now switch to Station mode, and click refresh.Mediatek_LinkIt_Smart_7688_Station_ConfigurationNothing will happen, but if you click again on the zone right above the Refresh button a list of access point will show up. LinkIt_Smart_7688 is listed here, as I had a LinkIt Smart 7688 DUO running at the same time. Select the access point you want to use, input the password, and click on Configure & Restart.

Now make you sure computer is connected to the same access point or at least is one the same subnet, and go again to linkit.local in your browser to access the webUI, or SSH to the board. In my case I had changed the device name to CNXSoft_linkit and neither mylinkit.local or CNXSoft_linkit.local, or cnxsoft_linkit.local would work, so there may still be a bug here… So instead I check the new IP address via the serial terminal: 192.168.0.105 to make sure the connection was fine, but you can do so with your WiFi router client list too. I also pinged the Internet from the serial console:


Success!

If you want more control of your network configuration you can click on OpenWRT in the webUI, or go directly to http://IP_address/cgi-bin/luci to access LuCI’s web interface for OpenWRT.

Click to Enlarge
Click to Enlarge

That concludes this getting started guide for LinkIt Smart 7688 and Linkit Smart 7688 Duo boards, to go further you may want to read LinkIt Smart 7688 Developer’s Guide, and tutorials found in the SDT, and build your own OpenWRT image from source code. You can purchase the LinkIt Smart 7688 and 7688 DUO boards for respectively $12.90 and $15.90 on Seeed Studio.

Support CNX Software - Donate via PayPal or become a Patron on Patreon

3
Leave a Reply

avatar
3 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
Kevin LuMediatek LinkIt Smart 7688 and Smart 7688 DUO Boards Run OpenWRT for IoT Applications Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
trackback

[…] Documentation for both board is pretty extensive with Getting Started Guides, a developer’s guide, tutorials, and information about the HDK (Hardware Developer Kit) , which is simply call “board”, including schematics and PCB layout (PDF only). The company also released the bootloader and firmware binary files, as well as an OpenWRT SDK. The boards support both Linux and OS X for development with C/C++, while Python, and Node.js are also supported on Windows. Arduino IDE is also available for the DUO version, and by default MT7688 MPU and Atmel MCU communicate over UART with applications code on the former, and I/Os and sensors managed by the latter. You can access all these resources on LinkIt Smart 7688 page on MediaTek Labs, with some code also found on Mediatek Labs’ Github account, and Seeed Studio’s Wiki. You could also read my own little Linkit Smart 7688 Getting Started Guide. […]

Kevin Lu
Guest
Kevin Lu

I connected a LinkIt Smart 7688 Duo to my laptop with a micro-USB cable. After the boot-up process completed, there isn’t LinkIt_Smart_7688_XXXXXX on the Wi-Fi AP client list. I’ve tried two laptops, one with OS X 10.10.5 and the other with Ubuntu 15.10. Thank you for any pointers.