• 首页
  • 期刊简介
  • 编委会
  • 投稿指南
  • 收录情况
  • 杂志订阅
  • 联系我们
引用本文:张宏桥,蒋 虎,曾晓华,段凌飞.基于Websocket的串口控制系统的研究[J].软件工程,2019,22(6):22-25.【点击复制】
【打印本页】   【下载PDF全文】   【查看/发表评论】  【下载PDF阅读器】  
←前一篇|后一篇→ 过刊浏览
分享到: 微信 更多
基于Websocket的串口控制系统的研究
张宏桥,蒋 虎,曾晓华,段凌飞
(湘南学院电子信息与电气工程学院,湖南 郴州 423000)
摘 要: 随着计算机技术的不断发展,物联网设备的远控技术在实现上变得更加快捷。其中,串口是当前嵌入 式数据传输技术的一种主流通讯方式,它有着协议简单,支持全双工传输等特点。本文针对常用的RS232串口,基于 Websocket协议,使用支持跨平台的网络库libevent和串口库Serial Communication Library,研究并实现了Websocket 与RS232之间的数据中转。接着基于Web前端HTML5标准的Websocket特性及相关UI框架,实现了Web与RS232之间数 据的异地操作与传输,将串口数据实时绘制为网页图表并最终验证了该系统设计的有效性与可扩展性。
关键词: 物联网;远程控制;串口通讯;Websocket
中图分类号: TP311    文献标识码: A
基金项目: 湘南学院2017年度校级实验室开放项目(编号31).
Research on the Serial Port Control System Based on Websocket
ZHANG Hongqiao,JIANG Hu,ZENG Xiaohua,DUAN Lingfei
( College of Electronic Information and Electrical Engineering, Xiangnan University, Chenzhou 423000, China)
Abstract: With the development of computer technology,it becomes more efficient to implement the remote control techniques on the devices of Internet of Things.The serial port is a main method of data transmission for embedded devices,with the characteristics of simple protocol and good support for full duplex transmission.Aiming at the serial port type of RS232,this paper studies the research and implementation of data transfer between Websocket and RS232 by using the cross-platform network library of libevent and the serial port library of Serial Communication Library.Then,based on the Websocket characteristics of HTML5 and Echarts Library of Web UI framework,it realizes the remote operation and data transmission between Web and RS232,and renders the serial port data on a web page graph in real time.Finally,the validity and extensibility of the proposed system are verified.
Keywords: Internet of Things;remote control;serial port communication;Websocket


版权所有:软件工程杂志社
地址:辽宁省沈阳市浑南区新秀街2号 邮政编码:110179
电话:0411-84767887 传真:0411-84835089 Email:semagazine@neusoft.edu.cn
备案号:辽ICP备17007376号-1
技术支持:北京勤云科技发展有限公司

用微信扫一扫

用微信扫一扫