diff --git a/esp8266_deauther/SerialInterface.cpp b/esp8266_deauther/SerialInterface.cpp index 6de540d..a6ec46c 100644 --- a/esp8266_deauther/SerialInterface.cpp +++ b/esp8266_deauther/SerialInterface.cpp @@ -1046,7 +1046,7 @@ void SerialInterface::runCommand(String input) { } // ===== START/STOP AP ===== // - // startap + // startap [-p ] [-pswd ] [-ch ] [-h] [-cp] else if (eqlsCMD(0, CLI_STARTAP)) { String path = String(F("/web")); String ssid = settings.getSSID(); @@ -1057,17 +1057,17 @@ void SerialInterface::runCommand(String input) { for (int i = 1; i < list->size(); i++) { if (eqlsCMD(i, CLI_PATH)) { - path = list->get(i + 1); i++; + path = list->get(i); } else if (eqlsCMD(i, CLI_SSID)) { - ssid = list->get(i + 1); i++; + ssid = list->get(i); } else if (eqlsCMD(i, CLI_PASSWORD)) { - password = list->get(i + 1); i++; + password = list->get(i); } else if (eqlsCMD(i, CLI_CHANNEL)) { - ch = list->get(i + 1).toInt(); i++; + ch = list->get(i).toInt(); } else if (eqlsCMD(i, CLI_HIDDEN)) { hidden = true; } else if (eqlsCMD(i, CLI_CAPTIVEPORTAL)) { diff --git a/serialcommands.md b/serialcommands.md index fcf8fbd..87fded5 100644 --- a/serialcommands.md +++ b/serialcommands.md @@ -318,10 +318,18 @@ Will only work if you run a wifi scan first, i.e. `scan wifi -t 65s -ch 1`. - **width** (optional, default = 2): Width in characters per bar in graph. ## STARTAP -`startap ...` -... -`stopap` -... +`startap [-p ] [-pswd ] [-ch ] [-h] [-cp]` +Starts access point. +- **path** [-p] (optional, default = "/web"): Path to web files. +- **ssid** [-s] (optional, default = [settings ssid](https://github.com/spacehuhn/esp8266_deauther/blob/master/settings.md#ssid)): Network name. +- **password** [-pswd] (optional, default = [settings password](https://github.com/spacehuhn/esp8266_deauther/blob/master/settings.md#password)): Password. +- **channel** [-ch] (optional, default = [settings channel](https://github.com/spacehuhn/esp8266_deauther/blob/master/settings.md#channel)): Channel . +- **hidden** [-h] (optional, default = [settings hidden](https://github.com/spacehuhn/esp8266_deauther/blob/master/settings.md#hidden)): Hide SSID. +- **captiveportal** [-cp] (optional, default = [settings captiveportal](https://github.com/spacehuhn/esp8266_deauther/blob/master/settings.md#captiveportal)): Enable captiveportal. + +`stopap` +Stops access point. + ## SCREEN `screen `