mbed Sensor node for Instrumented Booth over ETH.
Dependencies: EthernetInterface-1 MaxbotixDriver Presence HTU21D_TEMP_HUMID_SENSOR_SAMPLE Resources SHARPIR mbed-rtos mbed-src WDT_K64F nsdl_lib
Fork of Trenton_Switch_LPC1768_ETH by
Revision 11:991f6c2444e9, committed 2013-10-10
- Comitter:
- frankvnk
- Date:
- Thu Oct 10 20:44:01 2013 +0000
- Parent:
- 10:09a1dd3fbd3d
- Child:
- 12:a88f83072b20
- Commit message:
- Added erase profiles option.
; restored DHCP configuration option.
;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
main.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Oct 10 07:17:17 2013 +0200 +++ b/main.cpp Thu Oct 10 20:44:01 2013 +0000 @@ -134,6 +134,7 @@ printf("\n<0> Normal run. SmartConfig will \r\n start if no valid connection exists. \r\n"); printf("<1> Connect using fixed SSID without AP_KEY: %s \r\n", SSID); printf("<2> Connect using fixed SSID with AP_KEY: %s \r\n", SSID); + printf("<8> Erase all stored profiles.\r\n"); printf("<9> SmartConfig. \r\n"); signed char c = getchar(); @@ -163,6 +164,13 @@ connect_to_ssid(SSID); #endif break; + case '8': + printf("Erasing all wireless profiles. \r\n"); + wifi.delete_profiles(); + wifi.stop(); + printf("Done - press the reset button on your board... \r\n"); + while(1); + case '9': printf("Starting Smart Config configuration. \r\n"); start_smart_config();
--- a/main.h Thu Oct 10 07:17:17 2013 +0200 +++ b/main.h Thu Oct 10 20:44:01 2013 +0000 @@ -36,6 +36,21 @@ #define AP_SECURITY WPA2 // WPA2 must be enabled for use with iPhone or Android phone hotspot! #define SSID "test" +#define USE_DHCP 1 +#define USE_STATIC_IP 2 + +// Modify the following settings as necessary for your Wi-Fi Network setup: +#define IP_ALLOC_METHOD USE_DHCP // for DHCP assigned IP address +//#define IP_ALLOC_METHOD USE_STATIC_IP // for static IP address + +#define STATIC_IP_OCT1 192 +#define STATIC_IP_OCT2 168 +#define STATIC_IP_OCT3 0 +#define STATIC_IP_OCT4 103 + +#define STATIC_GW_OCT4 1 // Static Gateway address = STATIC_IP_OCT1.STATIC_IP_OCT2.STATIC_IP_OCT3.STATIC_GW_OCT4 + + void init(); #endif