Vis enkel innførsel

dc.contributor.advisorOnshus, Tor
dc.contributor.authorBlom, Marius
dc.date.accessioned2020-06-06T16:00:25Z
dc.date.available2020-06-06T16:00:25Z
dc.date.issued2020
dc.identifier.urihttps://hdl.handle.net/11250/2657062
dc.description.abstractFormålet med oppgaven var å fortsette med jobben Grindvik hadde gjort når det kommer til å skrive om Java applikasjonen til C++. Denne oppgaven inkluderte også jobben med å bruke en NRF robot for å kommunisere med den nye C++ applikasjonen ved å implementere ny maskinvare til roboten. Dette krever også å implementere Thread for lokalt nettverk for å bruke med roboter, sette opp en grense router for å videresende informasjon i hvilken som helst retning til et ekstern nettverk og implementere en MQTT-SN inngangsport for å kommunisere med en MQTT megler. NRF krever at det blir satt opp et Thread nettverk ved å bruke den åpne kildekode implementasjonen OpenThread for å kunne kommunisere med C++ applikasjonen. En Raspberry PI ble satt opp som å fungere som en grense router, og som en MQTT-SN inngangsport. Siden Raspberry PI mangler IEEE 802.15.4 standarden som brukes av Thread, så måtte en nRF52840-dongel bli koblet til og brukes som en nettverks ko-prosessor i applikasjonslaget. NRF roboten hadde allerede programvare for å kommunisere med periferiutstyr gjennom I2C protokollen, men manglet den nødvendige maskinvaren for å kommunisere med Thread. Kommunikasjonen på NRF roboten ble oppdatert fra å bruke Bluetooth Smart gjennom system-on-chip på roboten, i stedet ble det satt opp kommunikasjon gjennom MQTT protocollen ved å bruke en nRF52840-dongel via I2C. C++ applikasjonen ble testet med en ekte robot ved å abonnere på emner fra en MQTT megler på nett. NRF roboten gjorde målinger med infrarøde sensorer, og publiserte til samme emne gjennom MQTT-SN inngangsporten som var satt opp på Raspberry PI. Kildekoden i C++ applikasjonen ble ryddet opp i ved å flytte noen av funksjonalitetene fra main klassen over til egne respektive klasser. En ny funksjon ble laget i C++ applikasjonen der en ekte robot vil lese et koordinat par som C++ applikasjonen publiserer. Koordinat parene vil være relative til robotens nåværende posisjon i den ekte verden for å oppnå en implementasjon av en enkel navigasjon algoritme.
dc.description.abstractThe purpose of this thesis was to continue the work done by Grindvik with rewriting the existing Java server application to C++. This work also include using the NRF robot to communicate with the new C++ application by adding new hardware to the robot, which requires implementing Thread for a local network to use with the robots, setting up a border router to forward information in any direction to an external network and implementing a MQTT-SN gateway for communication with a MQTT broker. For the NRF robot to be able to communicate with the C++ application, the Tread network was set up by using OpenThread, which is the open-source implementation of Thread. A Raspberry PI was set up to function as a border router and as a MQTT-SN gateway. Since the Raspberry PI lack the IEEE 802.15.4 standard used by Thread, a nRF52840-dongle had to be connected and set up to be used as the network co-processor in the application layer. The NRF robot already had the software to communicate with peripherals with the I2C protocol but lacked the necessary hardware to communicate via Thread. The communication of the NRF robot was updated from using Bluetooth Smart via the system-on-chip and instead were set up to communicate through the MQTT protocol by using a nRF52840-dongle via I2C. The C++ application were tested with a real robot by subscribing to topics on an online MQTT broker. The NRF robot would publish measurements made by the infrared sensors to the same topic through the MQTT-SN gateway that is set up on the Raspberry PI and vice versa. The code in the C++ application have been cleaned up by moving some of the functionalities from the main class and into their own classes. A new function was made in the C++ application, where a real robot will read coordinate pairs published by the C++ application , the coordinate pairs will be relative to the robots current position in the real-world to achieve an implementation of a simple navigation algorithm.
dc.languageeng
dc.publisherNTNU
dc.titlenRF52 med OpenThread
dc.typeMaster thesis


Tilhørende fil(er)

Thumbnail

Denne innførselen finnes i følgende samling(er)

Vis enkel innførsel