Esempio n. 1
0
        //Cellular Connection routines
        private void cellularRadio_GprsNetworkRegistrationChanged(CellularRadio sender,
                                                                  CellularRadio.NetworkRegistrationState networkState)
        {
            switch (networkState)
            {
            case CellularRadio.NetworkRegistrationState.Error:
                Debug.Print("Gprs Network Registration Changed - Error");
                break;

            case CellularRadio.NetworkRegistrationState.NotSearching:
                Debug.Print("Gprs Network Registration Changed - Not Searching");
                break;

            case CellularRadio.NetworkRegistrationState.Registered:
                Debug.Print("Gprs Network Registration Changed - Registered");
                cellularRadio.UseThisNetworkInterface(apn, username, password, PPPSerialModem.AuthenticationType.Pap);     //we have GPRS, so start up the PPP
                break;

            case CellularRadio.NetworkRegistrationState.RegistrationDenied:
                Debug.Print("Gprs Network Registration Changed - Registration Denied");
                break;

            case CellularRadio.NetworkRegistrationState.Roaming:
                Debug.Print("Gprs Network Registration Changed - Roaming");
                break;

            case CellularRadio.NetworkRegistrationState.Searching:
                Debug.Print("Gprs Network Registration Changed - Searching");
                break;

            case CellularRadio.NetworkRegistrationState.Unknown:
                Debug.Print("Gprs Network Registration Changed - Unknown");
                break;
            }
        }
Esempio n. 2
0
 private void gsm_GsmNetworkRegistrationChanged(CellularRadio sender, CellularRadio.NetworkRegistrationState networkState)
 {
     this.gsmState = networkState;
 }