-
Notifications
You must be signed in to change notification settings - Fork 132
connect mode: ap_only, sta_only, sta_ap mode
BlackEdder edited this page Jul 11, 2017
·
4 revisions
ESP8266 support different operation modes: AP only, STA only and both enabled. painlessMesh
supports these modes three different modes. The main case were this is useful is for:
- Battery supplied nodes. A node that is running from battery must use deep sleep to extend runtime. It will only be active during a short time every some minutes or hours. They should not expose AP interface to mesh to avoid connection failures.
It could theoretically also be used to have your node be connected to the mesh as AP or STA only, but there are some caveats the user should be aware of:
- Even if
painlessMesh
is in STA or AP only mode it still binds to events such as new incoming connections, errors in connections etc. As such you have to be careful when you want to also access the WiFi chip at the same time and you can't rely on other libraries that try to take over the WiFi chip (i.e. you can't just use#include <ESP8266WiFi.h>
) - The network configuration results in only one station connection to be free at any time. As a result you can only have one AP-only node on the network and still form a fully connected mesh. Also it could take more time for the mesh to fully form.
- Due to hardware limitations the channel of the STA and AP need to be the same