LWIP and STM32F427 - disable echo back to client
Hello,
i have imported a tcp echo server example, using the old stdperiph code.
So far everything is working as expected.
Apart from the original code, i've implemented my own function to send a custom string.
But on the client side, for example if i send a comand string, i always get back the comand string and my custom response.
Is there a way to disable the echo transmition?
Here is my initialization code
int main(void)
{
// stm32f427VGT6 - 256 kb RAM ; 1024kb Flash
SetupClocks();
setup_led_pins();
DebugComPort_Init();
/* configure ethernet (GPIOs, clocks, MAC, DMA) */
printf("Program is starting....\r\n");
ETH_BSP_Config();
/* Initilaize the LwIP stack */
LwIP_Init();
/* tcp echo server Init */
tcp_echoserver_init();
/* Infinite loop */
while (1)
{
/* check if any packet received */
if (ETH_CheckFrameReceived()) {
/* process received ethernet packet */
LwIP_Pkt_Handle();
}
/* handle periodic timers for LwIP */
LwIP_Periodic_Handle(LocalTime);
//Check ethernet link status
if(LocalTime - checkLinkTime >= 1000)
{
//read status register from PHY to check every second if the link is alive
if((ETH_ReadPHYRegister(DP83848_PHY_ADDRESS, 0x01) &0x04) != 0x04 )
{
printf("Link is lost....\r\n");
}
else
{
GPIO_ToggleBits(GPIOD,GPIO_Pin_2); //moro - toggle a led
}
checkLinkTime=LocalTime;
}
}
}
I also attached the tcp_echoserver.c file which contains the used functions
