NuMaker Cellular(NB-IoT/4G)

Revision:
4:9432d7355f2b
Parent:
3:6f804b5237be
--- a/main.cpp	Mon Feb 03 03:29:07 2020 +0000
+++ b/main.cpp	Thu Feb 25 11:31:56 2021 +0800
@@ -206,6 +206,9 @@
 
 int main()
 {
+#ifdef MBED_MAJOR_VERSION
+    printf("Mbed OS version %d.%d.%d\r\n\n", MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION);
+#endif
     print_function("\n\nmbed-os-example-cellular\n");
     print_function("\n\nBuilt: %s, %s\n", __DATE__, __TIME__);
 #ifdef MBED_CONF_NSAPI_DEFAULT_CELLULAR_PLMN
@@ -227,7 +230,10 @@
 
     /* Attempt to connect to a cellular network */
     if (do_connect() == NSAPI_ERROR_OK) {
-        printf("IP Address is %s\r\n", iface->get_ip_address());
+       SocketAddress a;
+       iface->get_ip_address(&a);
+        printf("IP Address is %s\r\n", a.get_ip_address());
+ //       printf("IP Address is %s\r\n", iface->get_ip_address());
         retcode = test_send_recv();
     }