APP下载

楼宇自控系统中BACnet网络节点平台的开发

2016-01-13李里,付东翔

电子科技 2015年12期

楼宇自控系统中BACnet网络节点平台的开发

李里,付东翔

(上海理工大学 光电信息与计算机工程学院,上海200093)

摘要针对楼宇自动化中BACnet协议的实现及协议栈移植的问题,提出了对协议栈交互模型简要的设计方法,介绍了移植到STM32开发板的过程。该方法分析了协议结构中应用层、网络层和数据链路层的实现过程。移植以BACnet-stack-0.8.2版本源代码为样本,根据标准对象的功能需求和硬件配置对BACnet协议栈进行剪裁和移植。实验结果使STM32开发板成为一个BACnet网络节点设备,能通过RS485与PC机上的虚拟设备进行通信,具有读写属性等服务的能力。

关键词BACnet协议;STM32平台;移植;通信

收稿日期:2015-04-22

作者简介:李里(1991—),男,硕士研究生。研究方向:楼宇自动化。E-mail:1136791564@qq.com。付东翔(1971—),男,副教授。研究方向:嵌入式系统,楼宇自动化。

doi:10.16180/j.cnki.issn1007-7820.2015.12.025

中图分类号TN915.04;TP29文献标识码A

Development of BACnet Network Node Platform

LI Li,FU Dongxiang

(School of Optical-Electrical and Computer Engineering,University of Shanghai for

Science and Technology,Shanghai 200093,China)

AbstractThis paper introduces the application of BACnet protocol and transplantation of protocol stack,proposes a brief method on designing stack’s interactive model,and presents the process of transplanting into STM32 demoboard.This method analyzes the implementation process of every layer in BACnet’s structure including application layer,network layer and data link layer.Transplantation is based on the BACnet-stack-0.8.2 version,with the BACnet stack tailored and transplanted according to standard objects’ function and hardware configuration.The STM32 demoboard is transformed into a BACnet node device which can communicate with virtual device in PC through RS485 and fulfill services like read and write properties.

KeywordsBACnet protocol;STM32 platform;transplant;communication

智能建筑的应用正在迅速发展,而作为楼宇自控系统中唯一的国际标准,BACnet(Building Automation and Control Networks)标准是专门针对楼宇自动化和控制系统开发的一个标准数据通信协议,目的是使所有楼宇自控设备互联和信息共享,最终实现互动与互操作。

BACnet技术的应用在近年越来越广泛,国外多家公司如Alerton、Honeywell等都在生产符合BACnet标准的楼宇自控设备。而国内对BACnet的研究还有所欠缺:(1)在工程应用上,即使采用BACnet标准,也多是引进国外的产品和技术。(2)非ISO标准的应用远超BACnet国际标准的应用[1]。因此,深入研究BACnet协议,对我国智能建筑领域未来的发展是必要的。

1BACnet协议的分析

1.1BACnet的网络特点

BACnet网络是一个局域网,由一个或多个网段通过中继器或网桥在物理层上互连而成,每个网络拥有唯一的地址空间,因此通过在物理层和数据链路层上连接到网段的设备,可利用MAC地址实现报文的过滤[2]。……

登录APP查看全文