基于嵌入式Web的ZigBee网关的设计与实现
发布时间:2018-05-15 06:10
本文选题:嵌入式系统 + ZigBee ; 参考:《杭州电子科技大学》2014年硕士论文
【摘要】:物联网技术产业在中国作为国家重要战略,被国家重点的发展。在物联网应用中,最主要的方式是通过无线技术将传感器得到的数据传输到互联网中,从而实现通过互联网访问和控制物理的实体。目前在物联网的传感层中最流行的无线技术是ZigBee技术,而为了将ZigBee个域网内的信息传输到互联网中,需要ZigBee转以太网的网关。 在物联网具体的应用场合,如智能家居、工业物联网上以及其他的需要通过ZigBee无线局域网接入互联网上地方,都需要一种ZigBee网关。它的主要功能就是将ZigBee个域网上的数据透明传输到以太网上,并且实现了网关的通用性,只要ZigBee模块数据传输过程中是按照固定的协议,网关就能实现将数据传输到上位机上。 本课题是以STM32F4为控制核心,使用的是DP83848网络芯片和Digi ZigBee模块;DP83848使用方便,可直接和STM32芯片对应的管脚相连,使用简易的传输模式就可以直接通信,而Digi ZigBee模块具有功能强大、能够自组网、断网后能够从新的连接的优点。它的信号强度高,在室内最大可传输30m,且可保持低功耗,通过网关可以监控整个网路。网关上还支持一个232接口能够将接收来的数据直接传到上位机上。 在软件上,本设计使用LwIP轻型TCP/IP协议栈,它不仅可以在有系统的嵌入式设备也可以在没有系统的嵌入式设备上运行,并且移植起来方便。为了支持网页访问能够网关,网关上支持HTTP协议;通过CGI和SSI网页控制原理,实现了动态网页和静态网页配置和管理网关,可以有效的管理网关下面的ZigBee网络的设备。为了传输数据能够符合现场的需要,设计了两种方式进行传输数据,,一个是网口,另一个是串口;两种方式都能实时的将数据传输到以太网和上位机上。 网关的测试上,主要分两个方面,第一是单板测试,另一个是组网测试;单板测试主要是对网页设置显示以及管理监控页面功能性验证,还有对串口和网口传输数据正确性验证;组网测试是将网关作为协调器对其他的设备组网测试,对网关监控和管理网络能力进行测试,还有对网关传输网络数据正确性进行测试。 文章最后,在完成课题的过程中所遇到的一些问题进行总结,包括ZigBee模块的选型、嵌入式网络协议选用,硬件上是怎样选用的CPU以及网络芯片使用方法。 为了实现随时随地的控制和管理接入互联网上的ZigBee个域网内的信息,本设计使用嵌入式Web技术,它的优点是可以使使用者不仅可以远程监控和管理,最主要的是使用起来方便,不用现场的面对使用设备;本设计还采用了数据透传的方式,这样是为了符合各种协议通用性,这样的优点是终端上使用不同协议都能使用此网关。
[Abstract]:Internet of things technology industry in China as an important national strategy, by the national key development. In the application of the Internet of things, the most important way is to transmit the data from the sensor to the Internet through wireless technology, so that the physical entities can be accessed and controlled through the Internet. At present, the most popular wireless technology in the sensor layer of the Internet of things is the ZigBee technology. In order to transmit the information from the ZigBee personal area network to the Internet, the gateway from ZigBee to Ethernet is needed. In specific applications of the Internet of things, such as smart home, industrial Internet of things and other need to access the Internet via ZigBee wireless LAN, there is a need for a ZigBee gateway. Its main function is to transparently transmit the data from the ZigBee personal domain network to Ethernet, and realize the universality of the gateway. As long as the data transmission process of the ZigBee module is in accordance with a fixed protocol, the gateway can transmit the data to the upper computer. This project is based on STM32F4, using DP83848 network chip and Digi ZigBee module DP83848, which can be directly connected with the pin corresponding to STM32 chip, can communicate directly with simple transmission mode, and Digi ZigBee module has powerful function. The advantages of being able to self-organize and disconnect the network from a new connection. It has high signal intensity, can transmit up to 30m in the room, and can keep low power consumption. It can monitor the whole network through gateway. The gateway also supports a 232 interface that can transmit received data directly to the host computer. In software, this design uses LwIP lightweight TCP/IP protocol stack, which can run not only on embedded devices with system but also on embedded devices without system, and it is convenient to transplant. In order to support the gateway of web access, the HTTP protocol is supported on the gateway, and the dynamic and static web page configuration and management gateway are realized through the CGI and SSI web page control principle, which can effectively manage the ZigBee network devices under the gateway. In order to meet the needs of the field, two ways are designed to transmit data, one is the network port, the other is the serial port, and both can transmit the data to Ethernet and the host computer in real time. In the test of gateway, there are two main aspects: the first is single board test, the other is networking test, the single board test is mainly to display the web page and manage the functional verification of the monitoring page. It also verifies the correctness of serial port and network port transmission data. The networking test uses the gateway as coordinator to test other equipment networking, and tests the gateway monitoring and management network capability. There is also the gateway transmission network data correctness test. Finally, some problems encountered in the process of completing the project are summarized, including the selection of ZigBee modules, the selection of embedded network protocols, the selection of CPU in hardware and the use of network chips. In order to realize the control and management of the information in the ZigBee personal area network connected to the Internet anytime and anywhere, this design uses the embedded Web technology. Its advantage is that the user can not only monitor and manage remotely, but also use it conveniently. There is no need to use the equipment in the field; the design also adopts the method of data transmission, which is in line with the universality of various protocols, such an advantage is that the terminal can use different protocols to use this gateway.
【学位授予单位】:杭州电子科技大学
【学位级别】:硕士
【学位授予年份】:2014
【分类号】:TN92
【参考文献】
相关期刊论文 前10条
1 胡国珍;王泉;魏e
本文编号:1891292
本文链接:https://www.wllwen.com/kejilunwen/wltx/1891292.html