i´m trying so resolve a solution for my little problem:
I had a System of two Pi´s who talk together. Everything works fine.
Now i want to try something like this:
When my System will be turned on both Pi´s are booting. My Router does the same.
Unfortunately the Router tooks a long time, maybe two Minutes before he is reachable and both Pi´s can talk together. Now i want to check up, when the System is workable and already started. Thats always when the Router is ready.
I think i need a endless loop who try to ping the Router "192.168.178.1".
When the Router is reachable the loop ends.
Something like this:
How can i get a True-Result as Answer from the Sub-Process? This is just an Example and doesn´t work!
Code: Select all
connected = True while connected: connected = subprocess.call(["ping", "192.168.178.1" , "-c 1"])