NNN40 run a HTTP server with RPC using Soft AP mode
Dependencies: WIFI_API_32kRAM mbed
Fork of HTTP-Server by
The sample code will run as a WiFi Soft AP mode with given AP configuration setting including SSID name and password. IP address (fixed to 192.168.2.1 for the current version of WIFI_API)of AP router will be print out once Soft AP mode is operating.
User can open their web browser and go to http://192.168.2.1/. and have a try on switch on a led. Firstly, we need to create an object to control a led
Then, led can be switch on using RPC command
More information cab be found from the links below
https://developer.mbed.org/users/feb11/code/HTTP-Server/
https://developer.mbed.org/cookbook/Interfacing-Using-RPC
Revision 6:d03e189ebbfe, committed 2013-07-17
- Comitter:
- feb11
- Date:
- Wed Jul 17 15:18:41 2013 +0000
- Parent:
- 5:8ab27ca793cd
- Child:
- 7:838d7ea07e18
- Commit message:
- Fixed bug in javascript code for interactive html formatter
Changed in this revision
Formatter.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Formatter.cpp Wed Jul 17 15:01:05 2013 +0000 +++ b/Formatter.cpp Wed Jul 17 15:18:41 2013 +0000 @@ -28,10 +28,8 @@ var name = document.getElementById(\"name\").value;\ var arg = document.getElementById(\"arg\").value;\ var url;\ -if(arg === \"\")\ -url = \"http://\" + ip + type + \"new?name=\" + name;\ -else\ -url = \"http://\" + ip + type + \"new?arg=\" + arg + \"&name=\" + name;\ +if(arg === \"\") url = \"http://\" + ip + type + \"new?name=\" + name;\ +else url = \"http://\" + ip + type + \"new?arg=\" + arg + \"&name=\" + name;\ location.href= url;\ }\ function submitCallFuncForm()\