FreeRTOS TCP IP implementation on STM32F767ZI

no, do not change the 80 in your python code. Run, for example, a web server on that machine and try to connect to that. The idea is to take the custom Python code out of the loop-