logo elektroda
logo elektroda
X
logo elektroda

Viewing device status, remote control - ESP8266 or something else?

norbis15 876 3
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18263257
    norbis15
    Level 14  
    Hello,
    I have a device whose heart is an STM32 microcontroller. I would like, in the first phase, to be able to view the operating status of the device via the internet (website, application on tel), and in the next phase to control this device.

    I have equipped the device with ESP8266 and even managed to write from the microcontroller via ESP8266 the values of the variables to a file on the server with a GET request, according to:


    .
    However, I'm not sure if this is the best solution. Shouldn't I use something "more professional" such as a raspberry for the web communication?

    The functionality of the device will be developed quite a bit, so there will be quite a lot of data to transfer as well (say the state of 50 variables).
    The next step would be to make more devices, and allow the web application to identify which device you want to communicate with (in total you can distinguish between devices via a serial number variable).
    Then it would be nice to be able to update the FLASH memory on the STM32.

    I would also add that I don't want to use any peripherals in the ESP other than the UART - to communicate with the main microcontroller. All main functions are performed by the main STM32 microcontroller.
    Is the ESP8266 an apt choice for the purposes mentioned? .

    If the ESP can meet my expectations, would the AT commands that the factory firmware in the ESP is equipped with be sufficient. Or should I prepare my own firmware in order to have more control over the system, using the Arduino or NodeMCU environment?
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • #2 18263434
    khoam
    Level 42  
    norbis15 wrote:
    The functionality of the device will be developed quite a lot, so there will be quite a lot of data to transfer as well (say the state of 50 variables).
    .
    This is not too prohibitive a challenge for the ESP8266, but it all depends on how many bytes it will be and in what units of time.

    norbis15 wrote:
    If the ESP can meet my expectations, would the AT commands that the factory firmware on the ESP comes with be sufficient.
    .
    If only for sending data in client mode, then the AT firmware should be sufficient. If you want to set up a mini-server on the ESP, for example, then not so much. You can write your own code for the ESP8266 in C (RTOS SDK or NONOS SDK), C++ (Arduino HAL), Micropython or Lua.

    Added after 3 [minutes]: .

    norbis15 wrote:
    Following this, it would be nice to be able to update the FLASH memory on the STM32.

    ESP-LINK: https://github.com/jeelabs/esp-link
  • ADVERTISEMENT
  • #3 18263966
    norbis15
    Level 14  
    khoam wrote:
    norbis15 wrote:
    The functionality of the device will be developed quite a bit, so there will be quite a lot of data to transfer as well (say the state of 50 variables).
    .
    This is not too prohibitive a challenge for the ESP8266, but it all depends on how many bytes it will be and in what units of time.


    The data by a large margin could be 1kB, with a write every 1sec or so.

    khoam wrote:
    norbis15 wrote:
    If the ESP can meet my expectations, would the AT commands that the factory firmware in the ESP is equipped with suffice.
    .
    If only for sending data in client mode, then the AT firmware should suffice. If you want to set up a mini-server on the ESP, for example, then not so much. You can write your own code for the ESP8266 in C (RTOS SDK or NONOS SDK), C++ (Arduino HAL), Micropython or Lua.
    .

    My preference is to write in C. When writing my own code will I need to delve into the workings of the TCP stack and the HTTP protocol?
ADVERTISEMENT