On Practical Device-2-device Communication in The Internet of Things
Authors: Essameldin Aliaa 
Published: July 2019

Device-to-device (D2D) communication, or the establishment of direct communication between nearby devices, is an exciting and innovative feature of the next-generation networks. D2D has specially attracted the attention of the research community because it is a key ingredient in creating Internet of Things (IoT): a network of physical objects that are embedded with sensors to collect data about the world and networking interfaces to exchange this data. IoT can serve a wide variety of application domains ranging from health and education to green computing and property management. Fortunately, processors, communication modules and most electronic components are diminishing in size and price, which allows us to integrate them into more objects and systems.Today, companies such as Intel and Cisco are trying to make general purpose IoT devices available to everyday developers, thus expediting the rate at which the world is adopting IoT. Many of those devices are becoming more affordable and the internet is swamped with tutorials on how to build simple systems with them. However, despite the fundamental importance of effective D2D communication in IoT, we have a shortage of work that goes beyond standards being developed to accurately assess practical D2D communication performance of such devices.We address this gap by studying different communication metrics on representative general purpose IoT devices and examining their impact in practical settings. We share our experiences assessing the performance of different communication technologies and protocol stacks on these devices in different environments. Additionally, we utilize this knowledge to improve “UpnAway”, an agile UAV Cyber-Physical-System Testbed developed at CMU Qatar, by enhancing communication between IoT devices attached to the drones for on-board processing and autonomous navigation control.Measuring D2D Performance in IoT devicesWe investigated the performance of Intel Edison (Fig. 1, a) and Raspberry-Pi (Fig. 1, b) devices because they are the two most representative general purpose IoT devices. The Intel Edison devices are equipped with a dual-core CPU, single-core microcontroller, integrated Wi-Fi, Bluetooth 4.0 support, 1 GB DDR and 4GB Flash memory and 40 multiplexed GPIO interfaces. Being so highly equipped, they are being rapidly adopted by a substantial segment of IoT developers worldwide. The Raspberry-Pi devices are the currently most widely used devices, so we used them for results comparison and validation. We made our measurements on D2D WiFi and Bluetooth links because, on both the Edison and Raspberry-Pi devices, they are the most user friendly communication interfaces. The Intel Edison devices come with built-in Wifi and Bluetooth interfaces that can be controlled through friendly GUI and the Raspberry-Pi devices can support these technology by simply plugging the corresponding USB dongles.Our investigations involved accurately measuring RTT, Throughput, Signal Strength and reliability. The experiments involved:Sending time-stamped packets to an echo-server then using the echo to calculate the round-trip-time (RTT), Exchanging files multiple times then calculating average time-delay over different distances (Fig. 2), (Throughput), Increasing distance between nodes and reading signal strength (Signal Strength), Transferring large files repeatedly to test reliability of different protocols (reliability).In addition to the data collected, these investigations helped us make some unsettling observations about the Intel's Edison devices. First, we found a bug in configuring BlueZ, the linux implementation of the Bluetooth stack, over Yocto, the operating system running on the Edison devices: the RFCOMM, a reliable protocol by specification, link was unable to catch transmission errors. We suggest using TCP/IP over a BNEP bluetooth connection as a reliable alternative for RFCOMM when using the Edison Devices. Second, we observed that the RTT of WiFi D2D connection between Edison devices was significantly higher than that between the Raspberry-Pi. We suspect that this is attributed to the Edison's energy saving feature.Investigating A Relevant Application: UpNAwayThe second part of our research involved using D2D communication between Edison Intel devices to improve UpnAway. We chose this application because of its significance in improving cyber-physical systems which can contribute to various industrial areas such as aerospace, transportation, robotics and factory automation systems. UpnAway addresses the Cyber-Physical System community's unmet need for a scalable, low-cost and easy-to-deploy test-bed.The UpnAway testbed, however, this testbed was centralized: The UAV Node Modules (Fig. 4) used to run on a central computer while streaming motion instructions to the drones. It is a given that a distributed system has higher scalability and stability than a centralized one. So we helped the Up and Away team leverage D2D communication to upgrade the testbed to a distributed version of itself. We did this by mounting an Edison device on each drone. Then we established D2D connections between the edisons, their respective drones and the central node. Now, instead of having all computation done in the central node, the central drone now only performs localization and informs each Node Module, now running on the Edison, of its drone's coordinates.Future WorkIn the future, we would like to study the energy consumption aspect of data transmission over D2D connections. Further, we are interested in measuring how these devices perform over different technologies in different environments: outdoors, indoors in an open corridor and inside cars, for example. Such measurements will contribute to the design of many developing IoT systems.