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:
Formatter.h
- Committer:
- lester0507
- Date:
- 2015-10-21
- Revision:
- 14:b007595028e2
- Parent:
- 12:eca9b56155c7
File content as of revision 14:b007595028e2:
#ifndef FORMATTER #define FORMATTER class Formatter { public : Formatter(int nbChunk = 3); char* get_page(char *reply); protected : virtual void get_chunk(const int c, char *reply); private : int currentChunk; int nbChunk; }; class SimpleHTMLFormatter : public Formatter { public : SimpleHTMLFormatter(); protected : virtual void get_chunk(const int c, char *reply); }; class InteractiveHTMLFormatter : public Formatter { public : InteractiveHTMLFormatter(); protected : virtual void get_chunk(const int c, char *reply); }; class DeltaWifiSettingHTMLFormatter : public Formatter { public : DeltaWifiSettingHTMLFormatter(); protected : virtual void get_chunk(const int c, char *reply); }; #endif