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 2525// Number of retries /
2626#define RETRY_COUNT 3
2727
28- CellularBase *iface;
28+ NetworkInterface *iface;
2929
3030// Echo server hostname
3131const char *host_name = MBED_CONF_APP_ECHO_SERVER_HOSTNAME;
@@ -91,7 +91,7 @@ void dot_event()
9191{
9292 while (true ) {
9393 ThisThread::sleep_for (4000 );
94- if (iface && iface->is_connected () ) {
94+ if (iface && iface->get_connection_status () == NSAPI_STATUS_GLOBAL_UP ) {
9595 break ;
9696 } else {
9797 trace_mutex.lock ();
@@ -110,7 +110,7 @@ nsapi_error_t do_connect()
110110 nsapi_error_t retcode = NSAPI_ERROR_OK;
111111 uint8_t retry_counter = 0 ;
112112
113- while (! iface->is_connected () ) {
113+ while (iface->get_connection_status () != NSAPI_STATUS_GLOBAL_UP ) {
114114 retcode = iface->connect ();
115115 if (retcode == NSAPI_ERROR_AUTH_FAILURE) {
116116 print_function (" \n\n Authentication Failure. Exiting application\n " );
@@ -215,7 +215,7 @@ int main()
215215#endif // #if MBED_CONF_MBED_TRACE_ENABLE
216216
217217 // 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 ();
219219 MBED_ASSERT (iface);
220220
221221 nsapi_error_t retcode = NSAPI_ERROR_NO_CONNECTION;
Original file line number Diff line number Diff line change 1717 },
1818 "target_overrides" : {
1919 "*" : {
20+ "target.network-default-interface-type" : " CELLULAR" ,
2021 "mbed-trace.enable" : false ,
2122 "lwip.ipv4-enabled" : true ,
2223 "lwip.ethernet-enabled" : false ,
You can’t perform that action at this time.
0 commit comments