| With the rapid development of the Internet of things technology,more and moretraditional industrial equipment requires access to computer network to enable remotedata acquisition and control,however the most common communication interface oftraditional industrial equipment is serial,they don’t have a network interface,so theycan’t directly access to the computer network.In order to solve this problem,this paperdesigns a lightweight embedded gateway system which achieves mutual conversionbetween the serial protocol and the TCP protocol.Firstly,this paper designs a lightweight embedded gateway system base on researchof commonly used Embedded Operating Systems,TCP/IP protocol stack and FileSystem,which takes S3C2440(ARM9) microprocessor as hardware platform,and takesμC/OS-II equip with LwIP and FatFS as software platform.Secondly,this paper buildsembedded gateway software platform, it explains how to transplant μC/OS-II onS3C2440,how to transplant LwIP on μC/OS-II,how to transplant FatFS on SD card andhow to implement DM9000NIC and SD card drivers.Then,this paper develops a setappropriate gateway software on build platform,it has serial read and writefunctions,mutual conversion between the serial protocol and the TCP protocolfunction,local data storage function and TCP server function,so it achieves the dataremote monitoring.Finally,the gateway system is tested,test items include size ofsystem,protocol conversion,gateway Performance(MTU,packet loss rate), local datastorage.Test results show that: the size of gateway software system is only86.45KB;theMTU of gateway is1500Bytes;the rate of packet loss less then0.3%in the case ofpacket size is13Bytes and the frequency of transmit packet is one packet persecond;and protocol conversion, local data storage functions are normal.The test resultsshow that the gateway system is compact and good performance,it’s ideally suited forresource-constrained embedded system,and it has comprehensive applicationforeground and spread value. |