Firmware to use ESP8266EX as slave of Arduino Mega 2560

Hi, my situation is quite similar to what @Juraj describes in this topic but the solution described there, did not work for me.

With the information below, can you tell me what is the appropriate firmware file(s) and address(es) for my ESP8266EX to work as a slave of an Arduino Mega 2560?

# Combo board:

  • Mega 2560 with WiFi Esp8266 Integrated - Black Board
  • Serial and DIP switches:
  • For firmware download: 1, 2, 3 and 4 OFF; 5, 6 and 7 ON; Serial 0
  • For code update and run: 1, 2, 3 and 4 ON; 5, 6 and 7 OFF; Serial 1

# Chip info dump (provided by Chip Debug Tool V.3.9.9_R2):

  • Chip is ESP8266EX
  • Features: Wi-Fi, 160MHz
  • Crystal is 26MHz
  • Manufacturer: ef
  • Status value: 0x0000
  • Detected flash size: 4MB

# Code and tests:
I'm currently using the WiFiEsp library but I can change it if you show me a better option.
Here is a test snippet along with its current (and very persistent) output:

main.ino

#include <WiFiEsp.h>

void setup() {
Serial.begin(115200);
Serial3.begin(115200);

delay(8000);

Serial.println("Sending manual AT...");

Serial3.println("AT");

delay(1000);

while (Serial3.available())
Serial.write(Serial3.read());

Serial.println("\nNow WiFiEsp init");

WiFi.init(&Serial3);

if (WiFi.status() == WL_NO_SHIELD) {
Serial.println("ESP NOT detected");
} else {
Serial.println("ESP detected!");
}
}

void loop(){}

output:
06:52:55.646 -> Sending manual AT...
06:52:56.599 ->
06:52:56.599 -> Now WiFiEsp init
06:52:56.599 -> [WiFiEsp] Initializing ESP module
06:52:57.621 -> [WiFiEsp] >>> TIMEOUT >>>
06:52:59.624 -> [WiFiEsp] >>> TIMEOUT >>>
06:53:01.596 -> [WiFiEsp] >>> TIMEOUT >>>
06:53:03.633 -> [WiFiEsp] >>> TIMEOUT >>>
06:53:05.633 -> [WiFiEsp] >>> TIMEOUT >>>
06:53:06.614 -> [WiFiEsp] Cannot initialize ESP module
06:53:12.619 -> [WiFiEsp] >>> TIMEOUT >>>
06:53:12.619 -> [WiFiEsp] No tag found
06:53:12.619 -> ESP NOT detected

When testing AT commands with 'Hercules SETUP Utility by HW-Group', I get the following:
```
Serial port COM6 opened
sd$Ć“ĆŸ|ƒlĂ |ƒ$ĂŹc|ĆœÆ’Ă€â€œ{’cƒcĆ’Ă»ogĆžl'oÜãì#xxƒ${ls$ATAT+GMR
Serial port COM6 closed
```

Two takeaways from this output:

  • There is some garbage being read when the port is opened
  • The 'ATAT+GMR' in the end of that garbage is actually the two AT commands I tried sending to the chip (got no response)

# Firmwares already tried (got the same output):
I have tried using all of the binaries in the following repository:

For the NONOS option, I've tried the following files and addresses:
boot_v1.2+.bin 0x00000
user1.1024.new.2.bin 0x01000
esp_init_data_default.bin 0x3fc000
blank.bin 0x7e000 & 0x3fe000

also tried:
blank.bin 0xFB000
esp_init_data_default.bin 0xFC000
blank.bin 0x7E000
blank.bin 0xFE000
boot_v1.2+.bin 0x00000
user1.1024.new.2.bin 0x01000

Thanks for everyone’s attention!

I moved your topic to an appropriate forum category @gabriribeiro.

In the future, when creating a topic please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Great! Thanks!

1 Like

did you read this?
https://github.com/JAndrassy/WiFiEspAT/blob/master/README.md#at-firmware-versions

1 Like

I did see WiFiEspAT docs but, once I couldn’t get any response from a basic ‘Serial3.println(“AT“)‘ command, I saw no reason to change the library just yet.

Good news is that I got a reply from the boards seller and he sent me a new binary that worked just fine with WiFiEsp:

V1.6.2.zip (291,2,KB)

This list looks like a bag of groceries with no idea what is for dinner. Post an annotated schematic showing how you wired your project. Be sure to show all connections, power, ground and note any leads over 10"/25cm.
Your code would be much easier to follow if you used code tags.

@gilshultz The list you mentioned refers to a single board. This board comes along with two chips (ATmega2560 and Esp8266EX). I created this topic to get help stablishing communication between those two chips.

Meaning that:

  1. No wire connection (besides the USB) is expected
  2. There is only one option for dinner (Black Board - Mega 2560 with WiFi Esp8266 Integrated).

The second chunk of the list is just detailed information about the WiFi chip.

About the code, you’re right. Some online text editors recognize and pulbish everything between ‘‘‘quotation marks‘‘‘ as code. That was my intention at first. But it didn’t work as expected. I’ll make it better next time.

Thanks!