Attempt to detect network connection