The MS14 is the 2nd generation Dragino mother board. It lets you embed Linux into your MCU projects. It is a low cost, open hardware Linux motherboard for micro-controllers. It runs open source linux system, has USB host port and has full Ethernet and 802.11 b/g/n WiFi capabilities. 

The goal of the MS14 is to solve the connectivity problem and greatly enhance micro-controller products such as the Arduino. 

MS14 support generic OpenWrt linux version or modified OpenWrt version such as Arduino Yun.

Applications for MS14 include remote control of robots, data logging, web applications for data presentation, mesh networking over WiFi and many more. 

{gallery}ms14{/gallery}

Write comment (0 Comments)
nano /root/setopenwifi.sh
#!/bin/sh
/sbin/uci delete network.lan.ipaddr
/sbin/uci delete network.lan.netmask
/sbin/uci set network.lan.proto=dhcp
/sbin/uci set wireless.@wifi-iface[0].mode=sta
/sbin/uci set wireless.@wifi-iface[0].ssid="$1"
/sbin/uci set wireless.@wifi-iface[0].encryption=none
/sbin/uci commit wireless
wifi down; wifi up
/etc/init.d/network  restart
chmod 755 /root/setopenwifi.sh

Testing:

/root/setopenwifi.sh "my wifi ssid"

 

Write comment (0 Comments)

Start with Debian 6/7 32 bits machine.

adduser sonnyyu

apt-get update -y
apt-get upgrade -y

for Debian 6:

apt-get install -y bc  nano openjdk-6-jre git-core build-essential

for Debian 7:

apt-get install  tzdata=2014j-0wheezy1 
apt-get install -y bc  nano openjdk-7-jre git-core build-essential
nano /etc/sudoers
sonnyyu ALL=(ALL:ALL) ALL

su sonnyyu
cd ~
git clone https://github.com/pepe2k/u-boot_mod.git
wget -O OpenWrt-Toolchain-ar71xx-for-mips_r2-gcc-4.6-linaro_uClibc-0.9.33.2.tar.bz2 https://www.dropbox.com/s/koew9qrc59s1qeq/OpenWrt-Toolchain-ar71xx-for-mips_r2-gcc-4.6-linaro_uClibc-0.9.33.2.tar.bz2?dl=0
tar -vxjf OpenWrt-Toolchain-ar71xx-for-mips_r2-gcc-4.6-linaro_uClibc-0.9.33.2.tar.bz2
cd u-boot_mod/
nano Makefile

export PATH:=/home/sonnyyu/OpenWrt-Toolchain-ar71xx-for-mips_r2-gcc-4.6-linaro_uClibc-0.9.33.2/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/bin:$(PATH)
export MAKECMD=make --silent --no-print-directory ARCH=mips CROSS_COMPILE=mips-openwrt-linux-uclibc-
make dragino_v2_ms14

...
> Preparing U-Boot image "u-boot.img"...
    Image Name: U-Boot 1.1.4 for ap121 board
       Created: Mon Aug 31 09:32:54 2015
    Image Type: MIPS Linux Firmware (uncompressed)
     Data Size: 165740 Bytes = 161.86 kB = 0.16 MB
  Load Address: 0x9F000000
   Entry Point: 0x00000000
> Preparing 192KB file filled with 0xFF...
> Copying U-Boot image...
> U-Boot image ready, size: 196608 bytes

 

 

Write comment (0 Comments)
opkg update
opkg install sqlite3-cli
opkg install luasql-sqlite3
sqlite3 /root/sensor.db
sqlite> CREATE TABLE sensor_data(
    id INTEGER PRIMARY KEY,
    temperature VARCHAR(64),
    sqlitetimestamp DATETIME DEFAULT CURRENT_TIMESTAMP
);
sqlite> INSERT INTO sensor_data (temperature) VALUES (30);
sqlite> INSERT INTO sensor_data (temperature) VALUES (40);
sqlite> select * from sensor_data;
sqlite>.quit
nano /root/sensor.lua
#!/usr/bin/lua
sqlite3 = require "luasql.sqlite3"
local x = os.clock()
for i=1,1000,1
do
        local env  = sqlite3.sqlite3()
        local conn = env:connect('/root/sensor.db')
        --print(env,conn)
        cursor,errorString = conn:execute([[select temperature from sensor_data limit 1]])
        --print(cursor,errorString)
        row = cursor:fetch ({}, "a")
        --print(row.temperature)
        -- close everything
        cursor:close()
        conn:close()
        env:close()
        --print(i)
end
print(string.format("elapsed time: %.2f\n", os.clock() - x))
chmod 755 /root/sensor.lua
root@Arduino:~# /root/sensor.lua
elapsed time: 4.69

Lua and Sqlite3 profile speed is 4.69 ms

Write comment (0 Comments)