I am trying to use the ESP8266wifi library with STM32F103C8T6 and one ESP-01 (ESP8266) connected to Serial2 (pins PA2, PA3 of STM32). According to the library docs, there is a constructor to do that: ESP8266wifi(Stream serialIn, Stream serialOut, byte resetPin) but I really dont underestand what this constructor expect to receive as Stream serialIn and Stream serialOut. I tryied to use ESP8266wifi(PA3, PA2, myresetpin) but it does not work. Any idea will be appreciated. Thanks, Antonio
Serial is Stream so use ESP8266wifi(Serial2, Serial2, resetpin);
If you have AT 1.7 or AT 2.1 in the esp8266 I recommend you to use my WiFiEspAT library. it has the standard Arduino networking API
Thanks Juraj. It works !!!