File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 25
25
// Number of retries /
26
26
#define RETRY_COUNT 3
27
27
28
- CellularBase *iface;
28
+ NetworkInterface *iface;
29
29
30
30
// Echo server hostname
31
31
const char *host_name = MBED_CONF_APP_ECHO_SERVER_HOSTNAME;
@@ -91,7 +91,7 @@ void dot_event()
91
91
{
92
92
while (true ) {
93
93
ThisThread::sleep_for (4000 );
94
- if (iface && iface->is_connected () ) {
94
+ if (iface && iface->get_connection_status () == NSAPI_STATUS_GLOBAL_UP ) {
95
95
break ;
96
96
} else {
97
97
trace_mutex.lock ();
@@ -110,7 +110,7 @@ nsapi_error_t do_connect()
110
110
nsapi_error_t retcode = NSAPI_ERROR_OK;
111
111
uint8_t retry_counter = 0 ;
112
112
113
- while (! iface->is_connected () ) {
113
+ while (iface->get_connection_status () != NSAPI_STATUS_GLOBAL_UP ) {
114
114
retcode = iface->connect ();
115
115
if (retcode == NSAPI_ERROR_AUTH_FAILURE) {
116
116
print_function (" \n\n Authentication Failure. Exiting application\n " );
@@ -215,7 +215,7 @@ int main()
215
215
#endif // #if MBED_CONF_MBED_TRACE_ENABLE
216
216
217
217
// sim pin, apn, credentials and possible plmn are taken atuomtically from json when using get_default_instance()
218
- iface = CellularBase ::get_default_instance ();
218
+ iface = NetworkInterface ::get_default_instance ();
219
219
MBED_ASSERT (iface);
220
220
221
221
nsapi_error_t retcode = NSAPI_ERROR_NO_CONNECTION;
Original file line number Diff line number Diff line change 17
17
},
18
18
"target_overrides" : {
19
19
"*" : {
20
+ "target.network-default-interface-type" : " CELLULAR" ,
20
21
"mbed-trace.enable" : false ,
21
22
"lwip.ipv4-enabled" : true ,
22
23
"lwip.ethernet-enabled" : false ,
You can’t perform that action at this time.
0 commit comments