So you're a Noob? Post your questions here until you graduate! Don't be shy.
User avatar
By edujtm
#68276 I would like to launch a product with 8266 but I am not sure the best way to connect a cell phone app that will read a simple status port of ESP8266.

My needs are:
- a process that will be simple to set up, a user friendly process for end user. The solution must address many devices sold. Each 8266 device need to be linked a one user or two by the app.
- if a android app could receive messages from 8266 whithout connect to internet would be better to avoid a complicated process to setup but how to connect cell phone at internet and 8266 network (AP mode) at same time?

One solution that I think more complicated is to use steps of setup and a broker service.
I am thinking to set the esp8266 as AP, on start ,and then, an android app must connect and transfer all local data for connection for local router, the key access for broker services (MQTT) and then command a reset on 8266. The 8266 will start again as client of local network and send the messages to MQTT server.

After a bit of research it seems that the cell phone cannot connect to internet and 8266 network (8266 as AP) at same time. I think that will be necessary to build an app to use a broker (like Mosquitto) service (NxN) including a distribution of access keys at time of setup, what is a bit more complicated to do. If possible, a direct connection to app could be more simple (without broker services or avaliability of local router or complex setup process) but there are no way to keep cell phone connected at internet by local router and another net of 8266 working as AP, get messages at real time, etc

I know that chromecast device, for sample, has a similar procedure to setup by app with user informing local SSID and password of router and after reset, the device start to work.

I would like to know if someone has another idea for how to send messages to android app keeping in mind that 8266 will be a product and a end user need to unbox and do the initial setup as simple as possible.


Note - I am from Brazil, so sorry about my poor Enghish