Red Hat Summit NanoService Demo for LPC1768 App Board using OMA Lightweight Objects
Dependencies: Beep C12832_lcd EthernetInterface LM75B MMA7660 mbed-rtos mbed nsdl_lib
Fork of LWM2M_NanoService_Ethernet by
Revision 27:d898b3a8c769, committed 2014-04-27
- Comitter:
- sam_grove
- Date:
- Sun Apr 27 17:03:22 2014 +0000
- Parent:
- 26:afcaeb039ef3
- Child:
- 28:3c25f2f62cd3
- Child:
- 30:cab9f0800471
- Commit message:
- mbed-house
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
resources/gps.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Apr 23 21:39:15 2014 +0000 +++ b/main.cpp Sun Apr 27 17:03:22 2014 +0000 @@ -30,11 +30,11 @@ // NSP configuration /* Change this IP address to that of your NanoService Platform installation */ -static const char* NSP_ADDRESS = "137.135.13.28"; /* demo NSP, web interface at http://red-hat-summit.cloudapp.net*/ +static const char* NSP_ADDRESS = "208.111.39.209"; /* demo NSP, web interface at http://208.111.39.209/ */ static const int NSP_PORT = 5683; -char endpoint_name[20] = "mbed-ethernet-"; +char endpoint_name[20] = "mbed-house-"; char mbed_uid[33]; // for creating unique name for the board -uint8_t ep_type[] = {"mbed_lpc1768_appboard"}; +uint8_t ep_type[] = {"mbed_house"}; uint8_t lifetime_ptr[] = {"60"}; static const char* FIRMWARE_VER = "25"; // Committed revision number char* mac; @@ -122,7 +122,7 @@ // Static resources nsdl_create_static_resource(resource_ptr, sizeof("3/0/0")-1, (uint8_t*) "3/0/0", 0, 0, (uint8_t*) "ARM", sizeof("ARM")-1); - nsdl_create_static_resource(resource_ptr, sizeof("3/0/1")-1, (uint8_t*) "3/0/1", 0, 0, (uint8_t*) "LPC1768 App Board", sizeof("LPC1768 App Board")-1); + nsdl_create_static_resource(resource_ptr, sizeof("3/0/1")-1, (uint8_t*) "3/0/1", 0, 0, (uint8_t*) "LPC1768 mbed house", sizeof("LPC1768 mbed house")-1); nsdl_create_static_resource(resource_ptr, sizeof("3/0/2")-1, (uint8_t*) "3/0/2", 0, 0, (uint8_t*) mbed_uid, sizeof(mbed_uid)-1); nsdl_create_static_resource(resource_ptr, sizeof("3/0/3")-1, (uint8_t*) "3/0/3", 0, 0, (uint8_t*) FIRMWARE_VER, strlen(FIRMWARE_VER)); #ifdef DHCP @@ -139,7 +139,7 @@ create_temperature_resource(resource_ptr); create_light_resource(resource_ptr); create_gps_resource(resource_ptr); - create_relay_resource(resource_ptr); + //create_relay_resource(resource_ptr); #ifdef USE_RGBLED NSDL_DEBUG("Enabling RGB LED due to USE_RGBLED=%d\n", USE_RGBLED);
--- a/resources/gps.cpp Wed Apr 23 21:39:15 2014 +0000 +++ b/resources/gps.cpp Sun Apr 27 17:03:22 2014 +0000 @@ -7,7 +7,7 @@ #define GPS_RES_ID "gps/loc" extern Serial pc; -static uint8_t res_gps_val[] = {"41.3575123, 2.1249663"}; +static uint8_t res_gps_val[] = {"34.104646, -118.341811"}; /* Only GET method allowed */ static uint8_t gps_resource_cb(sn_coap_hdr_s *received_coap_ptr, sn_nsdl_addr_s *address, sn_proto_info_s * proto)