porj use UART recv data .after UART has data in, Tcp server will get the data sent to TCP client. we cannot know number of uart data in.so the porj Tcp send data will be sent erverone data in.
1,uartTaskRecv will run as ever 100us
2,uartTaskRecv of uart_tx_one_char sent data is OK no loss data.
question:
1,why tcp send data loss
2,how to use "espconn_regist_write_finish" to write buffer?
code :
sint8 ICACHE_FLASH_ATTR UartEspconSendData(uint8 *pdata,uint32 Len)
{
return(espconn_send(&TcpConfig,pdata,Len));
}
LOCAL void ICACHE_FLASH_ATTR uartTaskRecv(void)
{
uint8_t tmpdata,err;
tmpdata = uartTaskGetChar(&err);
if(err == COMM_NO_ERR){
if(tmpdata != '\n'){
uart_tx_one_char(0,tmpdata);
UartEspconSendData(tmpdata,1);
//os_printf("112233445566778899\r\n");
//espconn_send();
}else{
os_printf("AABBCCDDEE\r\n");
//uart_tx_one_char(0,'\n');
}
}
}
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.