@@ -10,13 +10,14 @@ This module provides a simple way of configuring ESP8266 chips without using a s
...
@@ -10,13 +10,14 @@ This module provides a simple way of configuring ESP8266 chips without using a s
After running [`enduser_setup.start()`](#enduser_setupstart) a portal like the above can be accessed through a wireless network called SetupGadget_XXXXXX. The portal is used to submit the credentials for the WiFi of the enduser.
After running [`enduser_setup.start()`](#enduser_setupstart) a portal like the above can be accessed through a wireless network called SetupGadget_XXXXXX. The portal is used to submit the credentials for the WiFi of the enduser.
After an IP address has been successfully obtained this module will stop as if [`enduser_setup.stop()`](#enduser_setupstop) had been called.
After an IP address has been successfully obtained this module will stop as if [`enduser_setup.stop()`](#enduser_setupstop) had been called.
Alternative HTML can be served by placing a file called `index.html` in the filesystem. This file will be kept in RAM, so keep it as small as possible.
## enduser_setup.manual()
## enduser_setup.manual()
Controls whether manual AP configuration is used.
Controls whether manual AP configuration is used.
By default the `enduser_setup` module automatically configures an open access point when starting, and stops it when the device has been successfully joined to a WiFi network. If manual mode has been enabled, neither of this is done. The device must be manually configured for `wifi.SOFTAP` mode prior to calling `enduser_setup.start()`. Additionally, the portal is not stopped after the device has successfully joined to a WiFi network.
By default the `enduser_setup` module automatically configures an open access point when starting, and stops it when the device has been successfully joined to a WiFi network. If manual mode has been enabled, neither of this is done. The device must be manually configured for `wifi.SOFTAP` mode prior to calling `enduser_setup.start()`. Additionally, the portal is not stopped after the device has successfully joined to a WiFi network.
Most importantly, *the `onConfigured()` callback is not supported in manual mode*. This limitation may disappear in the future.
#### Syntax
#### Syntax
`enduser_setup.manual([on_off])`
`enduser_setup.manual([on_off])`
...
@@ -27,15 +28,30 @@ Most importantly, *the `onConfigured()` callback is not supported in manual mode
...
@@ -27,15 +28,30 @@ Most importantly, *the `onConfigured()` callback is not supported in manual mode
#### Returns
#### Returns
The current setting, true if manual mode is enabled, false if it is not.
The current setting, true if manual mode is enabled, false if it is not.
-`onConfigured()` callback will be fired when an IP-address has been obtained, just before the enduser_setup module will terminate itself
-`onConnected()` callback will be fired when an IP-address has been obtained, just before the enduser_setup module will terminate itself
-`onError()` callback will be fired if an error is encountered. `err_num` is a number describing the error, and `string` contains a description of the error.
-`onError()` callback will be fired if an error is encountered. `err_num` is a number describing the error, and `string` contains a description of the error.
-`onDebug()` callback is disabled by default. It is intended to be used to find internal issues in the module. `string` contains a description of what is going on.
-`onDebug()` callback is disabled by default. It is intended to be used to find internal issues in the module. `string` contains a description of what is going on.