物联网中Zigbee节点的监控和管理系统的开发毕业论文

 2021-04-19 09:04

摘 要

随着科技的发展与时代的进步,无线通信技术已成为了人们关注的焦点,ZigBee是一种功耗低且适用于短距离的无线通信技术,主要面向智能家居以及城市建设等各种物联网应用。

ZigBee节点作为一款被广泛使用于物联网中嵌入式实时的系统,本身拥有着功耗低、可靠、性价比高的优点,因此有着十分广阔的应用前景。然而ZigBee节点本身并不存在自举开发或是监控的功能,这不利于对于ZigBee开发套件的观测与使用。本次课题所开发的软件结合了组帧、解帧技术,通过串口通信以及ZigBee通信技术进行对PC机节点以及远程目标节点的Flash读取、写入、擦除等操作,使得用户可以通过系统直观的测试与监控ZigBee节点的工作状态、对ZigBee节点的工作参数进行管理和配置。既顺应当代无线通信技术以及物联网应用的发展,也让用户能够更直观地了解ZigBee节点的性能以及功能。

关键字:ZigBee;帧协议;串口;Falsh操作

Development of ZigBee Monitoring and Management System in Internet of Things

ABSTRACT

With the development of science and technology and the progress of the times, Wireless communication technology has become the focus of people's attention.

ZigBee is a low power consumption and suitable for short range wireless communication technology, Which is mainly for the smart home and urban construction, such as a variety of networking applications.

ZigBee node has the advantages of low power consumption, high reliability and high cost as a widely used in the Internet of things embedded real-time system. So it has a very broad application prospects. However, ZigBee node itself does not exist in the function of development or monitoring. This is not conducive to the observation and use of the ZigBee development kit. The software developed by the project combines the group frame, the solution frame technology, through the serial communication and ZigBee communication technology for the PC and remote target node Flash to read, write, erase and other operations. So that users can directly test and monitor the working status of the ZigBee node and the working parameters of the ZigBee node to manage and configure the system. This project not only adapts to the development of modern wireless communication technology and the application of Internet of things, but also allows users to more intuitive understanding of the performance and functionality of the ZigBee node.

Keywords: ZigBee;Frame agreement;Serial port;Flash operation

目 录

1 前言 - 1 -

1.1课题研究背景 - 1 -

1.2课题研究目的及意义 - 1 -

1.3课题解决的主要问题 - 2 -

1.4主要开发及运行环境 - 2 -

2 技术原理 - 3 -

2.1串口通信技术 - 3 -

2.2帧协议的组成与解析 - 3 -

2.2.1组帧协议 - 3 -

2.2.2解帧协议 - 6 -

2.3 ZigBee转发技术 - 8 -

2.4多线程通信技术 - 8 -

3 硬件分析 - 10 -

3.1硬件概述 - 10 -

3.1.1Arm Cortex-M0 及飞思卡尔Kinetis L系列 - 10 -

3.1.2Kinetis L系列MCU突出应用特点 - 10 -

3.1.3KW01-ZigBee开发套件 - 11 -

3.2嵌入式操作系统 - 11 -

4 软件功能设计 - 13 -

4.1需求分析 - 13 -

4.1.1需求规定 - 13 -

4.1.2主要功能及执行流程 - 13 -

4.1.3全局变量的定义 - 14 -

4.2串口数据通讯(Uart类) - 14 -

4.2.1串口初始化函数 - 15 -

4.2.2查询本机串口号函数 - 15 -

4.2.3接发数据函数 - 16 -

4.2.4开关串口函数 - 17 -

4.2.5设置串口接收中断条件函数 - 17 -

4.3组帧与解帧任务实现(PCNode类) - 18 -

4.3.1检测PC节点函数 - 18 -

4.3.2Flash读取操作函数 - 19 -

4.3.3Flash擦除操作函数 - 21 -

4.4工程窗体设计(Frame类) - 22 -

4.4.1构造函数与加载窗体事件程序 - 22 -

4.4.2 PC节点的Flash操作 - 22 -

4.4.3 RF验证收发 - 24 -

4.4.4目标节点(Target)Flash操作 - 25 -

4.4.5 其余窗体事件 - 27 -

5 系统软件测试 - 29 -

5.1开发板程序的烧写 - 29 -

5.2检测PC节点 - 29 -

5.3RF转发测试 - 30 -

结 论 - 31 -

致 谢 - 32 -

参考文献 - 33 -

附录A:毕业设计(论文)任务书 - 34 -

论文内容及具体要求 - 34 -

主要开发步骤 - 34 -

1 前言

1.1课题研究背景

随着科技的发展与时代的进步,无线通讯技术成为了人们关注的焦点。人们所熟知的蓝牙通讯技术,虽然方便快捷,然而在应用于工业、家庭自动化控制以及工业遥控领域时,人们发现其中也存在了一些缺陷,例如蓝牙通讯技术太过复杂,功率消耗大,且可使用范围小,同时,在工业现场,无线传输必须高可靠、抵抗电磁干扰。因此,经过人们的长期努力,ZigBee协议于2003年问世。

ZigBee是一种功耗低(不到蓝牙1/10)且适用于短距离的无线通信技术,又被称为紫蜂协议,适用于自动控制以及远程控制领域,同时可以嵌入各种设备。如今,ZigBee通讯技术已融入各类电子产品以及工业领域,应用范围横跨全球民用、商用、公用及工业用等市场。本次课题所使用的KW01开发套件,是Freescale于2014年正式推出的Arm Cortex-M0 内核Kinetis KL26MCU与SX1231-RF 组成的一款性能突出的套件,主要面向智能家居以及城市建设等各种物联网应用。

1.2课题研究目的及意义

目的:本次课题则是使用visual studio2012开发软件以及C#语言,调试开发套件的内部固件程序,开发一个能够在PC端运行的软件系统,不仅可以通过串口也可以通过ZigBee协议实现短距离的对不同节点数据的监测与控制。

意义:作为一款被广泛使用于物联网中嵌入式实时的系统,ZigBee本身拥有着功耗低、可靠、性价比高的优点,因此有着十分广阔的应用前景。然而ZigBee节点本身并不存在自举开发或是监控的功能,这不利于对于ZigBee开发套件的观测与使用。本次课题所开发的软件使得用户可以通过系统直观的测试与监控ZigBee节点的工作状态、对ZigBee节点的工作参数进行管理和配置。也希望这次的课题能够给ZigBee研究者带来一些自己的见解,为促进国内ZigBee技术的发展贡献微薄之力。

1.3课题解决的主要问题

这次项目要解决的几个问题有:

  1. PC端与PC节点之间的串口通信。
  2. PC节点数据的采集。
  3. 目标节点(Target)数据的采集。
  4. PC节点与目标节点(Target)之间的通讯及RF收发。
  5. Flash读写功能的实现。

1.4主要开发及运行环境

我们主要以visual studio为平台,C#语言为工具,编写出可以通过串口以及ZigBee技术与两个节点通信的系统,对节点进行监测与控制。主要工具有:

您需要先支付 80元 才能查看全部内容!立即支付

课题毕业论文、开题报告、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找,优先添加企业微信。