基于嵌入式Web的ZigBee網(wǎng)關的設計與實現(xiàn)
發(fā)布時間:2018-05-15 06:10
本文選題:嵌入式系統(tǒng) + ZigBee; 參考:《杭州電子科技大學》2014年碩士論文
【摘要】:物聯(lián)網(wǎng)技術產(chǎn)業(yè)在中國作為國家重要戰(zhàn)略,被國家重點的發(fā)展。在物聯(lián)網(wǎng)應用中,最主要的方式是通過無線技術將傳感器得到的數(shù)據(jù)傳輸?shù)交ヂ?lián)網(wǎng)中,從而實現(xiàn)通過互聯(lián)網(wǎng)訪問和控制物理的實體。目前在物聯(lián)網(wǎng)的傳感層中最流行的無線技術是ZigBee技術,而為了將ZigBee個域網(wǎng)內(nèi)的信息傳輸?shù)交ヂ?lián)網(wǎng)中,需要ZigBee轉(zhuǎn)以太網(wǎng)的網(wǎng)關。 在物聯(lián)網(wǎng)具體的應用場合,如智能家居、工業(yè)物聯(lián)網(wǎng)上以及其他的需要通過ZigBee無線局域網(wǎng)接入互聯(lián)網(wǎng)上地方,都需要一種ZigBee網(wǎng)關。它的主要功能就是將ZigBee個域網(wǎng)上的數(shù)據(jù)透明傳輸?shù)揭蕴W(wǎng)上,并且實現(xiàn)了網(wǎng)關的通用性,只要ZigBee模塊數(shù)據(jù)傳輸過程中是按照固定的協(xié)議,網(wǎng)關就能實現(xiàn)將數(shù)據(jù)傳輸?shù)缴衔粰C上。 本課題是以STM32F4為控制核心,使用的是DP83848網(wǎng)絡芯片和Digi ZigBee模塊;DP83848使用方便,可直接和STM32芯片對應的管腳相連,使用簡易的傳輸模式就可以直接通信,而Digi ZigBee模塊具有功能強大、能夠自組網(wǎng)、斷網(wǎng)后能夠從新的連接的優(yōu)點。它的信號強度高,在室內(nèi)最大可傳輸30m,且可保持低功耗,通過網(wǎng)關可以監(jiān)控整個網(wǎng)路。網(wǎng)關上還支持一個232接口能夠?qū)⒔邮諄淼臄?shù)據(jù)直接傳到上位機上。 在軟件上,本設計使用LwIP輕型TCP/IP協(xié)議棧,它不僅可以在有系統(tǒng)的嵌入式設備也可以在沒有系統(tǒng)的嵌入式設備上運行,并且移植起來方便。為了支持網(wǎng)頁訪問能夠網(wǎng)關,網(wǎng)關上支持HTTP協(xié)議;通過CGI和SSI網(wǎng)頁控制原理,實現(xiàn)了動態(tài)網(wǎng)頁和靜態(tài)網(wǎng)頁配置和管理網(wǎng)關,可以有效的管理網(wǎng)關下面的ZigBee網(wǎng)絡的設備。為了傳輸數(shù)據(jù)能夠符合現(xiàn)場的需要,設計了兩種方式進行傳輸數(shù)據(jù),,一個是網(wǎng)口,另一個是串口;兩種方式都能實時的將數(shù)據(jù)傳輸?shù)揭蕴W(wǎng)和上位機上。 網(wǎng)關的測試上,主要分兩個方面,第一是單板測試,另一個是組網(wǎng)測試;單板測試主要是對網(wǎng)頁設置顯示以及管理監(jiān)控頁面功能性驗證,還有對串口和網(wǎng)口傳輸數(shù)據(jù)正確性驗證;組網(wǎng)測試是將網(wǎng)關作為協(xié)調(diào)器對其他的設備組網(wǎng)測試,對網(wǎng)關監(jiān)控和管理網(wǎng)絡能力進行測試,還有對網(wǎng)關傳輸網(wǎng)絡數(shù)據(jù)正確性進行測試。 文章最后,在完成課題的過程中所遇到的一些問題進行總結,包括ZigBee模塊的選型、嵌入式網(wǎng)絡協(xié)議選用,硬件上是怎樣選用的CPU以及網(wǎng)絡芯片使用方法。 為了實現(xiàn)隨時隨地的控制和管理接入互聯(lián)網(wǎng)上的ZigBee個域網(wǎng)內(nèi)的信息,本設計使用嵌入式Web技術,它的優(yōu)點是可以使使用者不僅可以遠程監(jiān)控和管理,最主要的是使用起來方便,不用現(xiàn)場的面對使用設備;本設計還采用了數(shù)據(jù)透傳的方式,這樣是為了符合各種協(xié)議通用性,這樣的優(yōu)點是終端上使用不同協(xié)議都能使用此網(wǎng)關。
[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
本文鏈接:http://sikaile.net/kejilunwen/wltx/1891292.html
最近更新
教材專著