I have just noticed, not sure how long it's been the case, that all of my current ESP8266 IoT Cloud enabled devices (running the 'stock' sketch) are all broadcasting a ESP_xxxxxxx WiFi connection hotspot.
Is this intentional, and why are they broadcasting? Of the 50+ ESP devices in my current network, there are the only ones doing do (when not in initial setup mode).
How can I turn this off? Can I turn this off? I need to check if my other project using these ESP8266 boards has the same result.
EDIT: Okay it appears it might be a D1 Mini thing, as it's a DEV board. Where I need to configure the device to appropriate WiFi Mode (not broadcast). Though I'm unsure where I place this within the IoT Cloud code.
See below, I need to define wifi.setmode(wifi.STATION)
mode value should be one of
- wifi.STATION for when the device is connected to a WiFi router. This is often done to give the device access to the Internet.
- wifi.SOFTAP for when the device is acting only as an access point. This will allow you to see the device in the list of WiFi networks (unless you hide the SSID, of course). In this mode your computer can connect to the device, creating a local area network. Unless you change the value, the NodeMCU device will be given a local IP address of 192.168.4.1 and assign your computer the next available IP address, such as 192.168.4.2.
- wifi.STATIONAP is the combination of wifi.STATION and wifi.SOFTAP. It allows you to create a local WiFi connection and connect to another WiFi router.
- wifi.NULLMODE to switch off WiFi
current mode after setup