Hi, Thank you for your quick response. Yes. I am developeing TCP server. >>"When you say "heap 4", I don't understand. Is it a FreeRTOS parameter or >>some vendor setting or ?" ------heap_4.c is a file in freeRTOS. sorry for mentioning it. i should not have mentioned it in first place.
>>"What API are you using ? >>You copied an echo server... which one ? The netconn one in contrib ? >>the raw one in contrib ?" ------raw one. >>" Does it work ?" yes. Information what i am trying to do. Without any modification: #define CHECKSUM_GEN_IP 0 /*----- Value in opt.h for CHECKSUM_GEN_UDP: 1 -----*/ #define CHECKSUM_GEN_UDP 0 /*----- Value in opt.h for CHECKSUM_GEN_TCP: 1 -----*/ #define CHECKSUM_GEN_TCP 0 /*----- Value in opt.h for CHECKSUM_GEN_ICMP: 1 -----*/ #define CHECKSUM_GEN_ICMP 0 I am able to connect to the modscan and communication is working very fine. With modification: I am trying to develop HSR redundancy. PC is connected to one port of hirschmann switch(External Redbox). Another port of Hirschmann switch is connected to my unit. Hirschamnn swithch simply adds HSR tag to incoming frame coming to PC and send (HSR tag) frame to my unit. My application will remove HSR tag for incoming frames and feed it to LWIP stack. Same way outgoing frame recieved from LWIP stack, my application will add HSR tag and sent it to PC via hirschmann swith. Modification: #define CHECKSUM_GEN_IP 1 /*----- Value in opt.h for CHECKSUM_GEN_UDP: 1 -----*/ #define CHECKSUM_GEN_UDP 0 /*----- Value in opt.h for CHECKSUM_GEN_TCP: 1 -----*/ #define CHECKSUM_GEN_TCP 1 /*----- Value in opt.h for CHECKSUM_GEN_ICMP: 1 -----*/ #define CHECKSUM_GEN_ICMP 1 Modification for receiving part:in ethernetif.c file:function:low_level_input(); receive and do following /*removing of hsr tag*/ memcpy( (uint8_t*)(g_u8_HSR_Rcvd_Frame + j), (uint8_t*)((uint8_t*)p->payload + k), 12); k=18; j=12; memcpy( (uint8_t*)(g_u8_HSR_Rcvd_Frame + j), (uint8_t*)((uint8_t*)p->payload + k), (len - 18)); __nop(); __nop(); __nop(); memcpy( (uint8_t*)((uint8_t*)p->payload), (uint8_t*)((uint8_t*)g_u8_HSR_Rcvd_Frame), len); /*send for further processing */ Modification for transmission part:in ethernetif.c file:function:low_level_output(); /*adding of hsr tag*/ memcpy( (uint8_t*)((uint8_t*)g_u8_Transmt_Frame), (uint8_t*)((uint8_t*)p->payload), 12); g_u8_Transmt_Frame[12] = 0x89; g_u8_Transmt_Frame[13] = 0x2f; g_u8_Transmt_Frame[14] = 0x00; g_u8_Transmt_Frame[15] = ((p->len) + 6); g_u8_Transmt_Frame[16] = (uint8_t)(g_32_seq_counter & 0xFF00) >> 8; g_u8_Transmt_Frame[17] = (uint8_t)(g_32_seq_counter & 0x00FF); k =18; j=12; memcpy( (uint8_t*)((uint8_t*)&g_u8_Transmt_Frame[18]), (uint8_t*)((uint8_t*)p->payload + j), ((p->len)- 12)); __nop(); __nop(); __nop(); memcpy( (uint8_t*)((uint8_t*)p->payload), (uint8_t*)((uint8_t*)g_u8_Transmt_Frame), ((p->len)+6)); and transmit with above modification i am able to ping properly through PC via hirschmann switch. but not able to connect to modscan. (modbus message timeout occurs. attached wireshark report) when i stop debugg i see progam is stuck as mention in first post. Regard, Vrund -- Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users