初中生
最后登录1970-1-1
在线时间 小时
注册时间2016-5-23
|
最近在LWIP上移植MQTT协议栈,实现TCP握手后明明调用了lwip_send函数想将MQTT数据包发送出去,但是PC上没有抓到MQTT的包。
是lwip_send中netconn_write_partly()函数在某种只有写入功能,不会发送吗?望大神指教!!
附上串口调试信息
BSP_Tick Init Success
LAN8720A BSP INIT AND COMFIGURE SUCCESS
Creating Application kernel objects
Creating Application Tasks
Static IP address
IP: 222.204.248.122
NETMASK: 255.255.255.0
Gateway: 222.204.248.1
mqtt client created
Connecting to serverURI 222.204.248.143:1883 with MQTT version 4
the src string is truncated
lwip_socket(PF_INET, SOCK_STREAM, 0) = 0
New socket 0 for 222.204.248.143, port 1883
lwip_connect(0, addr= 222. 204. 248. 143 port=1883)
lwip_connect(0) failed, err=-5
Connect pending
/* TCP connect started - wait for completion */
/* TCP connect complete */
lwip_send(0, data=20011620, size= 25, flags=0x0)
lwip_send(0) err=0 written= 25
rc == MQTTCLIENT_SUCCESS
mqtt client connect
lwip_send(0, data=20011630, size= 36, flags=0x0)
lwip_send(0) err=0 written= 36
mqtt client publish, return code = -1
|
|