Mesh Networking for IoT - Implemented on robots using Bluetooth Low Energy Mesh and Thread
Abstract
Denne oppgaven beskriver implementering, bruk og analyse av to forskjellige kommunikasjonsprotokollerdesignet for IoT implementert som to separate løsninger for å betjeneroboter som utførerer ”Simultaneous Localization And Mapping” (SLAM). Nettverkstopologiensom ble valgt, var mesh, og de to protokollene er Bluetooth Low Energy Meshog Thread. Oppgaven inneholder også relevant teori, informasjon om både hardware ogsoftware brukt i oppgaven, og robotapplikasjonen slik den virker.
Den første nettverksprotokollen implementert var Bluetooth Low Energy Mesh, somble implementert ved hjelp av Nordic Semiconductors Software Development Kit (SDK)for Mesh- og System-on-Chip-løsninger. Nye modeller ble implementert for å være kompatiblemed Bluetooth Low Energy Mesh-spesifikasjonen, til tross for at ikke all funksjonalitetble tatt i betraktning. Dessuten ble et UART- og USB-grensesnitt satt opp for åkommunisere med robotene, som de allerede gjorde med den forrige løsningen, for å sehvordan implementeringen oppførte seg.
Den andre protokollen, Thread, ble også implementert med et SDK fra Nordic Semiconductorbasert på en Open-Source-implementering av Thread, OpenThread. Applikasjonslageti Thread-implementasjonen bruker MQTT-SN, som er et publish/subscribe systemfor meldingsutveksling. Et UART-grensesnitt ble også implementert med løsningen for åimøtekomme meldinger fra robotene. Meldingene ble sendt til en ekstern server gjennomen gateway lokalisert på en Raspberry Pi 3+, som også fungerer som en Thread router.
Noen av sensorene på roboten ble kalibrert og testet mot en ny server som ble implementertpå samme tid som denne oppgaven. En ny kommunikasjonsstack ble også lagettil robotprogramvaren, og fjernet dermed noe av den tidligere programvaren, for å lage etmer minimalistisk grensesnitt til de nye applikasjonene.
Ulike testoppsett ble satt opp for å få en dypere forståelse av hvordan programmenepresterte med hensyn til pålitelighet, skalerbarhet, forsinkelse og dataflyt. Verktøy formonitorering og analyse av nettverk ble satt opp for de to programmene for å få en oversiktover meldingsoverføringer mellom enheter i Mesh-nettverkene i sanntid. Data ble deretterhentet ut for å visualisere meldingsflyt, hvis og hvor meldinger gikk tapt og hvordan deble behandlet på ulike punkt med tanke på blant annet forsinkelse. This thesis describes the implementation, use, and analysis of two different communicationprotocols designed for the internet of things, IoT, implemented as two separate solutionsto serve robots doing Simultaneous Localization and Mapping (SLAM). The networktopology chosen was mesh, and the two protocols were Bluetooth Low Energy Mesh andThread. The thesis also covers the relevant theory and a look at the hardware and softwareused.
The first network protocol was Bluetooth Low Energy Mesh, which was implementedusing Nordic Semiconductor’s software development kit for mesh and system-on-chip solutions.New models were implemented accordingly to be compliant with the definedMesh Profile and Model specification, though not all features were taken into consideration.Besides, a UART and a USB interface were set up to communicate with the robotsand the host computer as they already did with the previous solution, and to see how theimplementation behaves.
The second protocol, Thread, was also implemented with a software development kitby Nordic Semiconductor based on the open-source implementation of Thread, OpenThread.The application layer of the Thread implementation features MQTT-SN, which is a publish/subscribe message transport system. A MQTT-SN topic structure for message publishingand subscribing was made to suit the system in the way of best practice. A UARTinterface was also implemented with the solution to accommodate messages from therobots. The messages were published to an external broker through a gateway locatedon a Raspberry Pi 3+, which also acts as a Thread Border Router.
Some sensors on the robot were calibrated and tested towards a new server that wasimplemented at the same time as this thesis. Also, a new communication stack was madeon the robot, removing some of its previous parts, to make a more lightweight interface tothe new applications.
Different test setups were made to get a deeper understanding of how the applicationsperformed in terms of reliability, scalability, latency, and throughput. Network monitorsand sniffer tools were set up for the two applications to enable real-time message transmissionbetween the devices in the mesh networks. Data were extracted to visualize themessage flow, if they were lost and how they were processed where that was needed.