You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
AutoConnect/docs/apiconfig.html

1711 lines
61 KiB

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="ESP8266/ESP32 WLAN configuration at run time with web interface">
<link rel="canonical" href="https://Hieromon.github.io/AutoConnect/apiconfig.html">
<meta name="author" content="Hieromon Ikasamo">
<meta name="lang:clipboard.copy" content="Copy to clipboard">
<meta name="lang:clipboard.copied" content="Copied to clipboard">
<meta name="lang:search.language" content="en">
<meta name="lang:search.pipeline.stopwords" content="True">
<meta name="lang:search.pipeline.trimmer" content="True">
<meta name="lang:search.result.none" content="No matching documents">
<meta name="lang:search.result.one" content="1 matching document">
<meta name="lang:search.result.other" content="# matching documents">
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link rel="shortcut icon" href="assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.1, mkdocs-material-4.6.3">
<title>AutoConnectConfig API - AutoConnect for ESP8266/ESP32</title>
<link rel="stylesheet" href="assets/stylesheets/application.adb8469c.css">
<link rel="stylesheet" href="assets/stylesheets/application-palette.a8b3c06d.css">
<meta name="theme-color" content="#3f51b5">
<script src="assets/javascripts/modernizr.86422ebf.js"></script>
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
<link rel="stylesheet" href="assets/fonts/material-icons.css">
<link rel="stylesheet" href="css/paragraph.css">
<link rel="stylesheet" href="css/extra.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css">
<script>
window.ga = window.ga || function() {
(ga.q = ga.q || []).push(arguments)
}
ga.l = +new Date
/* Setup integration and send page view */
ga("create", "UA-116150854-1", "auto")
ga("set", "anonymizeIp", true)
ga("send", "pageview")
/* Register handler to log search on blur */
document.addEventListener("DOMContentLoaded", () => {
if (document.forms.search) {
var query = document.forms.search.query
query.addEventListener("blur", function() {
if (this.value) {
var path = document.location.pathname;
ga("send", "pageview", path + "?q=" + this.value)
}
})
}
})
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</head>
<body dir="ltr" data-md-color-primary="indigo" data-md-color-accent="indigo">
<svg class="md-svg">
<defs>
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="__github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="#constructor" tabindex="0" class="md-skip">
Skip to content
</a>
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="https://Hieromon.github.io/AutoConnect/" title="AutoConnect for ESP8266/ESP32" aria-label="AutoConnect for ESP8266/ESP32" class="md-header-nav__button md-logo">
<img alt="logo" src="images/arduino-logo.svg" width="24" height="24">
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<span class="md-header-nav__topic">
AutoConnect for ESP8266/ESP32
</span>
<span class="md-header-nav__topic">
AutoConnectConfig API
</span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" aria-label="search" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://github.com/Hieromon/AutoConnect" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
Hieromon/AutoConnect
</div>
</a>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container">
<main class="md-main" role="main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="https://Hieromon.github.io/AutoConnect/" title="AutoConnect for ESP8266/ESP32" class="md-nav__button md-logo">
<img alt="logo" src="images/arduino-logo.svg" width="48" height="48">
</a>
AutoConnect for ESP8266/ESP32
</label>
<div class="md-nav__source">
<a href="https://github.com/Hieromon/AutoConnect" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
Hieromon/AutoConnect
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="index.html" title="Overview" class="md-nav__link">
Overview
</a>
</li>
<li class="md-nav__item">
<a href="gettingstarted.html" title="Getting started" class="md-nav__link">
Getting started
</a>
</li>
<li class="md-nav__item">
<a href="menu.html" title="AutoConnect menu" class="md-nav__link">
AutoConnect menu
</a>
</li>
<li class="md-nav__item">
<a href="basicusage.html" title="Basic usage" class="md-nav__link">
Basic usage
</a>
</li>
<li class="md-nav__item">
<a href="advancedusage.html" title="Advanced usage" class="md-nav__link">
Advanced usage
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6">
<label class="md-nav__link" for="nav-6">
Custom Web pages
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-6">
Custom Web pages
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="acintro.html" title="Custom Web pages with AutoConnect" class="md-nav__link">
Custom Web pages with AutoConnect
</a>
</li>
<li class="md-nav__item">
<a href="acelements.html" title="AutoConnectElements" class="md-nav__link">
AutoConnectElements
</a>
</li>
<li class="md-nav__item">
<a href="acjson.html" title="Custom Web pages with JSON" class="md-nav__link">
Custom Web pages with JSON
</a>
</li>
<li class="md-nav__item">
<a href="achandling.html" title="Handling the custom Web pages" class="md-nav__link">
Handling the custom Web pages
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-7" type="checkbox" id="nav-7">
<label class="md-nav__link" for="nav-7">
OTA Updates
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-7">
OTA Updates
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="otaupdate.html" title="OTA Updates" class="md-nav__link">
OTA Updates
</a>
</li>
<li class="md-nav__item">
<a href="otabrowser.html" title="Using Web Browser" class="md-nav__link">
Using Web Browser
</a>
</li>
<li class="md-nav__item">
<a href="otaserver.html" title="Using Update Server" class="md-nav__link">
Using Update Server
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-8" type="checkbox" id="nav-8" checked>
<label class="md-nav__link" for="nav-8">
Library APIs
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-8">
Library APIs
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="api.html" title="AutoConnect API" class="md-nav__link">
AutoConnect API
</a>
</li>
<li class="md-nav__item">
<a href="apiaux.html" title="AutoConnectAux API" class="md-nav__link">
AutoConnectAux API
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
AutoConnectConfig API
</label>
<a href="apiconfig.html" title="AutoConnectConfig API" class="md-nav__link md-nav__link--active">
AutoConnectConfig API
</a>
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#constructor" class="md-nav__link">
Constructor
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#autoconnectconfig" class="md-nav__link">
AutoConnectConfig
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#public-member-variables" class="md-nav__link">
Public member variables
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#apid" class="md-nav__link">
apid
</a>
</li>
<li class="md-nav__item">
<a href="#apip" class="md-nav__link">
apip
</a>
</li>
<li class="md-nav__item">
<a href="#autoreconnect" class="md-nav__link">
autoReconnect
</a>
</li>
<li class="md-nav__item">
<a href="#autoreset" class="md-nav__link">
autoReset
</a>
</li>
<li class="md-nav__item">
<a href="#autorise" class="md-nav__link">
autoRise
</a>
</li>
<li class="md-nav__item">
<a href="#autosave" class="md-nav__link">
autoSave
</a>
</li>
<li class="md-nav__item">
<a href="#booturi" class="md-nav__link">
bootUri
</a>
</li>
<li class="md-nav__item">
<a href="#boundaryoffset" class="md-nav__link">
boundaryOffset
</a>
</li>
<li class="md-nav__item">
<a href="#channel" class="md-nav__link">
channel
</a>
</li>
<li class="md-nav__item">
<a href="#dns1" class="md-nav__link">
dns1
</a>
</li>
<li class="md-nav__item">
<a href="#dns2" class="md-nav__link">
dns2
</a>
</li>
<li class="md-nav__item">
<a href="#gateway" class="md-nav__link">
gateway
</a>
</li>
<li class="md-nav__item">
<a href="#hidden" class="md-nav__link">
hidden
</a>
</li>
<li class="md-nav__item">
<a href="#homeuri" class="md-nav__link">
homeUri
</a>
</li>
<li class="md-nav__item">
<a href="#hostname" class="md-nav__link">
hostName
</a>
</li>
<li class="md-nav__item">
<a href="#immediatestart" class="md-nav__link">
immediateStart
</a>
</li>
<li class="md-nav__item">
<a href="#menuitems" class="md-nav__link">
menuItems
</a>
</li>
<li class="md-nav__item">
<a href="#minrssi" class="md-nav__link">
minRSSI
</a>
</li>
<li class="md-nav__item">
<a href="#netmask" class="md-nav__link">
netmask
</a>
</li>
<li class="md-nav__item">
<a href="#ota" class="md-nav__link">
ota
</a>
</li>
<li class="md-nav__item">
<a href="#portaltimeout" class="md-nav__link">
portalTimeout
</a>
</li>
<li class="md-nav__item">
<a href="#principle" class="md-nav__link">
principle
</a>
</li>
<li class="md-nav__item">
<a href="#psk" class="md-nav__link">
psk
</a>
</li>
<li class="md-nav__item">
<a href="#retainportal" class="md-nav__link">
retainPortal
</a>
</li>
<li class="md-nav__item">
<a href="#staip" class="md-nav__link">
staip
</a>
</li>
<li class="md-nav__item">
<a href="#stagateway" class="md-nav__link">
staGateway
</a>
</li>
<li class="md-nav__item">
<a href="#stanetmask" class="md-nav__link">
staNetmask
</a>
</li>
<li class="md-nav__item">
<a href="#ticker" class="md-nav__link">
ticker
</a>
</li>
<li class="md-nav__item">
<a href="#tickerport" class="md-nav__link">
tickerPort
</a>
</li>
<li class="md-nav__item">
<a href="#tickeron" class="md-nav__link">
tickerOn
</a>
</li>
<li class="md-nav__item">
<a href="#title" class="md-nav__link">
title
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#autoconnectconfig-example" class="md-nav__link">
AutoConnectConfig example
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="apielements.html" title="AutoConnectElements API" class="md-nav__link">
AutoConnectElements API
</a>
</li>
<li class="md-nav__item">
<a href="apiupdate.html" title="AutoConnectUpdate API" class="md-nav__link">
AutoConnectUpdate API
</a>
</li>
<li class="md-nav__item">
<a href="apiextra.html" title="Something extra" class="md-nav__link">
Something extra
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-9" type="checkbox" id="nav-9">
<label class="md-nav__link" for="nav-9">
Examples
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-9">
Examples
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="howtoembed.html" title="How to embed" class="md-nav__link">
How to embed
</a>
</li>
<li class="md-nav__item">
<a href="datatips.html" title="Tips for data conversion" class="md-nav__link">
Tips for data conversion
</a>
</li>
<li class="md-nav__item">
<a href="menuize.html" title="Attach the menu" class="md-nav__link">
Attach the menu
</a>
</li>
<li class="md-nav__item">
<a href="wojson.html" title="Custom Web pages w/o JSON" class="md-nav__link">
Custom Web pages w/o JSON
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-toggle md-nav__toggle" data-md-toggle="nav-10" type="checkbox" id="nav-10">
<label class="md-nav__link" for="nav-10">
Appendix
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="1">
<label class="md-nav__title" for="nav-10">
Appendix
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="lsbegin.html" title="Inside AutoConnect::begin" class="md-nav__link">
Inside AutoConnect::begin
</a>
</li>
<li class="md-nav__item">
<a href="credit.html" title="Saved credentials access" class="md-nav__link">
Saved credentials access
</a>
</li>
<li class="md-nav__item">
<a href="acupload.html" title="File upload handler" class="md-nav__link">
File upload handler
</a>
</li>
<li class="md-nav__item">
<a href="colorized.html" title="Custom colorized" class="md-nav__link">
Custom colorized
</a>
</li>
<li class="md-nav__item">
<a href="changelabel.html" title="Change label text" class="md-nav__link">
Change label text
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="faq.html" title="FAQ" class="md-nav__link">
FAQ
</a>
</li>
<li class="md-nav__item">
<a href="changelog.html" title="Change log" class="md-nav__link">
Change log
</a>
</li>
<li class="md-nav__item">
<a href="license.html" title="License" class="md-nav__link">
License
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Table of contents</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="#constructor" class="md-nav__link">
Constructor
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#autoconnectconfig" class="md-nav__link">
AutoConnectConfig
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#public-member-variables" class="md-nav__link">
Public member variables
</a>
<nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#apid" class="md-nav__link">
apid
</a>
</li>
<li class="md-nav__item">
<a href="#apip" class="md-nav__link">
apip
</a>
</li>
<li class="md-nav__item">
<a href="#autoreconnect" class="md-nav__link">
autoReconnect
</a>
</li>
<li class="md-nav__item">
<a href="#autoreset" class="md-nav__link">
autoReset
</a>
</li>
<li class="md-nav__item">
<a href="#autorise" class="md-nav__link">
autoRise
</a>
</li>
<li class="md-nav__item">
<a href="#autosave" class="md-nav__link">
autoSave
</a>
</li>
<li class="md-nav__item">
<a href="#booturi" class="md-nav__link">
bootUri
</a>
</li>
<li class="md-nav__item">
<a href="#boundaryoffset" class="md-nav__link">
boundaryOffset
</a>
</li>
<li class="md-nav__item">
<a href="#channel" class="md-nav__link">
channel
</a>
</li>
<li class="md-nav__item">
<a href="#dns1" class="md-nav__link">
dns1
</a>
</li>
<li class="md-nav__item">
<a href="#dns2" class="md-nav__link">
dns2
</a>
</li>
<li class="md-nav__item">
<a href="#gateway" class="md-nav__link">
gateway
</a>
</li>
<li class="md-nav__item">
<a href="#hidden" class="md-nav__link">
hidden
</a>
</li>
<li class="md-nav__item">
<a href="#homeuri" class="md-nav__link">
homeUri
</a>
</li>
<li class="md-nav__item">
<a href="#hostname" class="md-nav__link">
hostName
</a>
</li>
<li class="md-nav__item">
<a href="#immediatestart" class="md-nav__link">
immediateStart
</a>
</li>
<li class="md-nav__item">
<a href="#menuitems" class="md-nav__link">
menuItems
</a>
</li>
<li class="md-nav__item">
<a href="#minrssi" class="md-nav__link">
minRSSI
</a>
</li>
<li class="md-nav__item">
<a href="#netmask" class="md-nav__link">
netmask
</a>
</li>
<li class="md-nav__item">
<a href="#ota" class="md-nav__link">
ota
</a>
</li>
<li class="md-nav__item">
<a href="#portaltimeout" class="md-nav__link">
portalTimeout
</a>
</li>
<li class="md-nav__item">
<a href="#principle" class="md-nav__link">
principle
</a>
</li>
<li class="md-nav__item">
<a href="#psk" class="md-nav__link">
psk
</a>
</li>
<li class="md-nav__item">
<a href="#retainportal" class="md-nav__link">
retainPortal
</a>
</li>
<li class="md-nav__item">
<a href="#staip" class="md-nav__link">
staip
</a>
</li>
<li class="md-nav__item">
<a href="#stagateway" class="md-nav__link">
staGateway
</a>
</li>
<li class="md-nav__item">
<a href="#stanetmask" class="md-nav__link">
staNetmask
</a>
</li>
<li class="md-nav__item">
<a href="#ticker" class="md-nav__link">
ticker
</a>
</li>
<li class="md-nav__item">
<a href="#tickerport" class="md-nav__link">
tickerPort
</a>
</li>
<li class="md-nav__item">
<a href="#tickeron" class="md-nav__link">
tickerOn
</a>
</li>
<li class="md-nav__item">
<a href="#title" class="md-nav__link">
title
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#autoconnectconfig-example" class="md-nav__link">
AutoConnectConfig example
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset">
<h1>AutoConnectConfig API</h1>
<h2 id="constructor"><i class="fa fa-code"></i> Constructor<a class="headerlink" href="#constructor" title="Permanent link">&para;</a></h2>
<h3 id="autoconnectconfig">AutoConnectConfig<a class="headerlink" href="#autoconnectconfig" title="Permanent link">&para;</a></h3>
<p><div class="codehilite" style="background: #272822"><pre style="line-height: 125%"><span></span><code><span style="color: #f8f8f2">AutoConnectConfig()</span>
</code></pre></div>
<div class="codehilite" style="background: #272822"><pre style="line-height: 125%"><span></span><code><span style="color: #f8f8f2">AutoConnectConfig(</span><span style="color: #66d9ef">const</span> <span style="color: #66d9ef">char</span><span style="color: #f92672">*</span> <span style="color: #f8f8f2">ap,</span> <span style="color: #66d9ef">const</span> <span style="color: #66d9ef">char</span><span style="color: #f92672">*</span> <span style="color: #f8f8f2">password)</span>
</code></pre></div>
<div class="codehilite" style="background: #272822"><pre style="line-height: 125%"><span></span><code><span style="color: #f8f8f2">AutoConnectConfig(</span><span style="color: #66d9ef">const</span> <span style="color: #66d9ef">char</span><span style="color: #f92672">*</span> <span style="color: #f8f8f2">ap,</span> <span style="color: #66d9ef">const</span> <span style="color: #66d9ef">char</span><span style="color: #f92672">*</span> <span style="color: #f8f8f2">password,</span> <span style="color: #66d9ef">const</span> <span style="color: #66d9ef">unsigned</span> <span style="color: #66d9ef">long</span> <span style="color: #f8f8f2">timeout)</span>
</code></pre></div>
<div class="codehilite" style="background: #272822"><pre style="line-height: 125%"><span></span><code><span style="color: #f8f8f2">AutoConnectConfig(</span><span style="color: #66d9ef">const</span> <span style="color: #66d9ef">char</span><span style="color: #f92672">*</span> <span style="color: #f8f8f2">ap,</span> <span style="color: #66d9ef">const</span> <span style="color: #66d9ef">char</span><span style="color: #f92672">*</span> <span style="color: #f8f8f2">password,</span> <span style="color: #66d9ef">const</span> <span style="color: #66d9ef">unsigned</span> <span style="color: #66d9ef">long</span> <span style="color: #f8f8f2">timeout,</span> <span style="color: #66d9ef">const</span> <span style="color: #66d9ef">uint8_t</span> <span style="color: #f8f8f2">channel)</span>
</code></pre></div>
<dl class="apidl">
<dt><strong>Parameters</strong></dt>
<dd><span class="apidef">ap</span><span class="apidesc">SSID for SoftAP. The length should be up to 31. The default value is <strong>esp8266ap</strong> for ESP8266, <strong>esp32ap</strong> for ESP32.</span></dd>
<dd><span class="apidef">password</span><span class="apidesc">Password for SodtAP. The length should be from 8 to up to 63. The default value is <strong>12345678</strong>.</span></dd>
<dd><span class="apidef">timeout</span><span class="apidesc">The timeout value of the captive portal in [ms] units. The default value is 0.</span></dd>
<dd><span class="apidef">channel</span><span class="apidesc">The channel number of WIFi when SoftAP starts. The default values is 1.</span></dd>
</dl></p>
<h2 id="public-member-variables"><i class="fa fa-code"></i> Public member variables<a class="headerlink" href="#public-member-variables" title="Permanent link">&para;</a></h2>
<h3 id="apid"><i class="fa fa-caret-right"></i> apid<a class="headerlink" href="#apid" title="Permanent link">&para;</a></h3>
<p>SoftAP's SSID.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd><span class="apidef">String</span><span class="apidesc"> The default value is <strong>esp8266ap</strong> for ESP8266, <strong>esp32ap</strong> for ESP32.</span></dd>
</dl></p>
<h3 id="apip"><i class="fa fa-caret-right"></i> apip<a class="headerlink" href="#apip" title="Permanent link">&para;</a></h3>
<p>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.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd><span class="apidef">IPAddress</span><span class="apidesc">The default value is <strong>172.217.28.1</strong></span></dd>
</dl></p>
<h3 id="autoreconnect"><i class="fa fa-caret-right"></i> autoReconnect<a class="headerlink" href="#autoreconnect" title="Permanent link">&para;</a></h3>
<p>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, <em>AutoConnect::begin()</em> function will attempt to reconnect to a known access point using credentials stored in the flash, even if the connection failed by current SSID.<br />
If the connection fails, starts the captive portal in SoftAP+STA mode.<br />
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>bool</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">true</span><span class="apidesc">Reconnect automatically.</span></dd>
<dd><span class="apidef">false</span><span class="apidesc">Starts Captive Portal in SoftAP + STA mode without trying to reconnect. This is the default.</span></dd>
</dl></p>
<p>When the autoReconnect option is enabled, an automatic connection will behave if the following conditions are satisfied.</p>
<ul>
<li>Invokes <em>AutoConnect::begin</em> without user name and password parameter as <code>begin()</code>.</li>
<li>If one of the saved BSSIDs (not the SSID) of the credentials matches the BSSID detected by the network scan.</li>
</ul>
<h3 id="autoreset"><i class="fa fa-caret-right"></i> autoReset<a class="headerlink" href="#autoreset" title="Permanent link">&para;</a></h3>
<p>Reset ESP8266 module automatically after WLAN disconnected.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>bool</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">true</span><span class="apidesc">Reset after WiFi disconnected automatically.</span></dd>
<dd><span class="apidef">false</span><span class="apidesc">No reset.</span></dd>
</dl></p>
<h3 id="autorise"><i class="fa fa-caret-right"></i> autoRise<a class="headerlink" href="#autorise" title="Permanent link">&para;</a></h3>
<p>Captive portal activation switch. False for disabling the captive portal. It prevents starting the captive portal even if the connection at the 1<sup>st</sup>-WiFi.begin fails.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>bool</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">true</span><span class="apidesc">Enable the captive portal. This is the default.</span></dd>
<dd><span class="apidef">false</span><span class="apidesc">Disable the captive portal.</span></dd>
</dl></p>
<h3 id="autosave"><i class="fa fa-caret-right"></i> autoSave<a class="headerlink" href="#autosave" title="Permanent link">&para;</a></h3>
<p>The credential saved automatically at the connection establishment.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>AC_SAVECREDENTIAL_t</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">AC_SAVECREDENTIAL_AUTO</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">The credential saved automatically. This is the default.</span></dd>
<dd><span class="apidef">AC_SAVECREDENTIAL_NEVER</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">The credential no saved.</span></dd>
</dl></p>
<h3 id="booturi"><i class="fa fa-caret-right"></i> bootUri<a class="headerlink" href="#booturi" title="Permanent link">&para;</a></h3>
<p>Specify the location to be redirected after module reset in the AutoConnect menu. It is given as an enumeration value of <strong>AC_ONBOOTURI_t</strong> indicating either the AutoConnect root path or the user screen home path.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>AC_ONBOOTURI_t</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">AC_ONBOOTURI_ROOT</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Resetting the module redirects it to the AutoConnect root path. The root path is assumed to be AUTOCONNECT_URI defined in <a href="api.html#defined-macros"><code>AutoConnectDefs.h</code></a>.</span></dd>
<dd><span class="apidef">AC_ONBOOTURI_HOME</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">It is redirected to the URI specified by <a href="apiconfig.html#homeuri"><strong>AutoConnectConfig::homeUri</strong></a>.</span></dd>
</dl></p>
<h3 id="boundaryoffset"><i class="fa fa-caret-right"></i> boundaryOffset<a class="headerlink" href="#boundaryoffset" title="Permanent link">&para;</a></h3>
<p>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)<br />
The default value is 0.<br />
This option is valid only for ESP8266 or ESP32 arduino core 1.0.2 earlier.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>uint16_t</dd>
</dl></p>
<div class="admonition warning">
<p class="admonition-title">It will conflict with user data.</p>
<p>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.</p>
</div>
<h3 id="channel"><i class="fa fa-caret-right"></i> channel<a class="headerlink" href="#channel" title="Permanent link">&para;</a></h3>
<p>The channel number of WIFi when SoftAP starts.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>uint8_t</dd>
<dt><strong>Value</strong></dt>
<dd>1 ~ 14. The default value is 1.</dd>
</dl></p>
<div class="admonition info">
<p class="admonition-title">How do I choose Channel</p>
<p>Espressif Systems had announced the <a href="https://www.espressif.com/sites/default/files/esp8266_wi-fi_channel_selection_guidelines.pdf">application note</a> about Wi-Fi channel selection.</p>
</div>
<h3 id="dns1"><i class="fa fa-caret-right"></i> dns1<a class="headerlink" href="#dns1" title="Permanent link">&para;</a></h3>
<p>Set primary DNS server address when using static IP address.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>IPAddress</dd>
</dl></p>
<h3 id="dns2"><i class="fa fa-caret-right"></i> dns2<a class="headerlink" href="#dns2" title="Permanent link">&para;</a></h3>
<p>Set secondary DNS server address when using static IP address.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>IPAddress</dd>
</dl></p>
<h3 id="gateway"><i class="fa fa-caret-right"></i> gateway<a class="headerlink" href="#gateway" title="Permanent link">&para;</a></h3>
<p>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.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd><span class="apidef">IPAddress</span><span class="apidesc">The default value is <strong>172.217.28.1</strong></span></dd>
</dl></p>
<h3 id="hidden"><i class="fa fa-caret-right"></i> hidden<a class="headerlink" href="#hidden" title="Permanent link">&para;</a></h3>
<p>Sets SoftAP to hidden SSID.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>uint8_t</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">0</span><span class="aidesc">SSID will be appeared. This is the default.</span></dd>
<dd><span class="apidef">1</span><span class="apidesc">SSID will be hidden.</span></dd>
</dl></p>
<h3 id="homeuri"><i class="fa fa-caret-right"></i> homeUri<a class="headerlink" href="#homeuri" title="Permanent link">&para;</a></h3>
<p>Sets the home path of user sketch. This path would be linked from 'HOME' in the AutoConnect menu. The default for homeUri is "/".
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>String</dd>
</dl></p>
<h3 id="hostname"><i class="fa fa-caret-right"></i> hostName<a class="headerlink" href="#hostname" title="Permanent link">&para;</a></h3>
<p>Sets the station host name of ESP8266/ESP32.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>String</dd>
</dl></p>
<h3 id="immediatestart"><i class="fa fa-caret-right"></i> immediateStart<a class="headerlink" href="#immediatestart" title="Permanent link">&para;</a></h3>
<p>Disable the 1<sup>st</sup>-WiFi.begin and start the captive portal. If this option is enabled, the module will be in AP_STA mode and the captive portal. The evaluation rank of this parameter is lower than the <a href="apiconfig.html#autorise"><strong>AutoConnectConfig::autoRise</strong></a>. Even if immediateStart is true, the captive portal will not launch if autoRise is false.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>bool</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">true</span><span class="apidesc">Start the captive portal with <a href="api.html#begin"><strong>AutoConnect::begin</strong></a>.</span></dd>
<dd><span class="apidef">false</span><span class="apidesc">Enable the 1<sup>st</sup>-WiFi.begin and it will start captive portal when connection failed. This is default.</span></dd>
</dl></p>
<h3 id="menuitems"><i class="fa fa-caret-right"></i> menuItems<a class="headerlink" href="#menuitems" title="Permanent link">&para;</a></h3>
<p>Configure applying items of the <a href="menu.html">AutoConnect menu</a>. You can arbitrarily combine valid menus by coordinating the menuItems value.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd><span class="apidef">uint16_t</span><span class="apidesc">It provides the combined <strong>AC_MENUITEM_t</strong> value of the item to apply to the AutoConnect menu.<br>Specify the value calculated from the <strong>logical OR</strong> by the AC_MENUITEM_t value of each item applied as a menu. It affects not only disappear the items from the menu also invalidates the URI they have. As a consequence, even if it accesses the URL directly will occur a 404 error.<br>The default value is logical OR of AC_MENUITEM_CONFIGNEW, AC_MENUITEM_OPENSSIDS, AC_MENUITEM_DISCONNECT, AC_MENUITEM_RESET, AC_MENUITEM_UPDATE and AC_MENUITEM_HOME.</span></dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">AC_MENUITEM_NONE</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">No assign items except for the AutoConnectAux page item.</span></dd>
<dd><span class="apidef">AC_MENUITEM_CONFIGNEW</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends <a href="menu.html#config-new-ap">Configure new AP</a> item.</span></dd>
<dd><span class="apidef">AC_MENUITEM_OPENSSIDS</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends <a href="menu.html#open-ssids">Open SSIDs</a> item.</span></dd>
<dd><span class="apidef">AC_MENUITEM_DISCONNECT</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends <a href="menu.html#disconnect">Disconnect</a> item.</span></dd>
<dd><span class="apidef">AC_MENUITEM_RESET</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends <a href="menu.html#reset">Reset...</a> item.</span></dd>
<dd><span class="apidef">AC_MENUITEM_UPDATE</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends <a href="menu.html#update">Update</a> item.</span></dd>
<dd><span class="apidef">AC_MENUITEM_HOME</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends <a href="menu.html#home">HOME</a> item.</span></dd>
<dd><span class="apidef">AC_MENUITEM_DEVINFO</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Appends the <strong>Device info</strong> item which links to <a href="menu.html##where-the-from">AutoConnect statistics page</a>.</span></dd>
</dl></p>
<div class="admonition info">
<p class="admonition-title">How to specify the value of the menu items</p>
<p>An menuItems accepts the logical OR of AC_MENUITEM_t type value. For example, to enable only Open SSIDs and HOME items, specify:
<div class="codehilite" style="background: #272822"><pre style="line-height: 125%"><span></span><code><span style="color: #f8f8f2">AutoConnectConfig</span> <span style="color: #f8f8f2">config;</span>
<span style="color: #f8f8f2">config.menuItems</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">AC_MENUITEM_OPENSSIDS</span> <span style="color: #f92672">|</span> <span style="color: #f8f8f2">AC_MENUITEM_HOME;</span>
</code></pre></div>
However, even if you specify like the above, the AutoConnectAux page items still display on the menu. To remove the AutoConnectAux items, use the <a href="apiaux.html#menu">AutoConnectAux::menu</a> function.</p>
</div>
<h3 id="minrssi"><i class="fa fa-caret-right"></i> minRSSI<a class="headerlink" href="#minrssi" title="Permanent link">&para;</a></h3>
<p>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.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd><span class="apidef">int16_t</span><span class="apidesc">The default value is -120</span></dd>
</dl></p>
<h3 id="netmask"><i class="fa fa-caret-right"></i> netmask<a class="headerlink" href="#netmask" title="Permanent link">&para;</a></h3>
<p>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.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd><span class="apidef">IPAddress</span><span class="apidesc">The default value is <strong>255.255.255.0</strong></span></dd>
</dl></p>
<h3 id="ota"><i class="fa fa-caret-right"></i> ota<a class="headerlink" href="#ota" title="Permanent link">&para;</a></h3>
<p>Specifies to import the built-in OTA update class into the Sketch. When this option is enabled, an <strong>Update</strong> item will appear in the AutoConnect menu, and the OTA update via Web browser will be automatically embedded to the Sketch.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>AC_OTA_t</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">AC_OTA_EXTRA</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">AutoConnect does not import AutoConnectOTA. This is the default.</span></dd>
<dd><span class="apidef">AC_OTA_BUILTIN</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Specifies to include AutoConnectOTA in the Sketch.</span></dd>
</dl></p>
<h3 id="portaltimeout"><i class="fa fa-caret-right"></i> portalTimeout<a class="headerlink" href="#portaltimeout" title="Permanent link">&para;</a></h3>
<p>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.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd><span class="apidef">unsigned long</span><span class="apidesc">Captive portal timeout value. The default value is 0.</span></dd>
</dl></p>
<h3 id="principle"><i class="fa fa-caret-right"></i> principle<a class="headerlink" href="#principle" title="Permanent link">&para;</a></h3>
<p>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 <strong>AC_PRINCIPLE_t</strong> indicating.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>AC_PRINCIPLE_t</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">AC_PRINCIPLE_RECENT</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="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><span class="apidef">AC_PRINCIPLE_RSSI</span><span class="apidesc"></span><span class="apidef">&nbsp;</span><span class="apidesc">Attempts to connect to one of the highest RSSI values among multiple available access points.</span></dd>
</dl></p>
<h3 id="psk"><i class="fa fa-caret-right"></i> psk<a class="headerlink" href="#psk" title="Permanent link">&para;</a></h3>
<p>Sets password for SoftAP. The length should be from 8 to up to 63. The default value is <strong>12345678</strong>.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>String</dd>
</dl></p>
<h3 id="retainportal"><i class="fa fa-caret-right"></i> retainPortal<a class="headerlink" href="#retainportal" title="Permanent link">&para;</a></h3>
<p>Specify whether to continue the portal function even if the captive portal timed out. If the true, when a timeout occurs, the <a href="api.html#begin"><strong>AutoConnect::begin</strong></a> 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.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>bool</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">true</span><span class="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><span class="apidef">false</span><span class="apidesc">When the captive portal times out, STA + SoftAP mode of the ESP module is stopped. This is default.</span></dd>
</dl></p>
<div class="admonition hint">
<p class="admonition-title">Connection request after timed-out</p>
<p>With the <strong>retainPortal</strong>, 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().</p>
</div>
<div class="admonition info">
<p class="admonition-title">All unresolved addresses redirects to /_ac</p>
<p>If you enable the <strong>retainPortal</strong> option, <strong>all unresolved URIs will be redirected to <code>SoftAPIP/_ac</code></strong>. 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.</p>
</div>
<h3 id="staip"><i class="fa fa-caret-right"></i> staip<a class="headerlink" href="#staip" title="Permanent link">&para;</a></h3>
<p>Set a static IP address. The IP will behave with STA mode.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>IPAddress</dd>
</dl></p>
<h3 id="stagateway"><i class="fa fa-caret-right"></i> staGateway<a class="headerlink" href="#stagateway" title="Permanent link">&para;</a></h3>
<p>Set the gateway address when using static IP address.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>IPAddress</dd>
</dl></p>
<h3 id="stanetmask"><i class="fa fa-caret-right"></i> staNetmask<a class="headerlink" href="#stanetmask" title="Permanent link">&para;</a></h3>
<p>Set the subnetmask when using static IP address.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>IPAddress</dd>
</dl></p>
<h3 id="ticker"><i class="fa fa-caret-right"></i> ticker<a class="headerlink" href="#ticker" title="Permanent link">&para;</a></h3>
<p>Set flicker signal output according to WiFi connection status during AutoConnect::begin behavior.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>bool</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">true</span><span class="apidesc">Output the flicker signal while <a href="api.html#begin">AutoConnect::begin</a> operation. The <strong>AUTOCONNECT_TICKER_PORT</strong> macro in the <code>AutoConnectDefs.h</code> 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>
<dd><span class="apidef">false</span>No flicker signal output.<span class="apidesc"></span></dd>
</dl></p>
<h3 id="tickerport"><i class="fa fa-caret-right"></i> tickerPort<a class="headerlink" href="#tickerport" title="Permanent link">&para;</a></h3>
<p>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 <strong>AUTOCONNECT_TICKER_PORT</strong> in <a href="api.html#defined-macros"><code>AutoConnectDefs.h</code></a>.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>uint8_t</dd>
</dl></p>
<h3 id="tickeron"><i class="fa fa-caret-right"></i> tickerOn<a class="headerlink" href="#tickeron" title="Permanent link">&para;</a></h3>
<p>Specifies the active logic level of the flicker signal. This value indicates the active signal level when driving the ticker.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>uint8_t</dd>
<dt><strong>Value</strong></dt>
<dd><span class="apidef">LOW</span>A flicker signal is an active-high.<span class="apidesc"></span></dd>
<dd><span class="apidef">HIGH</span>A flicker signal is an active-low.<span class="apidesc"></span></dd>
</dl></p>
<h3 id="title"><i class="fa fa-caret-right"></i> title<a class="headerlink" href="#title" title="Permanent link">&para;</a></h3>
<p>Set the menu title.
<dl class="apidl">
<dt><strong>Type</strong></dt>
<dd>String</dd>
</dl></p>
<h2 id="autoconnectconfig-example"><i class="fa fa-code"></i> AutoConnectConfig example<a class="headerlink" href="#autoconnectconfig-example" title="Permanent link">&para;</a></h2>
<div class="codehilite" style="background: #272822"><pre style="line-height: 125%"><span></span><code><span style="color: #f8f8f2">AutoConnect</span> <span style="color: #f8f8f2">Portal;</span>
<span style="color: #f8f8f2">AutoConnectConfig</span> <span style="color: #a6e22e">Config</span><span style="color: #f8f8f2">(</span><span style="color: #e6db74">&quot;&quot;</span><span style="color: #f8f8f2">,</span> <span style="color: #e6db74">&quot;passpass&quot;</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// SoftAp name is determined at runtime</span>
<span style="color: #f8f8f2">Config.apid</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">ESP.hostname();</span> <span style="color: #75715e">// Retrieve host name to SotAp identification</span>
<span style="color: #f8f8f2">Config.apip</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">IPAddress(</span><span style="color: #ae81ff">192</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">168</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">10</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">101</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// Sets SoftAP IP address</span>
<span style="color: #f8f8f2">Config.gateway</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">IPAddress(</span><span style="color: #ae81ff">192</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">168</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">10</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">1</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// Sets WLAN router IP address</span>
<span style="color: #f8f8f2">Config.netmask</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">IPAddress(</span><span style="color: #ae81ff">255</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">255</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">255</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">0</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// Sets WLAN scope</span>
<span style="color: #f8f8f2">Config.autoReconnect</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">true;</span> <span style="color: #75715e">// Enable auto-reconnect</span>
<span style="color: #f8f8f2">Config.autoSave</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">AC_SAVECREDENTIAL_NEVER;</span> <span style="color: #75715e">// No save credential</span>
<span style="color: #f8f8f2">Config.boundaryOffset</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">64</span><span style="color: #f8f8f2">;</span> <span style="color: #75715e">// Reserve 64 bytes for the user data in EEPROM.</span>
<span style="color: #f8f8f2">Config.portalTimeout</span> <span style="color: #f92672">=</span> <span style="color: #ae81ff">60000</span><span style="color: #f8f8f2">;</span> <span style="color: #75715e">// Sets timeout value for the captive portal</span>
<span style="color: #f8f8f2">Config.retainPortal</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">true;</span> <span style="color: #75715e">// Retains the portal function after timed-out</span>
<span style="color: #f8f8f2">Config.homeUri</span> <span style="color: #f92672">=</span> <span style="color: #e6db74">&quot;/index.html&quot;</span><span style="color: #f8f8f2">;</span> <span style="color: #75715e">// Sets home path of Sketch application</span>
<span style="color: #f8f8f2">Config.title</span> <span style="color: #f92672">=</span><span style="color: #e6db74">&quot;My menu&quot;</span><span style="color: #f8f8f2">;</span> <span style="color: #75715e">// Customize the menu title</span>
<span style="color: #f8f8f2">Config.staip</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">IPAddress(</span><span style="color: #ae81ff">192</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">168</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">10</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">10</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// Sets static IP</span>
<span style="color: #f8f8f2">Config.staGateway</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">IPAddress(</span><span style="color: #ae81ff">192</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">168</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">10</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">1</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// Sets WiFi router address</span>
<span style="color: #f8f8f2">Config.staNetmask</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">IPAddress(</span><span style="color: #ae81ff">255</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">255</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">255</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">0</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// Sets WLAN scope</span>
<span style="color: #f8f8f2">Config.dns1</span> <span style="color: #f92672">=</span> <span style="color: #f8f8f2">IPAddress(</span><span style="color: #ae81ff">192</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">168</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">10</span><span style="color: #f8f8f2">,</span><span style="color: #ae81ff">1</span><span style="color: #f8f8f2">);</span> <span style="color: #75715e">// Sets primary DNS address</span>
<span style="color: #f8f8f2">Portal.config(Config);</span> <span style="color: #75715e">// Configure AutoConnect</span>
<span style="color: #f8f8f2">Portal.begin();</span> <span style="color: #75715e">// Starts and behaves captive portal</span>
</code></pre></div>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="apiaux.html" title="AutoConnectAux API" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Previous
</span>
AutoConnectAux API
</span>
</div>
</a>
<a href="apielements.html" title="AutoConnectElements API" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
AutoConnectElements API
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
</nav>
</div>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
Copyright &copy; 2018-2020 Hieromon Ikasamo
</div>
powered by
<a href="https://www.mkdocs.org" target="_blank" rel="noopener">MkDocs</a>
and
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs</a>
</div>
<div class="md-footer-social">
<link rel="stylesheet" href="assets/fonts/font-awesome.css">
<a href="https://github.com/Hieromon" target="_blank" rel="noopener" title="github" class="md-footer-social__link fa fa-github"></a>
<a href="https://twitter.com/hieromon" target="_blank" rel="noopener" title="twitter" class="md-footer-social__link fa fa-twitter"></a>
</div>
</div>
</div>
</footer>
</div>
<script src="assets/javascripts/application.c33a9706.js"></script>
<script>app.initialize({version:"1.1",url:{base:"."}})</script>
<script src="js/gifffer.min.js"></script>
</body>
</html>