Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Sensor Network 2014/11/25/ 21 1.

Slides:



Advertisements
Similar presentations
Lab 4 Department of Computer Science and Information Engineering National Taiwan University Lab4 - Bootloader 2014/10/14/ 13 1.
Advertisements

雲端計算 Cloud Computing Lab - EyeOS. Agenda Installation Programming.
Creating WordPress Websites. Creating a site on your computer Local server Local WordPress installation Setting Up Dreamweaver.
Computer System Laboratory
Dynamic Web site With PHP and MySQL. MySQL The combination of MySQL database and PHP scripting language is optimum for building dynamic websites. MySQL.
Bangkok, Thailand Smokeping & Cacti intERLab at AIT Workshop March – Bangkok, Thailand Hervey Allen.
Securing LAMP: Linux, Apache, MySQL and PHP Track 2 Workshop PacNOG 7 July 1, 2010 Pago Pago, American Samoa.
11 MAINTAINING THE OPERATING SYSTEM Chapter 5. Chapter 5: MAINTAINING THE OPERATING SYSTEM2 CHAPTER OVERVIEW  Understand the difference between service.
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
COMPUTER SYSTEM LABORATORY Lab8 - Debugging II. Lab 8 Experimental Goal Learn how to debug Linux in source-level by Domingo and diagnose target boards.
Open Source Software WampServer Presented By Mr. R.Aravindhan.
A crash course in njit’s Afs
Raspberry Pi Training Truman College Goals of our Training Today Unbox and boot up the Raspberry Pi (RPi) Learn how to access the desktop graphical.
One to One instructions Installing and configuring samba on Ubuntu Linux to enable Linux to share files and documents with Windows XP.
Lab 3 Department of Computer Science and Information Engineering National Taiwan University Lab3 - Cross Tools 2014/10/7/ 20 1.
1 Network Statistic and Monitoring System Wayne State University Division of Computing and Information Technology Information Technology.
NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)
Set up the Environment for leJOS NXJ. Required Software Software –JDK 1.6 –leJOS NXJ –USB driver for NXT Mindstorm nxt USB driver Libusb MMN Lab.
Computer System Laboratory
COMPUTER SYSTEM LABORATORY Lab10 - Sensor II. Lab 10 Experimental Goal Learn how to write programs on the PTK development board (STM32F207). 2013/11/19/
Computer System Laboratory
 2003 Prentice Hall, Inc. All rights reserved. 1 Java Database Connectivity with JDBC TM.
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
MS Windows XP Embedded 李志清. Live in a Embedded Computing World.
Customer Relationship Management. Content CRM SugarCRM System Requirement Installation Process Configuration.
Taipei, Taiwan Smokeping & Cacti APRICOT 2008 Workshop February – Taipei, Taiwan Hervey Allen.
Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Sensor 2014/9/23/ 13 1.
Conventions Department of Computer Science and Information Engineering National Taiwan University Conventions 2014/9/16/ 3 1.
Subversion Tutorial Presenter: Ya-Lin Huang. Introduction 版本控制系統是什麼? 管理對資訊所做人為變動 程式設計師的工具之一 為何要使用版本控制系統? 促成有效率的團隊合作 使變動歷程能被追溯 2.
Lab 10 Department of Computer Science and Information Engineering National Taiwan University Lab10 – Debugging II 2014/12/2 1 /16.
作者: WEBCOLLAB 日期: 2007/11/22 Content Management Systems 實例簡介.
COMPUTER SYSTEM LABORATORY Lab6 - Root Filesystem.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Ozan Şahin Ömer Üçler.  Purpose of Project  Used Technologies  Database Design  Problems&Solutions  Use Case’s  Demo.
DATABASE TOOLS CS 260 Database Systems. Overview  Database accounts  Oracle SQL Developer  MySQL Workbench.
Lab 14 Department of Computer Science and Information Engineering National Taiwan University Lab14 – Camera 2014/12/30 1 /14.
Lab 13 Department of Computer Science and Information Engineering National Taiwan University Lab13 – Interrupt + Timer 2014/12/23 1 /16.
General rules 1. Rule: 2. Rule: 3. Rule: 10. Rule: Ask questions ……………………. 11. Rule: I do not know your skill. If I tell you things you know, please stop.
1 Microsoft Windows 2000 Network Infrastructure Administration Chapter 4 Monitoring Network Activity.
Using Sequence Files. Mahout Installation – wget distribution-0.9.tar.gz
SQOOP INSTALLATION GUIDE Lecturer : Prof. Kyungbaek Kim Presenter : Zubair Amjad.
Implementation of Embedded OS Lab4 Cortex-M3 Programming.
Lab 12 Department of Computer Science and Information Engineering National Taiwan University Lab12 – Driver 2014/12/16 1 /21.
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 – Bootloader + OS Kernel 2015/10/27/ 25 1.
Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Environment Setup 2015/9/15/ 30 1.
Lab 8 Department of Computer Science and Information Engineering National Taiwan University Lab8 - Root Filesystem 2015/11/10/ 22 1.
目录 8 in 1 Sensor ◆ 8 in 1 Sensor Unique Features ● Built in PIR motion sensor and light intensity sensor ● Built in 2 Dry Input Ports ● Built in 32 Logics.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
Lab 3 Department of Computer Science and Information Engineering National Taiwan University Lab3 – μC/OS 2015/10/13/ 13 1.
Microsoft ® Official Course Module 6 Managing Software Distribution and Deployment by Using Packages and Programs.
Implementation of Embedded OS
Lab 7 Department of Computer Science and Information Engineering National Taiwan University Lab7 – uCOS Application 2015/11/10/ 10 1.
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 - OS Kernel 2014/10/21/ 16 1.
Aaron Corso COSC Spring What is LAMP?  A ‘solution stack’, or package of an OS and software consisting of:  Linux  Apache  MySQL  PHP.
SPARCS Wheel Seminar 08/01/14 심규현 (spotlight). 1 of 6 Web Application  A web application is an application that is accessed via web over a network such.
Installing a Moodle Test Site The painless and easy way.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
WordPress and Etherpad with BlueMix and Docker. Our aim is to run on BlueMix containers (now in beta) these two famous services In the BlueMix dashboard,
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
Lab 6-1 Department of Computer Science and Information Engineering National Taiwan University Lab6-1 - Sensor Network 2016/6/7/ 2 1.
Computer System Laboratory
Computer System Laboratory
Implementation of Embedded OS
Computer System Laboratory
PHP / MySQL Introduction
INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT
Computer System Laboratory
Pentaho Data Integration
Computer System Laboratory
Computer System Laboratory
Presentation transcript:

Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Sensor Network 2014/11/25/ 21 1

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Learn how to establish a simple sensor network (SIOTAS) on STM32F /11/25/ 21 2

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Host System  Windows XP  Build System  IAR Embedded Workbench + Ubuntu 8.04  Target System  PTK development board (STM32F207)  Software  SQL Agent  Prepared Database  mCloud Portal  MySQL Connector ODBC  mCloud AppClient  PTK Examples Version 2  You can find all software on RSWiki CSL Course Software.RSWiki CSL Course Software 2014/11/25/ 21 3

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  We would like to build a sensor network for the elders.  A gateway device is used to collect data from node devices by using Zigbee.  All the sensing data will be sent to a server and recorded in database.  We can use a browser to monitor the history of data and graphs. 2014/11/25/ 21 4 Server Side Client Side Sensor Devices gateway device node device

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  We use STM32F207 as the base of each device.  Gateway Device  Collect all the data from other sensors, and send them to the server.  Lighting Device  Detect the current value of temperature and luminance flux, and turn on the light when it is dark.  Bathroom Device  Detect the movement of users and record user in/out events.  Entrance Device  Detect the door whether it is open, and record events of user entrance.  User can go indoor/outdoor by using RFID.  Activity Device  Detect the heart beat rate and calories consumption. 2014/11/25/ 21 5

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  We would establish LAMP environment.  LAMP means Linux, Apache, MySQL, and PHP.  Create a website for monitoring and analyzing.  Design a database for data captured by sensors. 2014/11/25/ 21 6

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  data_block  This is used to record continuous data.  Data will store into a file and record the filename in database.  data_feed  This is used to record intermittent data.  The data will be stored into value defined by the schema.  For detailed description, please refer to the document. 2014/11/25/ 21 7

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Step 1: install several packages.  % sudo apt-get install unzip  % sudo apt-get install apache2  % sudo apt-get install mysql-server  You must use the predefined password “ microtime ” for root in the installation process.  % sudo apt-get install php5  % sudo apt-get install phpmyadmin  Please choose apache2 by SPACE key in the installation process.  % sudo apt-get install libmysqlclient15-dev  Step 2: modify the configuration of MySQL.  % sudo nano /etc/mysql/my.cnf  bind-address =  [mysqld]  plugin_dir = /usr/lib/mysql/plugin 2014/11/25/ 21 8

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Step 3: download sql-agent.tar.gz.sql-agent.tar.gz  Step 4: install MySQL plugin lib_mysqludf_sys.so.  % sudo mkdir /usr/lib/mysql/plugin  % sudo mkdir /home/test0001  % sudo tar zxvf sql-agent.tar.gz -C /home/test0001  % sudo cp /usr/lib/libmysqlclient.so.15 /home/test0001/libmysqlclient.so.18  % cd /home/test0001/lib_mysqludf_sys  % sudo./install.sh  Step 5: add some tasks to rc.local.  % sudo nano /etc/rc.local cd /home/test0001./runme.sh  Step 6: reboot and check.  % sudo reboot  % ps -A 2014/11/25/ 21 9

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Step 1: connect MySQL by a browser.   Step 2: import the prepared database.  “ 載入 ”  “ 選擇檔案 ”  mCloud-SIOTAS.sql  “ 執行 ” mCloud-SIOTAS.sql  Step 3: create a new user.  “ 權限 ”  “ 新增使用者 ”  使用者名稱 = imami  主機 = 任何主機  密碼 = imami  database for user = None  整體權限 = 全選 2014/11/25/ 21 10

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Install the website.  Step 1: download mCloud-Portal.zip.mCloud-Portal.zip  % sudo unzip mCloud-Portal.zip -d /var/www  % sudo chown -R www-data.www-data /var/www/mcloud  Step 2: check the website.   Password is microtime 2014/11/25/ 21 11

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Install MySQL Connector.  Step 1: download mysql-connector-odbc win32.msi.mysql-connector-odbc win32.msi  “ 控制台 ”  “ 系統管理工具 ”  “ 資料來源 (ODBC)”  “ 系統資料來源名稱 ”  “ 新增 ”  “MySQL ODBC 5.1 Driver”  “ 完成 ”  Data Source Name = MySQL-mCloud  Description = MySQL ODBC 5.1 driver  TCP/IP Server =  Port = 3306  User = imami  Password = imami  Database = imami  Step 2: Test the connection.  Click “Test”. 2014/11/25/ 21 12

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Install mCloud-AppClient.  Step 1: download and install mCloud-SIOTAS-setup exe.mCloud-SIOTAS-setup exe  Step 2: execute mCloud-AppClient.exe. 2014/11/25/ 21 13

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Step 0: download new PTK_Example.PTK_Example  Step 1: turn off the power.  Step 2: install Zigbee module (PTK-RF-ZB-ZB01).  Step 3: install LED module (PTK-MEMS-RTC). 2014/11/25/ 21 14

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Step 4: open the gateway project.  PTK_Example_v2/ePBB/Applications/Projects/PTK-STM32F207/EWARM- V6/Case_Study/MT_Case_SIOTAS-PTK/node_gateway/demo.eww  Step 5: modify configuration in app_cfg.h. APP_TCPIP_CFG_IF_IP_ADDR_STR = " " APP_TCPIP_CFG_IF_MASK_STR = " " APP_TCPIP_CFG_IF_GATEWAY_STR = " “  Step 6: modify constant values in app.c. static const MT_MCLOUD_SIGNAL_T gSignalConfig[] = { { MK_MID_SID(0x0001, 0x0000), // MID_SID "Light", // Name MCLOUD_DATA_UINT16, // DataType 0, // Type COM_TYPE_ZB, // ComType "Lighting_0001", // Paring "", // ShareLib … 2014/11/25/ The 4 digits number is the last 4 digits of MAC address of Zigbee.

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Step 1: turn off the power.  Step 2: install Zigbee module (PTK-RF-ZB-ZB01).  Step 3: install LED module (PTK-MEMS-RTC).  Step 4: open the lighting project and download.  PTK_Example_v2/ePBB/Applications/Projects/PTK-STM32F207/EWARM- V6/Case_Study/MT_Case_SIOTAS-PTK/node_lighting/demo.eww 2014/11/25/ 21 16

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Step 1: turn off the power.  Step 2: install Zigbee module (PTK-RF-ZB-ZB01).  Step 3: install passive infrared sensor module (PTK-MEMS-PIR).  Step 4: open the bathroom project and download.  PTK_Example_v2/ePBB/Applications/Projects/PTK-STM32F207/EWARM- V6/Case_Study/MT_Case_SIOTAS-PTK/node_bathroom/demo.eww 2014/11/25/ 21 17

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Step 1: turn off the power.  Step 2: install Zigbee module (PTK-RF-ZB-ZB01).  Step 3: install RFID module (PTK-RFID-EWTJ680).  Step 4: install reed switch module (PTK-MEMS-REEDSW).  Step 5: open the entrance project and download.  PTK_Example_v2/ePBB/Applications/Projects/PTK-STM32F207/EWARM- V6/Case_Study/MT_Case_SIOTAS-PTK/node_entrance/demo.eww 2014/11/25/ 21 18

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Step 1: turn on power.  Step 2: pressing Reset and KEY0.  Step 3: release Reset.  Step 4: release KEY0 after 2 seconds when hearing beep sound. 2014/11/25/ 21 19

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Try to connect them all together and get a simple sensor network.  The goals are  You can monitor the light and temperature on the website.  You can use bathroom device and entrance device in advance.  Tips:  For more information, please refer to documents on the course website. 2014/11/25/ 21 20

Lab 9 Department of Computer Science and Information Engineering National Taiwan University  Show that you can connect a gateway device and a lighting device, record the data into database, and also see the values on a browser.  Show that you can track user movement by a bathroom device and an entrance device. 2014/11/25/ 21 21