摘要
为解决串口通信距离和上位机接口数量有限的问题,设计了一种基于Linux系统的串口服务器。服务器属于客户端服务器模式,通过网络传输串口数据流。服务器基于嵌入式Linux的TCP/IP,通过串行接口的转换,以非阻塞方式进行数据收发,并实现了心跳方式的连接中断检测。经仿真和硬件测试,服务器运行稳定,可挂接串口设备数量较多。该服务器已应用于嵌入式软件的调试工作,并将增加可用接口种类,为远程调试与开发提供更为有效的支持。
A UART server is designed based on Linux to solve the problems about transmission distance and number of host computer's serial ports. The server is in the Client/Server mode and transmits UART data stream by Ethernet. With TCP/IP of embedded Linux and the UART interface convertor, the UART server is used to receive and transmit data in a non - blocking way and check the disconnection with the heartbeat function of keepalive. Simulation and hardware test results indicate that the server can operate stably and mount a number of UART devices. The UART server has been used in the debugging of embedded software, and is capable of adding more types of interface.
出处
《电子科技》
2017年第6期105-108,共4页
Electronic Science and Technology