In line 96:
uint8_t i1[NUM_COM]={0,0,0};
you use uint8_t to index your buffer which has the size #define bufferSize 8192. This leads to an buffer overflow if we recieve tcp packets which are greater than 256 or if we recieve multiple packets with short delay.
In line 96: uint8_t i1[NUM_COM]={0,0,0}; you use uint8_t to index your buffer which has the size #define bufferSize 8192. This leads to an buffer overflow if we recieve tcp packets which are greater than 256 or if we recieve multiple packets with short delay.