Internet of Things Mesh Network

Internet of Things Mesh Network

Internet of Things mesh network Using the Thread networking protocol Anton Alm Faculty of Health, Science and Technology Computer Science 15HP Supervisor: Stefan Alfredsson Examiner: Per Hurtig Date: 2019:01:25 I Abstract This thesis summarizes my project in setting up a Thread network. The idea of this project was presented by the company ÅF in Karlstad, Sweden. ÅF wishes to upgrade their current demonstrator for IoT. The current demonstrator includes Azure Cloud component, Raspberry Pi, Bluetooth and Arduino components. The upgrade includes implementing Thread technology together with Thread verified hardware from Nordic semiconductor [1] and the Raspberry Pi Foundation [2]. Thread is an IoT mesh networking protocol that was released year 2014. Compared to Bluetooth it offers IP communication (including IPv6) combined with higher reliability, performance and security. The process of installing, compiling and configuring the Thread network is explained. The result is an operational thread network that has sensor devices sending data to an HTTP web server, where the data is stored and monitored. Though, there are many improvements and functions that can be implemented to make this demonstrator more appealing. II Contents 1 Introduction ...................................................................................... 1 1.1 Applications ..................................................................................................... 2 1.2 IoT Protocols ................................................................................................... 3 1.3 Thread .............................................................................................................. 4 1.4 Purpose ............................................................................................................ 5 1.5 Goals ................................................................................................................ 6 1.6 Structure .......................................................................................................... 7 2 Background ....................................................................................... 8 2.1 IoT market ....................................................................................................... 8 2.2 Thread .............................................................................................................. 9 2.2.1 Network Architecture ..................................................................................................... 10 2.2.2 Protocol stack.................................................................................................................. 12 2.2.3 IP Addressing .................................................................................................................. 14 2.3 Constrained Application Protocol .................................................................. 15 2.4 Hardware ....................................................................................................... 16 2.4.1 Hardware specification .................................................................................................. 17 2.4.2 Hardware Usage ............................................................................................................. 18 3 Design .............................................................................................. 19 3.1 Network layout .............................................................................................. 19 3.2 Installation .................................................................................................... 20 3.2.1 Software development kit ............................................................................................. 20 3.2.2 Border router ................................................................................................................. 20 3.2.3 Network Co Processor ................................................................................................... 20 3.2.4 Sensor devices ................................................................................................................. 21 3.2.5 Web Server ...................................................................................................................... 21 3.3 Network configuration .................................................................................. 22 3.3.1 Border router .................................................................................................................. 22 3.3.2 Network co-processor .................................................................................................... 22 4 Implementation ............................................................................... 23 4.1 Network settings and commissioning ........................................................... 23 4.1.1 Network co-processor .................................................................................................... 24 4.1.2 Sensor device .................................................................................................................. 24 III 4.2 Sensor devices ............................................................................................... 26 4.2.1 Main function and global variables. .............................................................................. 26 4.2.2 Timer, buttons and CoAP messages .............................................................................. 29 4.3 Web server ..................................................................................................... 34 4.3.1 Port forwarding............................................................................................................... 34 4.3.2 Crosscoap ........................................................................................................................ 34 4.3.3 Database .......................................................................................................................... 35 4.3.4 PHP & HTML .................................................................................................................. 36 5 Results ............................................................................................. 40 5.1 Packet trace analysis ......................................................................................41 5.2 Database visualization ................................................................................... 44 6 Evaluation ....................................................................................... 45 6.1 Goals .............................................................................................................. 45 6.2 Future work ................................................................................................... 46 6.3 Problems ........................................................................................................ 47 7 Summary and Conclusions .............................................................. 48 References ............................................................................................ 50 IV List of figures Figure 1: ÅF's IoT demonstrator. ............................................................................. 5 Figure 2: An example of a Thread network architecture ....................................... 10 Figure 3: HTTP and CoAP protocol stacks. ............................................................ 15 Figure 4: The Nordic Semiconductor nRF52840 Development Kit ..................... 16 Figure 5: The Raspberry Pi Model 3B .................................................................... 16 Figure 6: The programmable buttons on the nRF52840 DK. ................................ 17 Figure 7: The Raspberry Pi and development kit forming the Border router. ..... 18 Figure 8: An overview of the network layout. ........................................................ 19 Figure 9: DK's connected to Embedded Studio and J-Link on the laptop. ...........21 Figure 10: Network co-processor status ................................................................ 22 Figure 11: Network co-processor status ................................................................. 24 Figure 12: Joining the network as a sensor device. ............................................... 24 Figure 13: Configuration settings and testing the network for sensor device. ...... 25 Figure 14: Main function. ....................................................................................... 26 Figure 15: Global variables ..................................................................................... 27 Figure 16: Function thread_instance_init. ........................................................... 27 Figure 17: Function thread_coap_init. .................................................................. 28 Figure 18: Function thread_bsp_init. ................................................................... 28 Figure 19: Function thread_coap_utils_temp_timer_init. .................................. 29 Figure 20: Function temp_timer_handler. ........................................................... 29 Figure 21: Function thread_coap_utils_send_message. ....................................... 31 Figure 22: Start of function bsp_event_handler. .................................................. 32 Figure 23: End of function bsp_event_handler. ................................................... 33 Figure 24: MYSQL

View Full Text

Details

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