Skip to content

Is switching between softAP and client connection possible? #2352

Closed
@treii28

Description

@treii28

Is it possible to switch back and forth between connecting to an existing network or running a softAP in the arduino code? I'm interested in having a softAP landing page after programming where you can specify a network ssid and password. Once that is stored, have the device try to connect to that network as a client instead. If for any reason that fails, after so many attempts or a given period of time go back to softAP mode and the configuration page again until the information is again changed.

Someone in the ESP8266.com forums said it was possible with the .mode() method, but didn't say anything else so I'm not sure what all needs to be done. (i.e. does the old instance handle need to be re-initialize in any way? Do I have to 'shut down' one before starting the other in some way, etc)

Basic Infos

Hardware

Hardware: ESP-12 / nodemcu

Description

Problem description

Settings in IDE

Module: NodeMCU v0.9
CPU Frequency: 80Mhz
Upload Using: SERIAL
Reset Method: nodemcu

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions