@@ -55,41 +55,37 @@ int arduino::GSMClass::begin(const char* pin, const char* apn, const char* usern
55
55
DEBUG_ERROR (" Invalid mbed::CellularContext" );
56
56
return 0 ;
57
57
}
58
+
58
59
pinMode (MBED_CONF_GEMALTO_CINTERION_ON, INPUT_PULLDOWN);
59
60
60
61
static mbed::DigitalOut rts (MBED_CONF_GEMALTO_CINTERION_RTS, 0 );
61
62
62
63
_device = _context->get_device ();
64
+ _device->modem_debug_on (_at_debug);
63
65
64
66
if (!isReady ()) {
65
67
DEBUG_ERROR (" Cellular device not ready" );
66
68
return 0 ;
67
69
}
68
70
69
- _device->modem_debug_on (_at_debug);
70
-
71
71
_device->set_cmux_status_flag (_cmuxGSMenable);
72
-
73
- _context->set_sim_pin (pin);
74
-
75
72
_device->set_retry_timeout_array (_retry_timeout, sizeof (_retry_timeout) / sizeof (_retry_timeout[0 ]));
76
73
#if GSM_DEBUG_ENABLE
77
74
_device->attach (mbed::callback (this , &GSMClass::onStatusChange));
78
75
#endif
79
-
80
76
_device->init ();
81
77
82
- _context->set_authentication_type ((mbed::CellularContext::AuthenticationType)1 );
83
-
84
78
_pin = pin;
85
79
_apn = apn;
86
80
_username = username;
87
81
_password = password;
88
82
_rat = rat;
89
83
_band = (FrequencyBand) band;
90
- _context->set_credentials (apn, username, password);
91
84
92
- _context->set_access_technology (rat);
85
+ _context->set_sim_pin (pin);
86
+ _context->set_authentication_type (mbed::CellularContext::AuthenticationType::PAP);
87
+ _context->set_credentials (_apn, _username, _password);
88
+ _context->set_access_technology (_rat);
93
89
_context->set_band (_band);
94
90
95
91
int connect_status = NSAPI_ERROR_AUTH_FAILURE;
0 commit comments