How to use android to connect to an ESP8266 access point without internet in a stable way?

孤者浪人 提交于 2019-12-06 13:24:39

If you specifically request using that Network once before it disconnects, it will stay connected indefinitely:

  • ConnectivityManager.bindProcessToNetwork(Network)
  • Network.bindSocket(Socket)
  • Network.openConnection(URL)

Also see my answer on how to synchronize the timing between network connection and access: https://stackoverflow.com/a/52304308/4969370

I figured 2 main issues with Android connecting to ESP8266 or ESP32 hotspot. I was using AP-STA dual mode. I read up that since ESP8266 and ESP32 have single radio handling AP and STA the connection will be fragile and not very stable which is why my android device was getting disconnected from AP during configuration.

The solve for this is keep the ESP* device in SOFT_AP mode during configuration and STA mode when its connected to the Access point and never in AP-STA dual mode. This completely solve my stability issues.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!