Ethernet-based network support for mbedConnectorInterface.

Dependencies:   libnsdl EthernetInterface mbed-rtos

Dependents:   IoT_LED_demo ServoTest uWater_Project hackathon ... more

Revision:
1:cb681dfa1678
Parent:
0:31292d956e92
Child:
2:c7a1aad25a18
--- a/network_stubs/network_stubs.cpp	Sun Feb 01 18:24:03 2015 +0000
+++ b/network_stubs/network_stubs.cpp	Mon Feb 02 06:12:30 2015 +0000
@@ -33,22 +33,27 @@
      
      // our IP address
      DBG("Ethernet Address: %s\r\n",ethernet.getIPAddress());
-     
-     // initialize NSDL
-     registration_update_thread(NULL);
 }
 
 // create a suitable main event loop for this specific network
 void net_stubs_create_main_loop(void)
 {
-    // not used for EthernetInterface...
-    ;
+    // initialize NSDL
+    DBG("initNetwork: initializing NSP..\r\n.");
+    nsdl_init();
+
+    // we simply configure the endpoint
+    DBG("initNetwork: configuring endpoint...\r\n");
+    configure_endpoint();
 }
 
 // register the endpoint
 void net_stubs_register_endpoint(void)
 {
+    // NSP registration
+    DBG("initNetwork: calling NSP registration...\r\n");
     register_endpoint(true);
+    DBG("initNetwork: NSP registration completed\r\n");
 }
 
 // begin the main loop for processing network events