background image

 

-27- 

 

 

Document Name 

AI7688H   

 

 

Reference Manual 

 

Version 

V 2.0 

 

Date    2019/08/08 

Step 2: Restart the Wi-Fi driver for activating the configuration 

Type the command in the system console: 

wifi_mode sta

 

Notice

: if you use SSH to connect to the system console of AI7688H, you'll lose 

the  connection  once the  Wi-Fi  command  is  set. This  command  will  restart the 

Wi-Fi  driver.  After  the  Wi-Fi  restarts,  connect  your  PC  to  the  same  wireless 

router as AI7688H did. Then you can connect to AI7688H with mylinkit.local by 
SSH again. 

You can also refer to the LED behavior to check the states of the connection in 
Station mode. 

Step 3: Check for Internet connection 

Now we can check if you’ve established Internet connection by typing the 
following command in the system console: 

ping –c 5 www.mediatek.com

 

6.3

 

Switch to AP mode 

Step1: type UCI command to disable Station mode 

wifi_mode ap 

uci set wireless.sta.disabled=1 

uci commit 

Step 2: Restart the Wi-Fi driver 

wifi 

After the Wi-Fi driver restarts, the PC should be able to scan the AI7688H AP as 

shown in the video of th

Reset Wi-Fi Configuration 

section.   

Also the Wi-Fi status can be checked through the

 LED behavior

.

 

 

 

Summary of Contents for AI7688H

Page 1: ...Document Name AI7688H Reference Manual Version V 2 0 Date 2019 08 08 Document Name AI7688H Reference Manual Version V 2 0 Date 2019 08 08...

Page 2: ...Document Name AI7688H Reference Manual Version V 2 0 Date 2019 08 08 Document History Revision Date Author Description V 1 0 160407 PW New Create V 2 0 190808 Ken Update Image...

Page 3: ...USB drive 3 2 Update bootloader with USB drive 3 3 Factory reset 3 4 Build Firmware from Source 3 5 Build Bootloader from Source 3 6 Rebuild Existing Kernel Packages 3 7 Bootloader and Kernel Console...

Page 4: ...w to switch the Pin Mux 10 2 Basic Concepts of MRAA 10 3 Using MRAA in Python 10 4 Using UPM in Python 10 5 Using MRAA in node js 10 6 Controlling PWM with MRAA on AI7688H 11 C C Programming 11 1 Buil...

Page 5: ...IoT gateway mode and IoT device mode In IoT gateway Mode the PCIe Express interface can connect to 802 11ac chipset for 11ac dual band concurrent gateway The high performance USB 2 0 allows AI7688H to...

Page 6: ...2 Document Name AI7688H Reference Manual Version V 2 0 Date 2019 08 08...

Page 7: ...cal domain In Windows7 you ll need to install Bonjour print service for mDNS This helps your computer discover the EK AI7688H s IP address with the local domain name For Windows 8 and later Mac OS X a...

Page 8: ...wer up AI7688H board After boot up and Wi Fi initialization completes which takes about 30 seconds the Wi Fi LED goes off This means the system is ready to accept Wi Fi connection now we can connect t...

Page 9: ...Date 2019 08 08 2 3 Find the AI7688H AP and connect Open browser http mylinkit local or http 192 168 100 1 If the board already has a password you can press Wi Fi Reset button for at least 20 seconds...

Page 10: ...6 Document Name AI7688H Reference Manual Version V 2 0 Date 2019 08 08 2 4 System Information and Upgrade Firmware Download lks7688 img version 0 9 4 from here...

Page 11: ...7 Document Name AI7688H Reference Manual Version V 2 0 Date 2019 08 08 2 5 OpenWrt for advanced configuration Enter your Password OpenWrt Function...

Page 12: ...ersion V 2 0 Date 2019 08 08 2 6 Access system console For OS X and Linux Open Terminal application At the command prompt type ssh root mylinkit local Press return and enter the password you set previ...

Page 13: ...the board with an OTG cable Hold the Wi Fi button Press the MPU Reset button once while holding the Wi Fi button Keep holding Wi Fi button about 5 seconds Release Wi Fi button until the Wi Fi orange...

Page 14: ...f a USB drive and rename it lks7688 ldr Plug the USB drive to AI7688H Press the Wi Fi and MPU Reset button at the same time then release the MPU Reset button but hold the Wi Fi button for at least 20...

Page 15: ...and system changes you ve made to the firmware such as root password Wi Fi configuration and opkg installation Using the Web UI Login to WebUI under Factory reset click RESET Using the Wi Fi reset but...

Page 16: ...I7688H_OpenWRT_Build_FW_Setting_Tool_V1 0 change to the folder cat Readme txt install additional package to build code make download download code from internet make menuconfig Save and exit use defau...

Page 17: ...e source folder cd linkit smart 7688 uboot Install the toolchain install to path opt for building the bootloader sudo tar xjf buildroot gcc342 tar bz2 C opt Since the toolchain is provided in 32 bit e...

Page 18: ...e 2019 08 08 3 6 Rebuild Existing Kernel Packages In the config menu select the Kernel modules Go to Filesystems and select the kmod fs ext4 as M modularizes features Note other kernel packages which...

Page 19: ...he USB drive root mylinkit tmp run mountd sda1 opkg install kmod ipk Installing kmod crypto core 3 18 23 1 to root Installing kmod crypto hash 3 18 23 1 to root Installing kmod fs ext4 3 18 23 1 to ro...

Page 20: ...ment Ralink UBoot Version 4 3 0 0 ASIC 7628_MP Port5 None DRAM component 1024 Mbits DDR width 16 DRAM bus 16 bit Total memory 128 MBytes Flash component SPI Flash Date Sep 10 2015 Time 05 56 31 icache...

Page 21: ...Checksum OK Uncompressing Kernel Image OK No initrd Transferring control to Linux at address 80000000 Giving linux memsize in MB 128 Starting kernel 0 000000 Linux version 3 18 21 root builder1 gcc v...

Page 22: ...D00 UART Lite define RT2880_UART3 0x0E00 UART Lite define CFG_RT2880_CONSOLE RT2880_UART1 define CFG_RT2880_CONSOLE RT2880_UART3 else define RT2880_UART1 0x0500 define RT2880_UART2 0x0C00 UART Lite de...

Page 23: ...16 define CONFIG_BOOTDELAY 1 define CONFIG_BAUDRATE 57600 define CONFIG_SERVERIP 10 10 10 3 define CONFIG_IPADDR 10 10 10 123 Change this define CONFIG_BAUDRATE 57600 to this change the baudrate from...

Page 24: ...just the configuration modify the file target linux ramips dts LINKIT7688 dts and chang chosen bootargs console ttyS2 57600 to this e g change to UART0 and 115200 baudrate chosen bootargs console ttyS...

Page 25: ...ut 100 000 times and without wear leveling mechanism and atomic write operation So it is not recommended to write user data to the on board flash frequently Besides its storage is also limited to 32MB...

Page 26: ...is example During the formatting process it ll prompt a confirmation Proceed anyway y n Press y to continue 6 Duplicate current root FS and move it to the SD card 7 Create a fstab template 8 Open the...

Page 27: ...ck if the setup takes effect We can use the df h command to check if the root FS is mounted successfully When the root FS is on the on board flash we can see rootfs only has 11MB storage space left Af...

Page 28: ...erate under 2 different modes the AP Access Point mode and the Station mode The AP mode forms a Wi Fi network that allows your computer to join and the station mode allows AI7688H to join other Wi Fi...

Page 29: ...nnect and re configure the Wi Fi settings accordingly After Reset device the Wi Fi LED doesn t blink at all The bootloader is corrupted or the on board flash is damaged The device is bricked You need...

Page 30: ...ord to the Station mode or when you need to re configure Wi Fi settings Note If AI7688H is already in AP mode this operation takes no effect 6 2 Switch to Station mode Step1 Type UCI commands to assig...

Page 31: ...88H with mylinkit local by SSH again You can also refer to the LED behavior to check the states of the connection in Station mode Step 3 Check for Internet connection Now we can check if you ve establ...

Page 32: ...28 Document Name AI7688H Reference Manual Version V 2 0 Date 2019 08 08 6 4 Setup Wireless Router...

Page 33: ...29 Document Name AI7688H Reference Manual Version V 2 0 Date 2019 08 08...

Page 34: ...Attach the USB Drive to the board Plug an OTG cable to the HOST port and attach the USB drive to the OTG cable Reboot and the AP name will change according to the file Use THE_AP_PASSWORD you assigned...

Page 35: ...is copied to the path example helloworld in AI7688H The SCP tool will instruct you to enter the Password of root account Using SCP to copy files in Windows You can download tools that support SCP pro...

Page 36: ...o use GUI start WinSCP program select SCP for file protocol enter mylinkit local in the host name box root for user name and the password you set in Web UI Click Yes when you see a warning window abou...

Page 37: ...n V 2 0 Date 2019 08 08 Locate the file you want to transfer on the left pane your computer and drag it to the right as shown below After you ve dragged the file an Upload window will appear asking yo...

Page 38: ...he following command uci set samba media path IoT Name the shared folder MySharedFolder uci set samba media name MySharedFolder Change the permission of the shared folder to make it readable and writa...

Page 39: ...ocument Name AI7688H Reference Manual Version V 2 0 Date 2019 08 08 Access Samba in OS X The steps to transfer files using Samba in Mac are as follows Open Finder and in the menu click Go Connect to s...

Page 40: ...ce Manual Version V 2 0 Date 2019 08 08 In the server address field type smb mylinkit local or smb 192 168 100 1 and click Connect Connect as guest Check Finder and you ll see MySharedFoloder You can...

Page 41: ...SiteSurvey 1 to enable access point scanning Note that it takes a while to scan nearby APs Use get_site_survey ra0 to collect scan results Example root myLinkIt iwpriv ra0 set SiteSurvey 1 root myLin...

Page 42: ...expand the root file system This is because AWS CLI and device SDK takes considerable amount of disk spaces Sign up an AWS account Install AWS CLI You can install the CLI on AI7688H directly with pip...

Page 43: ...example applications 1 Download and setup the cross compilation tools OpenWrt SDK Make sure you can build and deploy a helloworld example without problem 2 Locate the path to the cross compilation too...

Page 44: ...makefile and find the following line in the beginning of the file Remove the line and modify it to use the cross compilation toolchain 9 Type make To start building the sample application It will bui...

Page 45: ...log into the console After login to the console run the example 12 You should see the following output which is repeatedly printed You can press ctrl c to stop the execution Now you can build other sa...

Page 46: ...ware stacks are provided for developers to access the sensors attached to the AI7688H UPM is the repository for sensor drivers written in libmraa and it provides API bindings for Python Node js and C...

Page 47: ...fferent functionality to the pin Synopsis mt7688_pinmux get mt7688_pinmux set group function Description In the system console of the AI7688H development board enter mt7688_pinmux get to query the cur...

Page 48: ...e Group ephy from ephy to gpio root mylinkit mt7688_pinmux set ephy gpio set pinmux ephy gpio You can also use the get parameter to verify the current pinmux status root mylinkit mt7688_pinmux get Gro...

Page 49: ...system image of AI7688H so you don t need to install it again Basic Concepts The majority of hardware modules such as GPIO UART SPI and PWM are represented as objects created by mraa s factory functi...

Page 50: ...aa GPIO and Interrupts To control GPIO pins initialize the pin as GPIO pin and set its mode The simplest operation mode is OUTPUT set the pin to HIGH or LOW to enable and disable external switches or...

Page 51: ...xample will continuously print out the value received from P10 on the board You can short 3V3 and P10 to observe the change in values Finally an interrupt service routine can be installed to the pin a...

Page 52: ...od This defines the carrier frequency of the modulation It s controlled by period period_ms and period_us APIs Duty Cycle or Pulse Width These two parameters are related to each other and usually you...

Page 53: ...0 and it is always on pin GPIO4 and GPIO5 I2C is capable of connecting multiple slave devices to a single I2C master Each slave device is identified by a 7 bit address SPI SPI Serial Peripheral Inter...

Page 54: ...e UPM library UPM comes with bindings in C Python and Node js Let s get started with an example where you ll learn how to use UPM and Python to receive values from an I2C accelerometer a Grove 3 Axis...

Page 55: ...node js Installing MRAA Libmraa and its Nodejs bindings are already installed in the system image of AI7688H so you don t need to install it again Controlling LED with MRAA in Node js Our first tutor...

Page 56: ...of the modulation It s controlled by period period_ms and period_us APIs for example Duty Cycle and Pulse Width These two parameters are related to each other and usually you only need to set one of t...

Page 57: ...cycle Enable Output After configuration you can enable the PWM output by calling enable true Control a Servo You can use PWM signal to control a servo A pulse width of 1500us means the neutral positi...

Page 58: ...rement Currently only Ubuntu Linux and OS X are supported Windows with Cygwin is not supported The following steps assume an Ubuntu Linux environment Step First download the SDK zip file Unzip the pac...

Page 59: ...world_1 0 0 1_ramips_24kec ipk Copy the ipk file to the AI7688H In the system console of the board navigate to the location of the ipk file and type opkg install There should be some installation mess...

Page 60: ...aming application It s already installed in the system firmware by default For the webcam Logitech C310 is used in this example Step 1 plug the webcam into the USB host port on AI7688H Step 2 type the...

Page 61: ...g Note for a high bit rate WAV recording like 16bit 44 1k format as the below example please record the file to a destination with high I O speed e g USB drive SD card or RAM instead of the on board f...

Reviews: