diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e1ae481 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright 2017 Cesanta Software Limited + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..5f81849 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Setup WiFi via Web UI + +- Start [mos tool](https://mongoose-os.com/software.html), + import this app, build it and flash it. + + +- Do not configure WiFi - leave the module in AP (Access Point mode). +- Mongoose OS starts a WiFi network called `Mongoose_XXXXXX` with password +`Mongoose`. Switch your workstation to that WiFi network +- Point your browser to http://192.168.4.1 +- You'll see a simple form to configure WiFi network & password + +![Screenshot](shot.png) \ No newline at end of file diff --git a/fs/index.html b/fs/index.html new file mode 100644 index 0000000..2b1b4a9 --- /dev/null +++ b/fs/index.html @@ -0,0 +1,120 @@ + + + + + + + +
+
+

WiFi setup via Web UI

+

This Mongoose OS app shows + how to start a device in Access Point mode (AP) and configure Station mode + via simple Web UI.

+

This page communicates with the device via + Mongoose OS RPC mechanism + using HTTP/RESTful as a transport protocol.

+
+
+ +
+
+ + +
+
+ + +
+
+
+ +
+ +
+
+ +
+
+ + + + + diff --git a/mos.yml b/mos.yml new file mode 100644 index 0000000..0a22ed7 --- /dev/null +++ b/mos.yml @@ -0,0 +1,11 @@ +author: mongoose-os +description: Setup WiFi via Web UI +version: 1.0 +tags: + - c + - wifi +sources: + - src +filesystem: + - fs +skeleton_version: 2017-05-18 diff --git a/shot.png b/shot.png new file mode 100644 index 0000000..9e6cbca Binary files /dev/null and b/shot.png differ diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..8b4ac47 --- /dev/null +++ b/src/main.c @@ -0,0 +1,5 @@ +#include "fw/src/mgos_app.h" + +enum mgos_app_init_result mgos_app_init(void) { + return MGOS_APP_INIT_SUCCESS; +}