I’m trying to get the ESP8266 working with MBED. I have successfully flashed the AT firmware and if I connect an Arduino (I already had the code for it) in Serial pasthrough mode I can talk AT comands with the module at 115200:
AT
OK
AT+GMR
@T version:1.6.2.0(Apr 03 2018 11:10:59)
SDK version:2.2.1(6ai22eo1
I’ve tried plugging the Arduino Uno set up as Serial-passthrough and I have connected to the UART pins of the Nucleo that are supposed to go to the ESP8266.
Nothing shows on Serial.
This rules out a problem with the ESP8266 itself. So assuming I have connected the UART lines and GND correctly it has to be something related to the configuration right?
I have D1 and D0 connected to Arduino digital pins set up with Software Serial. I know that the Arduino is working rigth because I can talk with the ESP8266 via the arduino.
We have an error. However we dont want these pins because as he stated D1 an D0 are also used for the comunication with the computer. So I changed the pins to D8 and D2 (ignoring the error).
Changing to D8 and D2 and running (with the old program uploaded) gives an error while flashing:
I tried it the code what I posted above on Nucleo-F303RE (so same like you use) on pins D14 & D15 and also D8 & D2. Both are working.
I also encountered the error Operator new[] out of memory but only when I had the ESP modul badly connected.
I also encountered the error from your first post -3012. In my case it was caused by not connected GND between Nucleo and ESP module. My module is powered from external power source not from Nucleo board.
Second, changed to D8 and D2. I still get the st link error mentioned above when trying to upload to times straight the same wifi example (have to upload blinky in between).
Third, when I finally flash the example I can see the ESP8266 LED blink for some time (supose this is good). However, I don’t see anything on the serial monitor, not even the first title.
about the error you can use Clean Build and if it not help, then try to update/reinstall ST-link drivers and firmware and reinstall MbedStudio.
you can try to make code based on BufferedSerial as UART repeater and try to send a simple AT commands via St-link to Nucleo and then to ESP. That will tell you, if the connection between Nucleo and ESP is OK or not.
I just got mine working with a NUCLEO-L432KC on mbed 6.15. Different versions of the esp8266 seem to have different pin configurations. I eventually got this to work ESP8266 V2 Firmware update | Mbed
but needed to wire the gpio pins differently because I have an esp12. GPIO15, and 0 were grounded and then EN and 2 were 3.3v. Then to operate with the mbed device GPIO_0 goes HIGH and the rest stay the same. I also needed to give the esp its own 3.3v linear regulator with filtering capacitors.
The other thing I found is to actually connect I had to include the security type so
I also found there appears to be some stuff in the ESP8266Interface.h file that don’t seem to matter like the country code and those default pin assignments.