1. import checkNet
    2. if __name__ == '__main__':
    3. stage, state = checkNet.waitNetworkReady(30)
    4. if stage == 3 and state == 1:
    5. print('Network connection successful.')
    6. else:
    7. print('Network connection failed, stage={}, state={}'.format(stage, state))