Computer Engineering and Applications ›› 2011, Vol. 47 ›› Issue (36): 76-79.

• 研发、设计、测试 • Previous Articles     Next Articles

Improvement and implementation of uIP on network time protocol

CHEN Shuo,YU Chunhai,PAN Feng   

  1. Key Lab of Advanced Process Control for Light Industry(Ministry of Education),Jiangnan University,Wuxi,Jiangsu 214122,China
  • Received:1900-01-01 Revised:1900-01-01 Online:2011-12-21 Published:2011-12-21

基于NTP的uIP协议栈改进与实现

陈 硕,于春海,潘 丰   

  1. 江南大学 轻工过程先进控制教育部重点实验室,江苏 无锡 214122

Abstract: Traditional uIP stack timer includes in system clock,and frequently leads to reading cycle in server.To solve this problem,some improvements such as network time protocol and estimation error k which is determined by test are done.A new UDP format in uIP stack is customized to carry out the NTP client function.The clock offset test is done on AVR network board,and the result shows that the ping response time and the average clock accuracy are less than 1 ms and 0.002,9 ms respectively.

Key words: uIP stack, clock synchronization, Network Time Protocol(NTP) local area network, high timing precision

摘要: 传统uIP协议栈使用系统定时器作为时钟信号,在面向同步控制时容易引起服务器端设备的循环读取。针对这一问题,引入NTP网络授时协议和估计误差系数k,并通过测试确定误差系数k。通过定制uIP协议栈中的UDP报文格式,实现了NTP客户端的功能。在AVR Network网络开发板上进行了时钟偏移测试。测试结果表明ping响应控制在1 ms以内,平均时钟精度提高至0.002 9 ms。

关键词: uIP协议栈, 时钟同步, 网络时间协议(NTP)局域网, 高精度授时