I have a Chinese Mega+WiFi board. It looks the same as the WeMos and the RobotDyn, but there are no identifying markings on it. I have the tx switch set to Tx/Rx 3. I set the first 4 switches to ON since I want to be able to program and run the Mega normally as Serial and to have communication between the ESP8266 and the Mega on Serial3.
I am able to upload a sketch to echo commands (below) into the Mega and it runs. I then try to type "AT+RST" and I don't see anything back. I was powering from my laptop USB port and just saw on the back of the board is says 7-16Volts. So I will try 9V. I have no idea if the ESP8266 comes (as I hope) with the default AT command set in it. And I have no idea how to find out. I don't know if it is my sketch, the switches or no AT firmware in the ESP. Here is the program. Thanks!?
void setup()
{
Serial.begin(115200); // communication with the host computer
//while (!Serial) { ; }
// Start the software serial for communication with the ESP8266
// Switch the comments on the 2 lines below for an Uno
//ESPserial.begin(115200);
Serial3.begin(115200);
Serial.println("");
Serial.println("Remember to to set Both NL & CR in the serial monitor.");
Serial.println("Ready");
Serial.println("");
}
void loop()
{
// listen for communication from the ESP8266 and then write it to the serial monitor
// more Uno swapping, change Serial3 for ESPserial
if ( Serial3.available() ) { Serial.write( Serial3.read() ); }
// listen for user input and send it to the ESP8266
if ( Serial.available() ) { Serial3.write( Serial.read() ); }
}
Moderator edit: </mark> <mark>[code]</mark> <mark>
I did set serial monitor to both CR and LF. I leave it that way all the time for my projects. I tried a 9V power supply. Then I tried to switch the switches to USB<> ESP8266. When I open the serial monitor, I see a small string of garbage characters. Entering "AT" and "AT\r\n" does nothing. Every time I open the serial monitor I get more random characters but that is the only time I see anything in the serial monitor. I have tried changing the serial monitor baud rate to all the most popular ones and that gives the same garbage characters. I am setting the switches to ON by pushing them towards the legend table. Towards where I see "on" on the switch.
fdecker:
I did set serial monitor to both CR and LF. I leave it that way all the time for my projects. I tried a 9V power supply. Then I tried to switch the switches to USB<> ESP8266. When I open the serial monitor, I see a small string of garbage characters. Entering "AT" and "AT\r\n" does nothing. Every time I open the serial monitor I get more random characters but that is the only time I see anything in the serial monitor. I have tried changing the serial monitor baud rate to all the most popular ones and that gives the same garbage characters. I am setting the switches to ON by pushing them towards the legend table. Towards where I see "on" on the switch.
the AT firmware is not there. the garbage is the boot log at different baud rate. that is normal.
New Info! I set switch 5&6 again and am connecting using the Aduino Serial monitor. I tried every baud rate. When I select 74,880, I immediately get this:
fdecker:
New Info! I set switch 5&6 again and am connecting using the Aduino Serial monitor. I tried every baud rate. When I select 74,880, I immediately get this:
Back with more info. I am fairly certain the problem was NOT that it did not have firmware, as I have tried 16 different firmware and setting combinations to upload it myself and I still can't get it to work. Current error is:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
ets_main.c
I went to Expressif site and got their download
Got ESP_8266_NonOs_AT_Bin_v1.74
Tried to follow directions that all reference the same board and all have completely different settings for how to use the expresif firmware update (see links at bottom)
First settings I tried it went into a loop with a light blinking on the board and serial monitor had several lines of error that repeated too quickly to read.
Tried 512-512 and 1024+1024 files no difference in the current error I get no matter what I do. It always stays at baud 78880
The chip on this board says ESP8266EX. One site says to use 80mHz, DIO, 32mBit. The other site says 30mH, QIO 4Mbit, the third site says 80mHz, DIO and 32Mbit-C1 !!!
The expressif readme.md does not match what addresses show if you hover over the files.
Readme
I have no way to copy the hover help, but it shows
init_data_default 7C000
blank is 7e000 and 3e000
If it shows 3 addresses for "blank" do I stick it in there twice, once for each address? At this point I am just guessing. Can anyone help at least narrow down things to try and help explain what the settings on my chip are? People seem to have gotten this board to work with all sorts of flash sizes!
blank 7e000 &3e000
Thank you for all your help. IT IS WORKING!! That looks like a python script. I am using the Expressif download tool. Could you answer one more question? Which of the settings just have to match the ESP for uploading and which things load a setting that the chip will use in its firmware? IOW, what do all the settings do In the "picture is worth a thousand words" department, here is the settings that worked. I notice you use the 1024+1024 file and I used the 512+512. How do I know what files will work and what won't? I looked everywhere for the specs of this board and the ESP8266EX and can't find how much memory it has or what settings match it. One big mistake I made in the beginning was not checking the default speed in mHz. Note file files, that it is the 2.2 SDK version, and the settings in the firmware uploader. Also there is an init 05 file and an init 05. Not sure if it made a difference since I was trying different files, but I chose the 08 this time.
the Flash Download Tool changes the uploaded binary before upload. it applies the settings.
esptool.py doesn't change anything in the binary. the standard '1024' binaries are built for esp with 2 MB flash.
the readme or the AT reference have all the information about addresses and binaries used.
fdecker:
Thank you for all your help. IT IS WORKING!! That looks like a python script. I am using the Expressif download tool. Could you answer one more question? Which of the settings just have to match the ESP for uploading and which things load a setting that the chip will use in its firmware? IOW, what do all the settings do In the "picture is worth a thousand words" department, here is the settings that worked. I notice you use the 1024+1024 file and I used the 512+512. How do I know what files will work and what won't? I looked everywhere for the specs of this board and the ESP8266EX and can't find how much memory it has or what settings match it. One big mistake I made in the beginning was not checking the default speed in mHz. Note file files, that it is the 2.2 SDK version, and the settings in the firmware uploader. Also there is an init 05 file and an init 05. Not sure if it made a difference since I was trying different files, but I chose the 08 this time.
Hi,
I am stuck too with this same issue, Can you please give me step by step process how to do it, I am fairly new to this
Thanks to Juraj and fdecker for the help, only difference I did was I used esptool.exe, if you dont want to install python then esptool.exe is a good utility.
I added the port and baudrate to the juraj command after copying the firmware file to esptool.exe folder along, the files to be copied are
blank.bin
boot_v1.7.bin
esp_init_data_default_v08.bin
and at folder
all this from NonOS firmware folder
run CMD in administrator privileges to access port
Just a note PIN 5,6,7 on rest off. I pressed RESET and MODE, while MODE pressed i released RESET and kept MODE pressed. after I pressed enter in CMD window to execute above command I released MODE button
I used RealTerm Serial Capture Program to check AT command are working.
Thanks a lot for Arduino forum, now on to next step