NNN40 change mode from AP to STA by HTTP server
Dependencies: WIFI_API_32kRAM mbed
How to use Demo code
- Step1: Prepare a router, and set the SSID and Password as follow
- SSID: "SSID"
- Password: "0123456789"
- Step2: Burn demo code to NNN40 module.
You can drag and drop the sample code to NNN40 module.
- Step3: Login module from Http server (192.168.2.1) by PC.
You can set SSID and password by browser. After clicking "confirm" button, the module will change mode from AP to STA, get IP from router
- DEMO video:
Diff: Formatter.cpp
- Revision:
- 14:b007595028e2
- Parent:
- 13:f3d681e5b6c6
diff -r f3d681e5b6c6 -r b007595028e2 Formatter.cpp --- a/Formatter.cpp Wed Sep 23 03:16:17 2015 +0000 +++ b/Formatter.cpp Wed Oct 21 05:54:02 2015 +0000 @@ -101,7 +101,7 @@ }function send() {var ip = \"192.168.2.1/WebSetting/\";\ var ssid = document.getElementById(\"ssid\").value;\ var pwd = document.getElementById(\"password\").value;\ -location.href = \"http://\"+ip+ssid +\"_\"+pwd;}\ +location.href = \"http://\"+ip+ssid +\"/\"+pwd;}\ </script></head><body>"; const char* DELRA_WIFI_SETTING_HTML_CODE_1 = "<div id=\"background\">\