I have an embedded system connected with an ethernet port to one of my 2 ethernet interfaces, but I have the problem that my python code for the socket connection does not know where to connect to the embedded.
I mean, sometimes I get the connection and sometimes I just don't (and I have to change the cable to the other interface), because I don't know how the socket functionality is getting the right ethernet port in which it has to connect.
is there anything I can do on my python code to know the correct ethernet port in which the embedded is connected? (in order to know every time I connect it without changing the cable to another interface)