Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Tasmota in a BLANK device, supports by default all the Wi-Fi modes available in the ESP8266 that are IEEE 802.11b/g/n.
But, if the device is not blank or comes from another firmware, sometimes the supported modes are restricted like having only 11b or 11b/g. Tasmota don't force the full support. That is why, this PR adds new options for the command
WIFI
to FORCE which modes are going to be used.The
WIFI
command now have the following options with this PR:0 - Turn Off Wi-Fi
1 - Turn On Wi-Fi
2 - Force the device to ONLY connects as a 11b device
3 - Force the device to ONLY connects as a 11b/g device
4 - Force the device to connects as a 11b/g/n device
When changing modes, the device disconnects and reconnects to the router without restarting. Because of that, sometimes you need to refresh your browser.
(REMEMBER that if your router don't support 11b, or is configured to not support 11b and you force 11b, your device won't connect. In the serial console you see AP TIMEOUT no matter if the SSId and Password are Ok)
Besides that, with this PR, it has been added to show the actual mode in
STATUS 11
, in the response of theWIFI
command and in the INFORMATION menu of the WebUI, for user troubleshooting. Also this PR have some code cleaning.Forcing modes is useful to troubleshoot and solve issues like:
In the AP mode, the ESP8266 supports only b/g modes.
These code changes were tested too on ESP32 and works fine. The ESP32 have all mode enabled by default, so this PR don't provide the new options of the
WIFI
command for ESP32. It just provide showing the actual mode.The ESP32 supports b/g/n/LR on both AP and STA modes. The LR mode (Long Range-Low Rate of 1km) is not supported in Tasmota ATM and can not be used.
Related issue (if applicable): NA
Proposed changes to the docs: tasmota/docs#751
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass