2016-11-10 12:40 AM
Hi,
I have a problem about ethernet echo server.Sended data from client can be readed but with echo. Besides, I want to send data to client.Because of this;uint8_t buffer[8]; buffer[0] = (0xFF000000 & (uint32_t)(100)) >> 24; buffer[1] = (0x00FF0000 & (uint32_t)(100)) >> 16; buffer[2] = (0x0000FF00 & (uint32_t)(100)) >> 8; buffer[3] = (0x000000FF & (uint32_t)(100)); buffer[4] = (0xFF000000 & (uint32_t)(300)) >> 24; buffer[5] = (0x00FF0000 & (uint32_t)(300)) >> 16; buffer[6] = (0x0000FF00 & (uint32_t)(300)) >> 8; buffer[7] = (0x000000FF & (uint32_t)(300)); /* enqueue data for transmission */ wr_err = tcp_write(tpcb, ptr->payload, ptr->len, 1); wr_err = tcp_write(tpcb, &buffer, 8, 1);This function is written in static void tcp_echoserver_send().But with this way , data is made echo.How can be closed echo ? #ethernet #cubemx #lwip2016-11-11 07:28 AM
Hello,
I suggest you refer to the ''LwIP_TCP_Echo_Server'' example under your firmware package (STM32CubeXX) to find the needed functions.For example for STM32CubeF4: STM32Cube_FW_F4_V1.13.0\Projects\STM324xG_EVAL\Applications\LwIP\LwIP_TCP_Echo_ServerRegards