Taking Arduino to the Internet of Things: the ASIP Programming Model Gianluca Barbon, Michael Margolis, Filippo Palumbo, Franco Raimondi, Nick Weldin

Taking Arduino to the Internet of Things: the ASIP Programming Model Gianluca Barbon, Michael Margolis, Filippo Palumbo, Franco Raimondi, Nick Weldin

Taking Arduino to the Internet of Things: the ASIP programming model Gianluca Barbon, Michael Margolis, Filippo Palumbo, Franco Raimondi, Nick Weldin To cite this version: Gianluca Barbon, Michael Margolis, Filippo Palumbo, Franco Raimondi, Nick Weldin. Taking Ar- duino to the Internet of Things: the ASIP programming model. Computer Communications, Elsevier, 2016, 00, pp.1 - 15. 10.1016/j.comcom.2016.03.016. hal-01416490 HAL Id: hal-01416490 https://hal.inria.fr/hal-01416490 Submitted on 14 Dec 2016 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Computer Communi- Computer Communications 00 (2016) 1–15 cations Taking Arduino to the Internet of Things: the ASIP programming model Gianluca Barbona, Michael Margolisb, Filippo Palumboc,d, Franco Raimondib, Nick Weldinb aUniversity of Grenoble Alpes, Inria, LIG, CNRS, France bDepartment of Computer Science, Middlesex University, London, United Kingdom cInstitute of Information Science and Technologies, National Research Council, Pisa, Italy dDepartment of Computer Science, University of Pisa, Pisa, Italy Abstract Micro-controllers such as Arduino are widely used by all kinds of makers worldwide. Popularity has been driven by Arduino’s simplicity of use and the large number of sensors and libraries available to extend the basic capabilities of these controllers. The last decade has witnessed a surge of software engineering solutions for “the Internet of Things”, but in several cases these solutions require computational resources that are more advanced than simple, resource-limited micro-controllers. Surprisingly, in spite of being the basic ingredients of complex hardware-software systems, there does not seem to be a simple and flexible way to (1) extend the basic capabilities of micro-controllers, and (2) to coordinate inter-connected micro-controllers in “the Internet of Things”. Indeed, new capabilities are added on a per-application basis and interactions are mainly limited to bespoke, point-to-point protocols that target the hardware I/O rather than the services provided by this hardware. In this paper we present the Arduino Service Interface Programming (ASIP) model, a new model that addresses the issues above by (1) providing a “Service” abstraction to easily add new capabilities to micro-controllers, and (2) providing support for networked boards using a range of strategies, including socket connections, bridging devices, MQTT-based publish-subscribe messaging, discovery services, etc. We provide an open-source implementation of the code running on Arduino boards and client libraries in Java, Python, Racket and Erlang. We show how ASIP enables the rapid development of non-trivial applications (coordination of input/output on distributed boards and implementation of a line-following algorithm for a remote robot) and we assess the performance of ASIP in several ways, both quantitative and qualitative. Keywords: Arduino, MQTT, IoT, Service Discovery, Communication Middleware 1. Introduction on a per-application basis and interactions are mainly limited to bespoke, point-to-point protocols that target the hardware I/O The Internet of Things (IoT) paradigm bases its success on rather than the services provided by this hardware. the pervasive presence around us of a variety of objects (such Several commercial off-the-shelf devices are available on as Radio-Frequency IDentification -RFID- tags, sensors, actu- the market, but usually they are tightly coupled with specific ators, mobile phones, etc.) which, through unique addressing vendors and require local gateways to export sensors and actu- schemes, are able to interact with each other and cooperate to ators as services on the Web. Instead, by embracing the open reach common goals [1]. source and hardware principles, it is possible to offer a system Surprisingly, in spite of being the basic ingredients of com- easily modifiable to suit the user needs and to be used as the plex hardware-software systems, there does not seem to be a basis for new products in different scenarios. Micro-controllers simple and flexible way to (1) extend the basic capabilities of such as Arduino are used widely by all kinds of makers world- micro-controllers, and (2) to coordinate inter-connected micro- wide. Popularity has been driven by Arduino’s simplicity of controllers in IoT scenario. Indeed, new capabilities are added use and the large number of sensors and libraries available to extend the basic capabilities of these controllers. Using such an Email addresses: [email protected] (Gianluca Barbon), inexpensive device makes the installation and maintenance of a [email protected] (Michael Margolis), system easier. In this way, it is possible to offer a system easily [email protected] (Filippo Palumbo), modifiable to suit the user needs and to be used as the basis for [email protected] (Franco Raimondi), [email protected] new products in different scenarios. (Nick Weldin) 1 / Computer Communications 00 (2016) 1–15 2 A first approach using the Internet for interacting with real- the protocols used for RESTful architecture are not appropri- world resource-constrained devices was to incorporate smart ate for resource constrained networks and devices [15]. The things into standardized Web service architectures (such as large overhead of HTTP causes packet fragmentation and per- SOAP, WSDL, UDDI) [2] or embedding HTTP servers into the formance degradation when dealing with M2M devices. Also, devices. However, in practice, this resulted to be too heavy and TCP flow control is not appropriate for resource-constrained complex for simple objects [3]. In order to face the problem of devices and the overhead is too high for short transactions. interconnecting several resource-constrained nodes among each To extend the REST architecture for resource-constrained other and to the Internet, several communication protocols have devices, a first solution presented in the literature is given by been introduced [4]. These protocols are inspired by machine- the Constrained Application Protocol (CoAP) [16]. CoAP is a to-machine (M2M) scenarios and share the same fundamentals protocol intended to be used in simple devices allowing them of communication paradigms typical of standard computer net- to communicate over the Internet. CoAP includes a subset of works. M2M communications occur among machines (objects the HTTP functionalities, optimized for M2M applications. It or devices) with computing/communication capabilities with- also supports multicast, very low overhead, and asynchronous out human intervention [5]. message exchanges over a user datagram protocol (UDP) [17]. In this paper we present the Arduino Service Interface Pro- However, also in CoAP, the HTTP protocol is still present. It gramming (ASIP) model, a new model that addresses the is- has not been designed to support persistent communication and, sues above by (1) providing a “Service” abstraction to easily even if Web Sockets have been introduced in the recent draft of add new capabilities to micro-controllers, and (2) providing HTML 5 (offering a bidirectional communication channel be- support for networked boards using a range of strategies, in- tween client and server), they totally hide the naming scheme cluding socket connections, bridging devices, MQTT-based that makes REST so powerful: every resource having a stan- publish-subscribe messaging, discovery services, etc. We pro- dard unique identifier, the URI. The Web Sockets approach re- vide an open-source implementation of the code running on Ar- sults in non-standard solutions for manipulating resources [18]. duino boards and client libraries in Java, Python, Racket and Er- In order to support collaboration between devices, there is the lang. Our programming model allows to tackle the heterogene- need to unify the naming scheme of smart objects and the URIs. ity that is a distinguishing feature of several IoT applications; For this purpose, a new communication paradigm has been pre- by heterogeneity we mean here hardware differences (different sented in the literature based on the “publish-subscribe” (pub/- microcontrollers), performances/capabilities of different boards sub) mechanism [19, 20]. in terms of CPU power, memory, and storage, and software Directed Diffusion [21] is considered the earliest pub/sub heterogeneity (e.g., choice of programming languages). We communication paradigm for WSN. It is a data-centric protocol show how ASIP enables the rapid development of non-trivial in which named data is described by attribute-value pairs. The applications (coordination of input/output on distributed boards subscriptions are called interests and are broadcasted through- and implementation of a line-following algorithm for a remote out the whole WSN. Another early pub/sub middleware for robot) and we assess the performance of ASIP in several ways, WSN is Mires [22]. It is implemented on top of TinyOS [23], both quantitative and qualitative. an event-based operating system for WSNs. In Mires each sen- The rest of the paper is organized as follows.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 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