Practical Contiki-NG: Programming for Wireless Sensor Networks

所需积分/C币:19 2018-06-15 08:57:03 11.32MB PDF
收藏 收藏

Explore how to develop and implement wireless server networks (WSN) using Contiki-NG, branded as the operating system for the IoT. The book explains Contiki-NG’s advantages in sensing, communication, and energy optimization and enables you to begin solving problems in automation with WSN. Practical
Practical Contilci-NG: Programming for Wireless Sensor Networks Agus Kurniawan Depok, Jawa Barat, Indonesia ISBN-13(pbk):978-1-48423407-5 ISBN-13( electronic:978-1-4842-3408-2 htps:// doi. org/10.1007/978-1-4842-3408-2 Library of Congress control Number: 2018947346 Copyright o 2018 by Agus Kurniawan This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights publication, neither the authors nor the editors nor the publisher can accept any legal e date of While the advice and information in this book are believed to be true and accurate at the date o responsibility for any errors or omissions that may be made. The publisher makes no warranty express or implied, with respect to the material contained herein Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Natalie Pao Development Editor: James Markham Coordinating Editor: Jessica Vakili Cover designed by eStudio Calamar CoverimagedesignedbyFreepik( Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax(201)348-4505 emailorders-ny@springer-sbm.comorvisitwww.springeronline.comapRessMediaLlcisa California LLC and the sole member (owner )is Springer Science Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation,orvisithttp://www.apress com/rights-permissions press titles may be purchased in bulk for academic, corporate, or promotional use eBook versions and licenses are also available for most titles. For more information, reference our print andebooKBulksaleswebpageat Any source code or other supplementary material referenced by the author in this book is available Formoredetailedinformationpleasevisit Printed on acid-free paper Table of contents About the author ■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■ About the technical reviewer Acknowledgments Introduction Chapter 1: Introduction to Wireless sensor Networks ummmmmmaana. 1 Introduction to wireless sensor networks Introduction to contiki os Reviewing wsn hardware for contiki 6 MICAZ ■■重D面重D重,面重D面重D重,重D面重D重 7 Mica2 TelosB 8 Iris Custom TinyOS Motes…,… 10 Z1 Platform ■日■目面■■重■目■日面■■重■■ Contiki-NG ARM-based boards Introducing Contiki-NG Set Up Development Environment for contiki nstant contiki…13 Manual installation Set Up Contiki-NG Development Environment Connect Wsn Hardware to Computer ■■重D,重D重,重D重夏 22 Contiki and Raspberry Pi 25 Il TABLE OF CONTENTS Hello World application for contiki. Explanation. Contiki simulator 35 Setting Ur Running Contiki Application.n Debugging Contiki Application. Hardware Debugger 国重■重■D■口重■重■D■重■重■B■重■重■B■重重■B■重■重B■重重目 LED Indicators…45 Debugging Using Contiki Simulator. mannea..nmtmamtnonttn 45 The Contiki printf Function.,,……45 Summary ammmmntmanaannannmaatnananmnnaannananmn, 46 Chapter 2: Basic Contiki-NG Programming aaamamaaanaa 47 Contiki-NG Programming Model mmm. Contiki-NG Basic Syntax. Creating a Project 9 Contiki- NG Basic Programming language…,,…, 50 Review Protothreads 52 Extending the Contiki-NG Library 55 Contiki-NG Demo: Threading app..,,……57 Contiki-NG Coding conventions…… 61 Demo: Build Contiki-NG Application 6 Summary Chapter 3: Concurrency mmmmmmmmmm.67 Introduction to Concurrency mmmmmm. memnnmemmnammnmtnnnnm.67 Concurrency Approach in Contiki-NG ■重,面重D面重重,重1D 68 Introducing Contiki-NG Processes Working with Timers 72 TABLE OF CONTENTS Clock Library. Timer Library 73 Stimer Library. Etimer Library mmmmamamand CTimer Library mmmmnemmmmemmnnmanaemnemen. 76 Rtimer Library 77 Put It All Together.....,…,…78 Threading…,,,,, 83 Task Scheduling Summary. Chapter 4: Contiki-NG and computer 95 Communication Models for Serial communication 97 Communication Between Contiki Mote and computer 97 Access Contiki motes via serial communication Contiki shell 104 Contiki-NG Shell 目面重重重DD重D重重D重重D目 112 Customizing Contiki shell..mmnnmmmeanmammnn. 115 Communication among contiki Motes 126 Sending Broadcast Messages 127 Receiving broadcast Messages…… 128 Demo: Middleware application 129 Middleware Application for Contiki-NGmmtmaaammneamnatmamaann 132 What is middleware? ■重,面重D面重重,重面重重■ 133 Middleware architecture for contiki-NG 133 Implementation . Testing….........,134 Summary 135 TABLE OF CONTENTS Chapter 5: Sensing and Actuating ammm mmmmmmmmmmmm137 What Are Sensing and Actuating. Review sensor and actuator devices emperature and Humidity n139 Soil moisture Gas sensor ,142 LED 143 Active buzzer.….144 Motor Sensing in Contiki-NG.......................... 145 Demo 146 Creating a Project 147 Writing a Program .mmmemmmmmemmemamamaamn 148 Testing . Actuating in Contiki-NG 152 Creating a Project. Writing a Program…… 154 Testing.,,……155 Customizing sensor and Actuator Devices…… ,156 Expansion Connector ■■ 156 Sensor and actuator drivers for contiki-NG 159 Summary ,165 Chapter 6: Networkinguammmmmmmmmaaammmmmmmmmmmmamn 167 Networking in Contiki-NG. Network Layer…,… 170 MAC Layer...........172 RDC Layer 173 Radio layer TABLE OF CONTENTS Network Simulation Using COOJA. Creating simulation project 174 Adding UDP Server Mote.…...…177 Adding UDP Client Motes…,… 180 Running a Simulation . Pv6 Networking… 185 Routing on Contiki-NG 重DD重重重重重D目日D重重D重DD面重 189 Introducing Basic Routing…...,..,,,,,…189 Single- Hop and Multi- Hop Networking.….……………190 Routing on Contiki-NG 191 PV6 Multicast…194 Contiki-NG NullNet 199 6 LOWPAN Network A Brief introduction, Implementing a 6LoWPAN Network on Contiki-NG 203 6 LoWPAN Implementation using COOJA 209 Bu| d Your0 wn restful server for conti-NG……214 Preparation 215 Implementing the Demo 215 Testing the Demo....e. 223 Summary. Chapter 7: Storage manama 225 Storage Models in Contiki-NG mmmmamamannmamananaeaammaman. 225 Working with Local Storage mmmmnmmmnmmamnaemammmmananmmnmnnanm.n, 227 Coffee: File system in Contiki-NG 231 Demo: Contiki-NG and MySQL Preparation 239 Design a database 239 TABLE OF CONTENTS Build a Develop a contiki-NG Sensor application mnmmmnmnn 241 Develop Middleware Application……, 242 Testing the Project... 246 Summary 248 Chapter 8: Contiki-NG and Cloud ServermBammam ARBERRRRRIAII RaIm.249 Introduce cloud server Why Use Cloud Computing?. Cloud-Computing Services.................252 Types of Cloud-Computing Deployments 252 Review cloud server platforms 253 Microsoft azure,…….253 Amazon Aws 254 Google Cloud m. 254 BM Cloud… n254 Comparing Features of all global clouds 255 Connecting Contiki-NG Motes to Cloud Servers.mmarae n255 Demo 1: contiki-NG and microsoft azure 256 Preparation.......,…,…,…257 Developing application 261 Testing Contiki-NG and Azure Application.............. 268 Demo 2: Contiki-NG and amazon Aws ,271 Preparation Developing Application 282 Testing contiki-NG and Aws lot.m....mmmmmmm.285 Summary Index ■■■■■ 289 About the author Agus Kurniawan is a lecturer, researcher, IT consultant, and author. He has 1 7 years of experience in various software and hardware development projects, delivering materials in training and workshops, and technical writing. He has been awarded the microsoft Most Valuable Professional (MVP) award 14 years in a row His topic interests are software engineering, embedded systems, networking, and security systems. He has been working as a lecturer and researcher at the Faculty of Computer Science, Universitas Indonesia Currently, he is pursuing a PhD in computer science at the freie Universitat in Berlin, Germany. He can be reached on his blog at http://blog.aguskurniawan.netandTwitterat@agusk2010

试读 127P Practical Contiki-NG: Programming for Wireless Sensor Networks
立即下载 低至0.43元/次 身份认证VIP会员低至7折
    Hi,Mr.Wang 文件没法用

    关注 私信 TA的资源

    Practical Contiki-NG: Programming for Wireless Sensor Networks 19积分/C币 立即下载
    Practical Contiki-NG: Programming for Wireless Sensor Networks第1页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第2页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第3页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第4页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第5页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第6页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第7页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第8页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第9页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第10页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第11页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第12页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第13页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第14页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第15页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第16页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第17页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第18页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第19页
    Practical Contiki-NG: Programming for Wireless Sensor Networks第20页


    19积分/C币 立即下载 >