这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » [讨论]串口转以太网调试

共1条 1/1 1 跳转至

[讨论]串口转以太网调试

菜鸟
2006-09-04 03:55:58     打赏


各位大侠好:
小弟最近在调试串口和以太网通信实验时,遇到一些问题,请帮忙解释一下,谢谢!
在从UDP到COM的传送过程中,无任何问题,一切显示正常;
但在从COM到UDP传送过程中,老是出现包丢失的现象,比如第一次发送"com_test" 只能收到com,在第二次发送完接受时才能收到余下的部分,一直都是这样收发下去……
为了协调两者的通信速度,我试着添加了taskDelay()函数,缓解了一下以上问题,但是残留的是,在最初两次收发时还是以上问题,但在第三次及其以后收发时就正常了,百思不得其解……
串口波特率115200,以太网10M/100M自适应!
各位高手有没有好的解决办法,请指点,谢谢了!
Tshell Window 的调试信息:

waiting for receiving data from udp......
The Number Of Receiving bytes is 8
MESSAGE FROM: Internet Address 192.168.0.160, port 1339
udp_test
The Number Of Write bytes is 8
waiting for receiving data from com......
The Number Of Read bytes is 3
The data of rec_message is com_test
The Number Of Send bytes is 3
waiting for receiving data from udp......
The Number Of Receiving bytes is 8
MESSAGE FROM: Internet Address 192.168.0.160, port 1339
udp_test
The Number Of Write bytes is 8
waiting for receiving data from com......
The Number Of Read bytes is 5
The data of rec_message is _testest
The Number Of Send bytes is 5
waiting for receiving data from udp......
The Number Of Receiving bytes is 8
MESSAGE FROM: Internet Address 192.168.0.160, port 1339
udp_test
The Number Of Write bytes is 8
waiting for receiving data from com......
The Number Of Read bytes is 8
The data of rec_message is com_test
The Number Of Send bytes is 8
waiting for receiving data from udp......



关键词: 讨论     串口     以太网     调试     Number     bytes    

共1条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]