IoT Mesh Firmware User Manual

From Wiki for Dragino Project
Jump to: navigation, search

INTRODUCTION

Dragino IoT Mesh Firmware is designed to use Dragino products for Internet of Things project. This firmware can be loaded in below products:

  • Linux IoT Appliance: MS14-S or MS14-P
  • Linux IoT WiFi Modyle: HE
  • Linux , WiFi Shield for Arduino: Yun Shield
  • All other products designed base on HE module


This page is a user manual for the Dragino IoT Mesh Firmware. The manual is written as a FULL HARDWARE VERSION. Some of above products may not work with a feature if it doesn't have the required connector/peripheral hardware for this feature.

DEFAULT LOG IN/PASSWORD

The IoT Mesh Firmware provide SSH, Web GUI or RS232 access. Default Log in and AP password is:

SSH/ WEB Log in: 
username: root
password: dragino
WiFi AP password:
dragino-dragino

Detail method to access are as below:

Fall Back IP

A fall back IP 172.31.255.254/255.255.255.252 is assigned to the LAN port (eth0 interface) so user can always access the system with this ip via the IP 172.31.255.253/255.255.255.252.

Set windows ip to access IoT Mesh Firmware via fall back ip


SSH Access

IoT Mesh Firmware bases on OpenWrt Linux system. User can access it via SSH and see the linux console.

1/ You should know device's LAN port ip or WiFi ip, or use fall back ip. Then configure your computer to the same IP segment as the device.

2/ Then run putty to access the device. default user name and password of is:

username: root
password: dragino
Use putty to access the device

3/ Once login successfully, user should be able see below welcome page.

SSH Welcome Page

GUI Access

The firmware also has built-in web server and provide friendly GUI access. put its ip on your browser and input username /password to access.

GUI login, default username/password: root/dragino
Status is pop up once login successfully.


RS232 Access

The IoT Mesh firmware provide UART access. Developer can use a UART to RS232 converter to access the u-boot via its serial interface.

Example: Connect ARU to ms14 via UART

Configure the serial port with below parameters: Serial: 115200, Data: 8bits, Xon/Xoff enable

ms14 serial port access
u-boot access via UART



Default AP Password

The default passwrod for AP access is dragino-dragino




TYPICAL NETWORK SETUP

This section describes the typical network topology can be set via the Dragino IoT Mesh Firmware.

Before setting network parameters, user can set up the Display Net Connection under Web --> NetWork --> Internet Access for a easily to check network status. This option will display the network connection to specify host via SYS LED. The SYS LED will blink if the network connection is up.

Check Network Connection to a Host



WiFi Client Mode

Brief In the WiFi Client Mode, Dragino acts as a WiFi client and gets DHCP from uplink router via WiFi. It also share the internet to its LAN port for other devices.

WiFi Client Mode


Set Up in Web UI

  • Internet Access
    • Access Internet via WiFi Client
    • Way to Get IP: DHCP
    • Input correct SSID, Password and Encryption.


  • LAN and DHCP
    • Enable DHCP server in its LAN port


  • Access Point
    • Disable WiFi AP


  • Mesh Network
    • Disable WiFi Mesh Network




General AP Mode

Brief In the General AP Mode, Dragino gets internet access from its WAN port or USB 3G/4G/GPRS. Dragino itself acts as a WiFi Access Point and provide a WiFi AP network. It share the internet to its AP network or LAN interface.

Internet Access via WAN
Internet Access via USB 3G/4G/GPRS


Set Up in Web UI

  • Internet Access


  • LAN and DHCP
    • Enable DHCP server in its LAN port


  • Access Point
    • Enable WiFi AP
    • Input SSID/ Encryption/ Passphrase


  • Mesh Network
    • Disable WiFi Mesh Network



Mesh WiFi Network

Brief in this network topology, user should choose the device to be a mesh gateway node or mesh client node

  • Mesh Gateway: use WAN port or USB 3G to get internet access from uplink router. It also shares the internet to its Mesh Network for other Mesh Clients. The Mesh Gateway also acts as a DHCP router for its mesh network.
  • Mesh Client: Connects to the Mesh Gateway via mesh network, it also bridge internet via the LAN and WiFi AP interface.
Dragino to set up a mesh network

Mesh Gateway Set Up

  • Internet Access
Access Internet via WAN PORT or USB Modem
Select Internet Connection Method for mesh gateway
  • LAN and DHCP
Enable DHCP server in its LAN port and Set Gateway to 255.255.255.255
Enable DHCP Server
  • Access Point
Enable WiFi AP, Can set same SSID in the mesh network
Enable WiFi AP, not necessary
  • Mesh Network
Enable WiFi Mesh Network
Input Mesh Group //Note: Mesh Device within same group can communicate with each other. In version < 3.1.2, it use BSSID for different mesh group, Mesh Group is a translation for BSSID for easy configure and remember.
Define mesh group


Mesh Client Set Up

  • Internet Access
Access Internet set to Disable
Disable internet connection
  • LAN and DHCP
Disable DHCP server in its LAN port and set gateway point to mesh gateway.
Disable DHCP Server.
  • Access Point
Enable WiFi AP (can use same SSID or difference SSID with other mesh node)
Enable WiFi AP, not necessary
  • Mesh Network
Enable WiFi Mesh Network
Input Mesh Group //Note: Mesh Device within same group can communicate with each other.In version < 3.1.2, it use BSSID for different mesh group,Mesh Group is a translation for BSSID for easy configure and remember.
Define mesh group



USB Dial Up Modem Set Up

Dragino USB interface can be used for GPRS/3G/4G connection. Below are some set up examples.

3G WCDMA Set Up Example for China Unicom
3G EV-DO/CDMA2000 Set Up Example for China Telecom



USB 3G/4G Ethernet Dongle

Some USB dongles are not use the dial up to connect internet. Instead, they appear as a network interface and has built-in router feature. Huawei Hilink dongles are a typical of these. when user plug such dongle into computer, it will auto connect to Internet and redirect to a web interface, when plug such dongle into the MS14, a new interface will appear (typicllay eth2eth2 or usb0) by running command "ifconfig -a"

Since firmare v3.1.2, user can use the Web UI to configure use these dongle for internet connection direclty.

a new interface generate by USB ethernet modem
Configure Ethetnet USB modem



INTERNET OF THINGS APPLICATIONS

Introduction

The IoT Mesh Firwmare provides a set of Web UI and scripts specially design for Internet of Things Applications. With these features, users can easily to set up/ develope IoT application using the Dragino Products.

PowerUART UI

In the PowerUART setting page, user can set the Dragino UART interface working in three different operation modes:

Linux Console/Arduino Bridge

In this mode, the Linux console is enable at 115200 baud rate. User can send command to Linux and debug it via UART interface by connecting a UART to RS232/USB module to the device.

This mode also support limited Arduino Bridge Library which provides easy communication when connect an AVR MCU to the UART interface . Current firmware supports the process/console/file class in Bridge library. note: The Bridge library baud rate in Arduino IDE is 250000 by default. User should change it to 115200 in the file arduino1.5.x\libraries\Bridge\src\Bridge.h to match the linux kernel baud rate. change example as below:

in Bridge.h file:

// This subclass uses a serial port Stream
class SerialBridgeClass : public BridgeClass {
 public:
   SerialBridgeClass(HardwareSerial &_serial)
     : BridgeClass(_serial), serial(_serial) {
     // Empty
   }

   void begin(unsigned long baudrate = 250000) {    // change this to 115200
     serial.begin(baudrate);
     BridgeClass::begin();
   }

 private:
   HardwareSerial &serial;
};


UART Routing

In this mode, Linux console is disable. And a uart_routing script is running in backgroud to monitor the data received, it will then dispatch this data according to match pattern and pre-config path.

UART Routing

The match pattern is Lua match pattern.

Example: in below setting, the script will match the temperature and humidity value arrived at the UART and save them to the /var/iot/channels path. These value can be then used for other applications.

UART routing config example


Disable Linux Console

In this mode, The Linux Console is disable and the UART is free. User is free to call the UART interface in their application.



IoT Services

General Set Up

The IoT Services page provide the configure detail for how the device should communicate with the IoT Servers.

General IoT Service Configure Page



Xively Server

Xively Detail Example:

Xively Server set up example

After the configure, the device will link the local channle id (in /var/iot/channels/) and Xively Channel ID. It will auto post data to Xively server every one minutes. So user only need to change the local value in their applications, this can be done via [IoT_Mesh_Firmware_User_Manual#UART_Routing UART Routing], Arduino Bridge Library or other methods.

Result in Xively server



TCP Client

In TCP Client mode, device will establish a TCP connection to a TCP server. The device will use this connection to send local sensor data to the remote TCP server or get data from remote TCP server.

Establish a Connection to a TCP Server
Channels Configure Example
Use a socket to test the TCP Client



Lua Match Pattern

The match pattern use in the Web UI is Lua Match Pattern, reference link is Lua match pattern.



Reset Network or Reset to System Default

The IoT firmware attached the reset feature to the toggle button which can be used for reset. When IoT firmware is running, user can press the toggle button(GPIO11) to reset the device.

  • Pressing the toggle button , the SYS LED(GPIO28) will blink, release the button after 5 seconds, device will reset the network setting and reboot (SYS/LAN/WAN/WiFI blink once), other settings will be kept.
  • Pressing the toggle button , the SYS LED(GPIO28) will blink, release the button after 30 seconds, device will reset ALL the setting to factory default and reboot((SYS/LAN/WAN/WiFI blink once) .



UPGRADE FIRMWARE

Refer this link for how to upgrade firmware



FIRMWARE RELEASE NOTE

Mesh Firmware Release Note