Mega +WiFi R3 Atmega2560

I'm trying to install the AT firmware so I can just program the AtMega2560 without the switching back and forth....

The firmware seems to load but I cannot get it to respond to the AT+GMR command.

Here are the steps i followed from another post except that the versions are the newer as shown in my screenshot.

flash_download_tool_v3.8.5 (it is for windows)
Need 2x fw pack:
ESP8266_NONOS_SDK-3.0.4
esp_iot_sdk_v1.4.0
Option 1:
ESP8266_NONOS_SDK-3.0.4\bin\boot_v1.2.bin @ 0x0
ESP8266_NONOS_SDK-3.0.4\bin\at\1024+1024\user1.2048.new.5.bin @ 0x1000
ESP8266_NONOS_SDK-3.0.4\bin\esp_init_data_default_v05.bin @ 0x1fc000
ESP8266_NONOS_SDK-3.0.4\bin\blank.bin @ 0x1fe000
ESP8266_NONOS_SDK-3.0.4\bin\blank.bin @ 0xfe000
ESP8266_NONOS_SDK-3.0.4\bin\blank.bin @ 0x1fb000

Flasher tool settings:
SPI 80MHz, DIO , baud: 115200

During the flashing, you'll need the 5, 6, 7, dipswitches ON, and the rest OFF.
After flashing, flick 7 to OFF, and verify the result: press the reset button, then connect to the COM port and send AT+GMR command.

when I try AT+GMR, nothing happens.

when the baud is set to 115200 i just get random characters.
if I change baud to 74880, i get the following

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 2592, room 16
tail 0
chksum 0xef
load 0x00000000, len 0, room 8
tail 0
chksum 0xef
load 0x00000000, len 0, room 0
tail 0
chksum 0xef
csum 0xef
csum err
ets_main.c

SDK 3.0.5 is available at https://github.com/espressif/ESP8266_NONOS_SDK/releases

you have blank.bin on 1fb000 twice and 1fe000 is missing.
set 40 MHz flash

you should get "ready" as last line of boot log at 74880

esptool.py write_flash --flash_size 2MB-c1 0x0 boot_v1.7.bin 0x01000 at/1024+1024/user1.2048.new.5.bin 0x1fb000 blank.bin 0x1fc000 esp_init_data_default_v08.bin 0xfe000 blank.bin 0x1fe000 blank.bin

thank you.
i appears the firmware loaded.

When it try AT+GMR. still no response
I power the board down and changed the dip switches to the following.
dip switches
1-4 OFF
5-6 ON
7-8 OFF

when I change the baud to 74880 I get the following.

still no "ready". the flashing log is from Flash Download Tool or esptool?
I would try QIO,

I used the esptool and the line you provided, just added the full path to my files. I don't know what QIO means

esptool.py write_flash --flash_size 2MB-c1 0x0 D:\ESP8266_NONOS_SDK-3.0.5\bin\boot_v1.7.bin 0x01000 D:\ESP8266_NONOS_SDK-3.0.5\bin\at\1024+1024\user1.2048.new.5.bin 0x1fb000 D:\ESP8266_NONOS_SDK-3.0.5\bin\blank.bin 0x1fc000 D:\ESP8266_NONOS_SDK-3.0.5\bin\esp_init_data_default_v08.bin 0xfe000 D:\ESP8266_NONOS_SDK-3.0.5\bin\blank.bin 0x1fe000 D:\ESP8266_NONOS_SDK-3.0.5\bin\blank.bin

QIO would be in the Flash Download Tool, just to change something

try to add --flash_mode dio to esptool command line

this did the trick. thanks! now to load my sketch in to AtMega 2560

you can use my WiFiEspAT library. it is in Library Manager

Already installed, thanks!

Here's what I'm trying to accomplish. I use the Wemos D1R2 with this shield. It will only control 8 outputs and I need 12. so thats why I'm moving to the Mega to have more outputs. Now I'm running into the issue of the E131 library doesn't run on Mega. Do you know of one that does? can I run the E131 sketch on the ESP8266 and then have it control out outputs on the Mega? Does that make sense?

Here is the sketch I've been using.

// Wemos D1 E1.31 - 8 channel sketch for Sparkfun EL Escudo Dos shield
//Spark Fun link https://www.sparkfun.com/products/10878

#include <ESP8266WiFi.h>
#include <E131.h> // Copyright (c) 2015 Shelby Merrick http://www.forkineye.com

// ***** USER SETUP STUFF *****
const char ssid[] = "MYSSID";  // replace with your SSID.
const char passphrase[] = "12345678"; // replace with your passphrase.

const int universe = 12; // this sets the universe number you are using.
//The IP setup is only required if you are using Unicast and/or you want a static IP for multicast.
//In multicast this IP is only for network connectivity not multicast data
IPAddress ip (192,168,1,222);  // xx,xx,xx,xx
IPAddress netmask (255,255,255,0);  //255,255,255,0 is common
IPAddress gateway (192,168,1,1);  // xx,xx,xx,xx normally your router / access piont IP address
IPAddress dns (192,168,1,1); //  // xx,xx,xx,xx normally your router / access point IP address

// this sets the pin numbers to use as outputs.
//for Wemos D1 R1 pins are 16,5,4,14,12,13,0,2
//for Wemos D1 R2 pins are 16,5,4,0,2,14,12,13
const int output_1 = 16; //the pin to use as output 1 (D0)
const int output_2 = 5;  //the pin to use as output 2 (D1)
const int output_3 = 4;  //the pin to use as output 3 (D2)
const int output_4 = 0;  //the pin to use as output 4 (D3)
const int output_5 = 2;  //the pin to use as output 5 (D4)
const int output_6 = 14; //the pin to use as output 6 (D5)
const int output_7 = 12; //the pin to use as output 7 (D6)
const int output_8 = 13; //the pin to use as output 8 (D7)


E131 e131;

void setup() {
  Serial.begin(115200);
  // set the pins chosen above as outputs.
  pinMode(output_1, OUTPUT);
  pinMode(output_2, OUTPUT);
  pinMode(output_3, OUTPUT);
  pinMode(output_4, OUTPUT);
  pinMode(output_5, OUTPUT);
  pinMode(output_6, OUTPUT);
  pinMode(output_7, OUTPUT);
  pinMode(output_8, OUTPUT);

  // set the pins chosen above to low / off.
  digitalWrite(output_1, LOW);
  digitalWrite(output_2, LOW);
  digitalWrite(output_3, LOW);
  digitalWrite(output_4, LOW);
  digitalWrite(output_5, LOW);
  digitalWrite(output_6, LOW);
  digitalWrite(output_7, LOW);
  digitalWrite(output_8, LOW);
  
  /* Choose one to begin listening for E1.31 data */
  //e131.begin(ssid, passphrase, ip, netmask, gateway, dns); /* via Unicast on the default port */
  e131.beginMulticast(ssid, passphrase, universe, ip, netmask, gateway, dns); /* via Multicast with static IP Address */
  //e131.beginMulticast(ssid, passphrase, universe); /* via Multicast  with DHCP IP Address */  
}

void loop() {
  /* Parse a packet */
  uint16_t num_channels = e131.parsePacket();

  /* Process channel data if we have it */
  if (num_channels) {
    Serial.println("we have data");

    digitalWrite(output_1, (e131.data[0] > 127) ? HIGH : LOW);
    digitalWrite(output_2, (e131.data[1] > 127) ? HIGH : LOW);
    digitalWrite(output_3, (e131.data[2] > 127) ? HIGH : LOW);
    digitalWrite(output_4, (e131.data[3] > 127) ? HIGH : LOW);
    digitalWrite(output_5, (e131.data[4] > 127) ? HIGH : LOW);
    digitalWrite(output_6, (e131.data[5] > 127) ? HIGH : LOW);
    digitalWrite(output_7, (e131.data[6] > 127) ? HIGH : LOW);
    digitalWrite(output_8, (e131.data[7] > 127) ? HIGH : LOW);
    }//end we have data

} // end void loop

How do you use Static IP with WiFiEspAT?

in the SetupPersistentWiFiConnection there is a commented out section for static IP

is this in one of the library files?

would this line change?
WiFi.begin(NAME_OF_SSID, PASSWORD_OF_SSID);

to something like this

WiFi.begin(NAME_OF_SSID, PASSWORD_OF_SSID, IP_ADDRESS, GATEWAY, NETMASK);

with WiFiEspAT I recommend to use persistent connection, which is remembered in the esp. then the sketch doesn't call begin.

The 'example' sketch SetupPersistentWiFiConnection in Tools section of WiFiEspAT examples in IDE Examples menu is intended to create the persistent connection.

The library has a long README file. I recommend you to read it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.