Demo starter application to connect WiGo to NSP and expose on-board sensors

Dependencies:   NVIC_set_all_priorities cc3000_hostdriver_mbedsocket mbed nsdl_lib TEMT6200 TSI Wi-Go_eCompass_Lib_V3 WiGo_BattCharger

This is the mbed project for the IoT World Hackathon event, June 17th and 18th in Palo Also.

The setup instructions for participants are at the Setup page of this wiki:

http://mbed.org/teams/MBED_DEMOS/code/IoT_World_Hackathon_WiGo_NSP_Demo/wiki/Setup-Guide-for-the-IoT-World-Hackathon

Revision:
1:8f4625466fbd
Parent:
0:07581223f90c
Child:
2:4a6a726423bb
--- a/nsdl_run.cpp	Fri Jun 13 18:00:38 2014 +0000
+++ b/nsdl_run.cpp	Fri Jun 13 18:46:38 2014 +0000
@@ -53,7 +53,7 @@
 
 static void ethernet_init()
 {
-    char mbed_uid[33]; // for creating unique name for the board
+//    char mbed_uid[33]; // for creating unique name for the board
 
 // set timeout values to disable socket timeout  
     to_rtn = wifi._netapp.timeout_values(&dhcp, &arp, &keep_alive, &inactivity);
@@ -70,8 +70,13 @@
 //        pc.printf("Connect OK\n\r");
 
 //    mbed_interface_uid(mbed_uid);
-    mbed_uid[32] = '\0';
-    strncat(endpoint_name, mbed_uid + 27, 15 - strlen(endpoint_name));
+// make a unique name from the MAC address
+      pc.printf("MAC: %s\r\n", wifi.getMACAddress());
+    
+//    mbed_uid[32] = '\0';
+//    strncat(endpoint_name, mbed_uid + 27, 15 - strlen(endpoint_name));
+//    strncat(endpoint_name, wifi.getMACAddress(), 17);
+      pc.printf("EP NAME: %s\r\n",endpoint_name);
 
 //    lcd.locate(0,11);
 //    lcd.printf("IP:%s", eth.getIPAddress());