The use of the ESP8266 in the world of IoT

User avatar
By ritesh
#41634 Hi,

I am using ESP8266 NONOS SDK 1.4.0 for my development purpose. My Project goal is to read file which is sent from android application and need to parse it and take LED ON/OFF action which are connected on different free GPIOs based on file content.

I understood that ESP8266 NONOS SDK is based on callback. I have also developed one dummy firmware to blink LEDs using software timer based on some perticular interval which works fine without any issue.

Now, I want to develop firmware as well as andoid app in such way that android app will connect with ESP8266 module and send one file to that ESP8266 module.

After that, Task of ESP8266 module is to read that file, parse that file and operate different LEDs which are connected on different GPIOs based on file content.

Does anyone has idea or information about how to read file and parse it into ESP8266 module?

Please let me know if anyone has any clue or information for that.

Regards,
Ritesh Prajapati
User avatar
By jeffrey92
#41688 Have the app generate a JSON string and send that to the ESP8266. For non-OS, try out esp-ginx, esp-link, or esphttpd so that the ESP can respond to the request. This should work for what you'd like to do. Now, if you want to save that data as a file on the ESP8266 SPI Flash, you will have to dedicate a spot on flash to save it, or use SPIFFS (check NodeMCU or Sming for example).

Basically you need a way to handle incoming requests on the ESP and those are the most readily available solutions IMO. If you have a dedicated server I would suggest using MQTT instead.