<dd><spanclass="apidef">ap</span><spanclass="apidesc">SSID for SoftAP. The length should be up to 31. The default value is **esp8266ap** for ESP8266, **esp32ap** for ESP32.</span></dd>
<dd><spanclass="apidef">password</span><spanclass="apidesc">Password for SodtAP. The length should be from 8 to up to 63. The default value is **12345678**.</span></dd>
<dd><spanclass="apidef">timeout</span><spanclass="apidesc">The timeout value of the captive portal in [ms] units. The default value is 0.</span></dd>
<dd><spanclass="apidef">channel</span><spanclass="apidesc">The channel number of WIFi when SoftAP starts. The default values is 1.</span></dd>
Sets IP address for Soft AP in captive portal. When AutoConnect fails the initial WiFi.begin, it starts the captive portal with the IP address specified this.
Automatically will try to reconnect with the past established access point (BSSID) when the current configured SSID in ESP8266/ESP32 could not be connected. By enabling this option, *AutoConnect::begin()* function will attempt to reconnect to a known access point using credentials stored in the flash, even if the connection failed by current SSID.
<dd><spanclass="apidef">false</span><spanclass="apidesc">Starts Captive Portal in SoftAP + STA mode without trying to reconnect. This is the default.</span></dd>
Captive portal activation switch. False for disabling the captive portal. It prevents starting the captive portal even if the connection at the first *WiFi.begin* fails.
<dd><spanclass="apidef">AC_SAVECREDENTIAL_AUTO</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">The credential saved automatically. This is the default.</span></dd>
<dd><spanclass="apidef">AC_SAVECREDENTIAL_NEVER</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">The credential no saved.</span></dd>
Specify the location to be redirected after module reset in the AutoConnect menu. It is given as an enumeration value of **AC_ONBOOTURI_t** indicating either the AutoConnect root path or the user screen home path.
<dd><spanclass="apidef">AC_ONBOOTURI_ROOT</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">Resetting the module redirects it to the AutoConnect root path. The root path is assumed to be AUTOCONNECT_URI defined in AutoConnectDefs.h.</span></dd>
<dd><spanclass="apidef">AC_ONBOOTURI_HOME</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">It is redirected to the URI specified by [**AutoConnectConfig::homeUri**](apiconfig.md#homeuri).</span></dd>
Sets the offset address of the credential storage area for EEPROM. This value must be between greater than 4 and less than flash sector size. (4096 by SDK)
If the sketch leaves this offset at zero, it will conflict the storage area of credentials with the user sketch owned data. It needs to use the behind of credential area.
Espressif Systems had announced the [application note](https://www.espressif.com/sites/default/files/esp8266_wi-fi_channel_selection_guidelines.pdf) about Wi-Fi channel selection.
Sets gateway address for Soft AP in captive portal. When AutoConnect fails the initial WiFi.begin, it starts the captive portal with the IP address specified this.
Disable the first WiFi.begin() and start the captive portal. If this option is enabled, the module will be in AP_STA mode and the captive portal will be activated regardless of [**AutoConnectConfig::autoRise**](apiconfig.md#autorise) specification.
<dd><spanclass="apidef">true</span><spanclass="apidesc">Start the captive portal with [**AutoConnect::begin**](api.md#begin).</span></dd>
<dd><spanclass="apidef">false</span><spanclass="apidesc">Enable the first WiFi.begin() and it will start captive portal when connection failed. This is default.</span></dd>
Specify the lower limit of the WiFi signal strength allowed to use as an access point. This value should be greater than -120 as RSSI. Generally, a data link will not be established unless it exceeds -90 dBm. Also, packet transmission is not reliable below -70 dBm to -80 dBm.
<dlclass="apidl">
<dt>**Type**</dt>
<dd><spanclass="apidef">int16_t</span><spanclass="apidesc">The default value is -120</span></dd>
Sets subnet mask for Soft AP in captive portal. When AutoConnect fails the initial WiFi.begin, it starts the captive portal with the IP address specified this.
Specify the timeout value of the captive portal in [ms] units. It is valid when the station is not connected and does not time out if the station is connected to the ESP module in SoftAP mode (i.e. Attempting WiFi connection with the portal function). If 0, the captive portal will not be timed-out.
Specify the connection order will attempt to connect to one of the highest RSSI values among multiple available access points. It is given as an enumeration value of **AC_PRINCIPLE_t** indicating.
<dlclass="apidl">
<dt>**Type**</dt>
<dd>AC_PRINCIPLE_t</dd>
<dt>**Value**</dt>
<dd><spanclass="apidef">AC_PRINCIPLE_RECENT</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">Attempts to connect in the order of the saved credentials entries. The entry order is generally a time series connected in the past.</span></dd>
<dd><spanclass="apidef">AC_PRINCIPLE_RSSI</span><spanclass="apidesc"></span><spanclass="apidef"> </span><spanclass="apidesc">Attempts to connect to one of the highest RSSI values among multiple available access points.</span></dd>
Specify whether to continue the portal function even if the captive portal timed out. If the true, when a timeout occurs, the [**AutoConnect::begin**](api.md#begin) function is exited with returns false, but the portal facility remains alive. So SoftAP remains alive and you can invoke AutoConnect while continuing sketch execution. The default is false.
<dd><spanclass="apidef">true</span><spanclass="apidesc">Continue the portal function even if the captive portal times out. The STA + SoftAP mode of the ESP module continues and accepts the connection request to the AP.</span></dd>
<dd><spanclass="apidef">false</span><spanclass="apidesc">When the captive portal times out, STA + SoftAP mode of the ESP module is stopped. This is default.</span></dd>
With the **retainPortal**, even if AutoConnect::begin in the setup() is timed out, you can execute the sketch and the portal function as a WiFi connection attempt by calling AutoConnect::handleClient in the loop().
!!! info "All unresolved addresses redirects to /_ac"
If you enable the **retainPortal** option, **all unresolved URIs will be redirected to `SoftAPIP/_ac`**. It happens frequently as client devices repeat captive portal probes in particular. To avoid this, you need to exit from the WiFi connection Apps on your device once.
<dd><spanclass="apidef">true</span><spanclass="apidesc">Output the flicker signal while [AutoConnect::begin](api.md#begin) operation. The **AUTOCONNECT_TICKER_PORT** macro in the `AutoConnectDefs.h` header file assigns pins for signal output. The default pin is arduino valiant's LED_BUILTIN. For boards without the LED_BUILTIN pin, assume pin #2.</span></dd>
Specifies the GPIO port number to output the flicker signal of the ticker. The default assumes on the board dependent definition LED_BUILTIN macro redefined by **AUTOCONNECT_TICKER_PORT** in `AutoConnectDefs.h`.