Fog Protocol and Fogkit: a Json-Based Protocol and Framework for Communication Between Bluetooth-Enabled Wearable Internet of Things Devices

Fog Protocol and Fogkit: a Json-Based Protocol and Framework for Communication Between Bluetooth-Enabled Wearable Internet of Things Devices

FOG PROTOCOL AND FOGKIT: A JSON-BASED PROTOCOL AND FRAMEWORK FOR COMMUNICATION BETWEEN BLUETOOTH-ENABLED WEARABLE INTERNET OF THINGS DEVICES AThesis presented to the Faculty of California Polytechnic State University San Luis Obispo In Partial Fulfillment of the Requirements for the Degree Master of Science in Computer Science by Spencer Lewson June 2015 c 2015 Spencer Lewson ALL RIGHTS RESERVED ii COMMITTEE MEMBERSHIP TITLE: Fog Protocol and FogKit: A JSON-Based Protocol and Framework for Communica- tion Between Bluetooth-Enabled Wearable Internet of Things Devices AUTHOR: Spencer Lewson DATE SUBMITTED: June 2015 COMMITTEE CHAIR: Professor John Bellardo, Ph.D. Department of Computer Science COMMITTEE MEMBER: Professor David Janzen, Ph.D. Department of Computer Science COMMITTEE MEMBER: Professor John Clements, Ph.D. Department of Computer Science iii Abstract Fog Protocol and FogKit: A JSON-Based Protocol and Framework for Communication Between Bluetooth-Enabled Wearable Internet of Things Devices Spencer Lewson Advancements in technology have brought about a wide variety of devices, such as embedded devices with sensors and actuators, personal computers, smart devices, and health devices. Many of these devices are categorized as “wearables,” meaning that they are intended to be carried and used on one’s body. As this category increases in popularity and functionality, developers will need a convenient way for these devices to communicate with each other and store information in a standardized and efficient manner. The Fog protocol and FogKit framework developed and demonstrated for this thesis address these issues by providing a set of powerful features, including data posting, data querying, event notifications, and network status requests. These features are defined as convenient JSON formatted messages which can be communicated between Bluetooth peripherals using an iOS device running FogKit as router and server. iv ACKNOWLEDGMENTS Thanks to: Dr. John Bellardo, my thesis advisor who provided guidance and support • throughout the project Dr. David Janzen, a member of my committee • Dr. John Clements, a member of my committee • Sam, Stephanie, and Michael Lewson, my loving family who o↵ered unending • support Neil Daniels, a friend who provided assistance with the implementation of iOS • technologies Michael DeWitt, a friend who provided feedback on the design and implemen- • tation of the FogKit and Bluetooth technologies v Contents List of Figures x 1 Introduction 1 2 Background 4 2.1 Overview of the Internet of Things . 4 2.1.1 Introduction to the Internet of Things . 4 2.1.2 VisionsoftheInternetofThings . 6 2.1.3 ApplicationsoftheIoT. 8 2.2 Wearable Technology . 9 2.2.1 Single Purpose Devices . 10 2.2.2 Multifunctional Devices . 11 2.2.3 BodyAreaNetworks ....................... 11 2.3 Overview of Bluetooth . 13 2.3.1 AboutBluetooth ......................... 13 2.3.2 Bluetooth Roles . 15 2.3.3 Bluetooth Data Representation . 15 2.3.4 Bluetooth Data Transfer . 18 2.4 OSI7LayerNetworkModel . 18 3 Related Technologies 21 3.1 IoT Stack . 21 3.2 Edge Technology Layer . 23 3.3 AccessGatewayLayer .......................... 23 3.4 Middleware Layer . 23 3.4.1 SensorMetadataAnnotations . 24 vi 3.4.2 ObservationalValueAnnotations . 25 3.5 ApplicationLayer............................. 25 3.6 Protocols . 27 3.6.1 Routing Protocol for Low-Power and Lossy Networks . 27 3.6.2 ConstrainedApplicationProtocol . 29 4 Fog Protocol 35 4.1 Discussion . 35 4.2 IdentificationInformation . 36 4.2.1 ID Attribute . 37 4.2.2 NameAttribute.......................... 37 4.2.3 TypeAttribute .......................... 37 4.2.4 Capabilities Attribute . 38 4.3 NotificationInformation . 38 4.4 MessageHeaderStructure . 38 4.4.1 Source and Destination Attributes . 39 4.4.2 Confirmation Attribute . 39 4.4.3 Message ID and Response Message ID Attriutes . 40 4.4.4 Version Attribute . 40 4.4.5 TypeAttribute .......................... 41 4.5 Event Messages . 41 4.5.1 Event Type Attribute . 42 4.5.2 Context Attributes . 42 4.6 Post Messages . 42 4.6.1 Post Attribute . 43 4.7 Query Messages . 44 4.7.1 SelectAttribute.......................... 45 4.7.2 WhereAttribute ......................... 45 4.7.3 Query Responses . 47 4.7.4 Deleting . 48 4.7.5 Updating ............................. 48 4.8 ACK and Error Messages . 49 vii 4.8.1 ACK . 49 4.8.2 Error . 50 4.9 NetworkStatusRequests. 50 4.9.1 NetworkStatusQueries . 50 4.9.2 Status Responses . 51 4.10 Comparison to Other Protocols . 52 4.10.1 Message Routing . 53 4.10.2 Message Content Complexity . 53 4.10.3 Message Size . 54 5FogKit 55 5.1 Overview . 55 5.2 Framework Design . 57 5.2.1 Central Framework . 57 5.2.2 Peripheral Framework . 60 5.2.3 Shared Code . 61 5.3 Bluetooth GATT Profile . 62 6 Expected Use Cases 64 6.1 Thought Exercises . 65 6.1.1 Wearable Sensing Devices . 65 6.1.2 Wearable Event Device . 70 6.1.3 Wearable System . 71 6.2 Demonstrations . 76 6.2.1 PostApplicationExample . 76 6.2.2 EventApplicationsExample . 79 7 Future Enhancements 83 7.1 Fog Protocol . 83 7.1.1 Value Standardization . 83 7.1.2 Protocol Optimizations . 84 7.1.3 Binary Data Transfer . 84 7.2 FogKit . 84 7.2.1 Security . 84 viii 7.2.2 Background Processing . 85 7.2.3 ImplementationTesting . 85 8 Conclusion 86 Bibliography 89 Appendix A Fog Protocol Keys 93 1IdentityMessages.............................93 2 NewDataNotificationMessage . 93 3 NetworkStatusMessages......................... 94 4 NetworkStatusResponseMessages . 94 5 MessageHeader.............................. 94 6EventMessages..............................95 7PostMessages...............................95 8QueryMessages..............................95 9QueryResponseMessages........................95 ix List of Figures 2.1 TheGartnerHypeCyclechart[35]. 5 2.2 Cisco’s prediction for number of connected devices by 2020[18]. 6 2.3 The three visions of the Internet of Things[6]. 7 2.4 The merits and demerits of di↵erent BAN technologies.[32] . 12 2.5 The characteristics of di↵erent BAN technologies.[32] . 12 2.6 The Core Bluetooth Stack[1] . 14 2.7 The Bluetooth Central and Peripheral[1]. 16 2.8 The Bluetooth GATT Profile. 17 2.9 The OSI 7 Layer Model[7]. 18 3.1 AnInternetofThingsStack[6]. 22 3.2 AScreenshotofanOpenIoTVisualization.. 26 3.3 AnexampleRPLroutingtree[36].. 28 3.4 TheLayeringofCoAP[42].. 31 3.5 Example of reliable transmission[42]. 32 3.6 Example of the requests/response model in CoAP[42]. 33 3.7 TheCoAPMessageFormat.. 33 5.1 The FogKit star topology. 56 5.2 The FogKit layers. 57 5.3 UMLoverviewofFogKitPrototypeFramework. 58 5.4 The GATT profile for a Fog Bluetooth peripheral. 62 x Chapter 1 Introduction The world is currently experiencing an “explosion” of connected devices. Advance- ments in technology and significant decreases in hardware costs have led to the mass adoption of electronic devices, collectively known as the “Internet of Things” (IoT). These IoT devices, which are constantly sensing and generating data, are all inter- connected, allowing them to communicate with each other and make decisions to help improve our lives. There are many visions of the IoT that range from the massive deployment of thou- sands of sensors and actuators to a few smart objects worn on one’s body that com- municate with each other. However, in all of these visions, unique sets of challenges arise that must be overcome. Although the IoT encompasses a wide variety of devices, from laptops and smart phones to embedded chips with sensors and actuators, the majority of them fall in the latter category. This category is characterized by devices that are typically constrained with limited energy and computational power. One class of device in the IoT is commonly referred to as wearable technology. “Wear- ables” include devices that are carried on one’s body, such as smart phones, smart watches, pedometers, and heart rate monitors. These devices often connect to a smartphone via Bluetooth and gather health information and display data or notifi- cations to the wearer[17]. As this category becomes more popular and the function- 1 ality of these devices increases in complexity, it is clear that many of these devices will need an improved protocol to communicate with each other and/or store data externally. Current protocols used in the IoT are designed to face a few key challenges in IoT networks, including efficiency and interoperability. The Internet Engineering Task Force defined the layer 3 and 4 protocols[28], RPL and CoAP, to address these chal- lenges. However, they were designed for massive networks with thousands or millions of nodes[34][42]. These layers and protocol message formats are difficult to work with and have an unnceccessary overhead for small Bluetooth networks used by wearable technology. The Fog protocol and FogKit framework developed for this thesis attempt to address these shortcomings by defining a convenient method of communication that is de- signed specifically for wearable devices operating on Bluetooth networks. This was accomplished by reviewing other protocols and technology, learning from their design decisions, and integrating these lessons into the Fog system. The Fog protocol defines a simple set of messages that are sent from device to device. These messages can be of many types, including event messages notifying a device that an event occurred, post messages that include data for the central device to store, query messages that request data, and more. For developer convenience, messages are transferred from the peripheral to the central device in an easy key-value pairing known as the Javascript Object Notation (JSON) form, and then depending on the destination, routed to the designated device or consumed by the central device itself. The Fog protocol was designed alongside its prototype implementation, FogKit. The purpose of FogKit was to act as a proof-of-concept that guided the direction and features of the Fog protocol. FogKit creates this functionality between an iOS device and multiple Bluetooth devices. In the FogKit model, the iOS device acts as a server that routes communication between the other Bluetooth devices and as an external database to store data from these devices.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    105 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us