Arduino Forum

Using Arduino => Networking, Protocols, and Devices => Topic started by: milanbx on Apr 24, 2018, 11:57 pm

Title: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 24, 2018, 11:57 pm
Hi, I am new to Arduino and started to play with OSOYOO robotic car kit. It comes with an Arduino clone and an ESP 13 wifi shield with DOIT firmware in it. I am pretty sure, its the DOIT one, as it is written on the shield and I get a response on 192.168.4.1 providing the config page.
The shield is placed on Arduino as expected. USB cable connected to Arduino. No extra power, just the
USB.
And come the issues:

1) If I plug the USB cable to my PC, only the red LED on the shield lights up.
I have to push the "RST" button on the shield to get the blue LED light up too.

2) I use the guide at https://fineshang.gitbooks.io/esp8266-based-serial-wifi-shield-for-arduino-user/content/chapter4.html, or the OSOYOO guide at http://osoyoo.com/2016/09/18/esp8266-uart-wifi-shield-use-guide/, which are almost the same. Even if the blue LED lights up, I connect to the "DoitWiFi_Config" wifi network and click submit. Exactly as described in steps 1 to 3. However, I do not get any further, as the blue LED doesn light up any more and the wifi with SSID "DoitWiFi_Config" cannot be found any more.

3) Moreover, if I change anything on the config page, say the SSID to "MyShield" instead of "DoitWiFi_Config", this does't get saved!!

Well, my question to you, if I may dare to ask, would be:
a) Does any of you similar experience and any solution for this? Or am I doing anything wrong?
b) Is there a way to flash the firmware in the ESP8266 to the AT one, that would work with this shield?
I have looked through many post in several forums, but did not find anything, that would work.

Thanks for help.
Milan
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 25, 2018, 12:03 am
a) Does any of you similar experience and any solution for this? Or am I doing anything wrong?
It sounds like maybe the ESP8266 is not being supplied with enough current. During network communication it requires a lot of current and if it doesn't get it then it might result in strange symptoms like you are seeing. On the other hand, I don't trust that DOIT firmware so it is worth trying the AT firmware, which I think you'll end up preferring in the end anyway.

b) Is there a way to flash the firmware in the ESP8266 to the AT one, that would work with this shield?
I have looked through many post in several forums, but did not find anything, that would work.
I wrote detailed instructions specifically for flashing AT firmware to the DOIT shield:
https://forum.arduino.cc/index.php?topic=466167.msg3208886#msg3208886 (https://forum.arduino.cc/index.php?topic=466167.msg3208886#msg3208886)
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 25, 2018, 12:08 am
Hi, thanks for such a quick response. I will try to use external power source (2 Lion batteries) first.
However, as I agree with you regarding the firmware, I will try to get thru your firmware update instructions and hopefully I will succeed. I will get back here as son as I am finished with it, or if I get in trouble.
Thanks again.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 25, 2018, 12:14 am
I should mention those instructions were written some time ago. The specific download links are now to outdated versions (though I also provided general links at the introduction of the instructions). You should use the latest version (currently 2.2.0) of the NONOS SDK from here:
https://www.espressif.com/en/support/download/sdks-demos (https://www.espressif.com/en/support/download/sdks-demos)

And the latest version (currently 3.6.4) of the Flash Download Tool from here:
https://www.espressif.com/en/support/download/other-tools (https://www.espressif.com/en/support/download/other-tools)

The rest of the instructions should still be applicable to the new versions.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 25, 2018, 12:16 am
OK, I will, thnx. Btw, the extra power source did not change anything :-)
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 25, 2018, 12:23 am
Hmm, your procedure says: "In the Download Path Config section:..." The new flash tool doesn't have this and provides tabs. A "SPIDownload" tab could be the right one, OK?

Moreover, the new NONOS SDK has 2 versions of "esp_init_data_default.bin": v05 and v08. Which one to use?

And what about boud? 115200? And should I set the same speed in Windows Device Manager for this port (COM12 in my case)?

And the Flash Size - 4MBit?
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 25, 2018, 12:45 am
"In the Download Path Config section:..." The new flash tool doesn't have this
Ah, I see they've made some changes to the tool. That's this section:
(http://forum.arduino.cc/index.php?action=dlattach;topic=543577.0;attach=254821)

A "SPIDownload" tab could be the right one, OK?
Yes, I believe so.

Moreover, the new NONOS SDK has 2 versions of "esp_init_data_default.bin": v05 and v08. Which one to use?
In the reply following those instructions I whined about a similar thing. Espressif makes some effort but in the end their documentation is still lacking some important details (such as no mention of what the various tabs on the Flash Download Tool are for). I haven't looked into this specific ambiguity but my instinct is that you should just use the newest version, so esp_init_data_default_v08.bin.

And what about boud? 115200?
It doesn't matter. Higher baudrate will make the flashing process faster but at the extremes might fail. It really doesn't take very long anyway. That would be more important to someone who was flashing a lot of chips.

And should I set the same speed in Windows Device Manager for this port (COM12 in my case)?
No. Don't mess with that.

And the Flash Size - 4MBit?
That will be set automatically because you checked the SpiAutoSet box. You don't need to worry about anything in the SpiFlashConfig section of the tool other than checking SpiAutoSet.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 25, 2018, 12:49 am
 :( Something went wrong, same as denisio's reponse #31 in topic https://forum.arduino.cc/index.php?topic=466167.31 (https://forum.arduino.cc/index.php?topic=466167.31).
Please, see attached screenshots.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 25, 2018, 01:49 am
Sorry to hear. I'll try to dig out my DOIT shield and try it out with the new AT firmware and Flash tool later on to see what my results are. In the meantime maybe someone else here can give some advice.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 25, 2018, 02:14 am
Pretty sure that the flash size on the ESP-13 is not 4Mbit. You need to change that in the Flash Downloader tool.

Even the lowly ESP-01 is 8Mbit.

Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 25, 2018, 07:16 am
I dug out my DOIT shield to use as a reference for your photo and I spotted the problem. Counterintuitively, when you're using an Arduino board as a USB-TTL serial adapter the correct connections to make are:
Arduino  Shield
TX (pin 1)TX0
RX (pin 0)RX0

Now you're probably thinking "that can't be right, we always connect RX-TX, TX-RX". You need to remember that the markings on the silkscreen on your Arduino board are referring to the pins on the primary microcontroller (ATmega328P on your board). When using the board as a USB-TTL serial adapter you're not communicating between the ATmega328P and the ESP8266. You're communicating between the USB-TTL serial adapter chip (ATmega16U2 on your board) and the ESP8266. Since the USB-TTL serial adapter chip is connected to the ATmega328P chip RX-TX, TX-RX, the pin 1 marked as "TX" on the silkscreen is actually the RX pin of the USB-TTL serial adapter and vice versa with pin 0.

The other thing you should do before attempting the AT firmware flashing process again is to disconnect the ESP8266 from your Arduino board and then upload the File > New sketch to the board to make sure there is no code running on the ATmega328P that will cause it to attempt serial communication and thus interfere with communication between the USB-TTL serial adapter chip and the ESP8266.

I followed the instructions I wrote with the latest AT firmware and Flash Download Tools and it worked fine for me on the first try.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 25, 2018, 07:43 am
Pretty sure that the flash size on the ESP-13 is not 4Mbit. You need to change that in the Flash Downloader tool.
When you check the "SpiAutoSet" checkbox in the Flash Download Tool it will automatically detect all the correct settings in the "SpiFlashConfig" section of the tool and set them before starting the flashing process. The only time you would need to manually configure those settings is if your ESP8266 module uses a flash chip that is not in the tool's database. It's a really nice feature since most sellers don't provide more than the most vague details about the ESP8266 modules/boards and you can't see which flash chip is used when it's under the metal shield. They use these module identifiers but it's rare to find any specs on them and you really have no guarantee they would be accurate anyway beyond the fact there is an ESP8266 on there. I despise the use of the "M" unit when describing flash size. How freaking hard could it be to just write megabyte or megabit so there's no possibility of confusion (I don't trust an eBay seller to get Mb vs MB right and they'd probably write it as "mb" anyway)?

Even the lowly ESP-01 is 8Mbit.
Those are traditionally 4 Mbit:
https://www.esp8266.com/wiki/doku.php?id=esp8266-module-family#summary_table (https://www.esp8266.com/wiki/doku.php?id=esp8266-module-family#summary_table)
I have heard that some ESP-01 have 8 Mbit flash. I seem to remember the blue boards are 4 Mbit and the black boards are 8 Mbit. Even though the ESP-01 has the flash chip exposed it seems hard to find a datasheet for those chips and really you can't count on the Chinese sellers to send you exactly what you saw in the listing photo.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 25, 2018, 09:08 am
Hi guys, thank you for all hints, I will proceed with them further later today.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 25, 2018, 10:23 pm
Hi again! Well,  I have uploaded a new (empty) sketch to Arduino and switched the RX/TX pairs (Arduino TX to shield TX0 and RX to RX0) as advised, but the result is still the same :-( I have also double-checked the wiring.
Any new ideas, what could be wrong?
Thnx
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 25, 2018, 10:47 pm
YES!!! It seams, that I have succeeded finally!! Dont ask me why, but I have done following:
After clicking  the START button on the DOWNLOAD TOOL, the console started to print "....._____....." as usually. And during this I HAVE PUSHED THE RESET BUTTON ON THE SHIELD and the flashing process began! See attached screenshot when done.
I will complete the rest of your instructions to find out, if I have really succeeded completely.
Thanks again!
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 25, 2018, 11:22 pm
Well, I am not there yet completely, I think. After removing the D0-to-GND wire and powering up again, and running Adruino IDE with serial monitor following happened:
1) The serial monitor show that the shield sends permanently some data.
2) At speed of 115200 baud, the serial monitor shows something like this:
n⸮n⸮⸮ll⸮⸮c ⸮⸮ o⸮b⸮⸮⸮b sc⸮⸮⸮b bll⸮⸮n ⸮o⸮⸮⸮nl⸮|b...
3) If I change the speed to 74880 baud, it show following, again and again:

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

load 0x40100000, len 2592, room 16
tail 0
chksum 0xf3
load 0x3ffe8000, len 764, room 8
tail 4
chksum 0x92
load 0x3ffe82fc, len 676, room 4
tail 0
chksum 0x22
csum 0x22

2nd boot version : 1.7(5d6f877)
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 4Mbit(256KB+256KB)
jump to run user1 @ 1000

rf_cal[0] !=0x05,is 0xFF

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

load 0x40100000, len 2592, room 16
...


4) If a send the AT+GMR command, nothing changes.

Can anyone please tell me, if the ESP works fine, as expected, or not?
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 25, 2018, 11:51 pm
And during this I HAVE PUSHED THE RESET BUTTON OD THE SHIELD and the flashing process began!
The reset thing is definitely a part of many ESP8266 flashing instructions. I never found it necessary, I think because I connect D0 to GND before powering the shield.

Quote
At speed of 115200 baud, the serial monitor shows something like this:
n⸮n⸮⸮ll⸮⸮c ⸮⸮ o⸮b⸮⸮⸮b sc⸮⸮⸮b bll⸮⸮n ⸮o⸮⸮⸮nl⸮|b...
Try flashing it again, but this time change the filename boot_v1.6.bin to boot_v1.7.bin.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 26, 2018, 12:19 am
Well, I did have the D0 to GND too and still need to puch the RST.
And I have also tried the boot_v1.7.bin,  but with the same result.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 26, 2018, 12:29 am
Start working back through previous AT firmware versions to see if you find one that works for you. You can find NONOS SDK 2.1.0 and 2.0.0 here:
https://github.com/espressif/ESP8266_NONOS_SDK/releases (https://github.com/espressif/ESP8266_NONOS_SDK/releases)
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 26, 2018, 08:30 am
OK, thanks, will try.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 26, 2018, 04:40 pm
I have 2.0 and 2.1 Espressif AT firmware working on ESP-01 modules.

Flashing the ESP8266 chip can be a bit tricky until you get the hang of it.

https://www.allaboutcircuits.com/projects/flashing-the-ESP-01-firmware-to-SDK-v2.0.0-is-easier-now/ (https://www.allaboutcircuits.com/projects/flashing-the-ESP-01-firmware-to-SDK-v2.0.0-is-easier-now/) instructions on how to flash the ESP-01 to give you an idea what the process is like
obviously will be slightly different for you since you have the ESP-13.
Your GPIO15 - which the ESP-01 does not expose- needs to be grounded.


http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/ (http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/) maybe helpful


.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: Juraj on Apr 26, 2018, 05:58 pm
erase the flash completely with esptool command erase_flash and then try the newest firmware again
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 12:38 am
Hi, I have tried everything you have advised me and make some progress. Non of the SDKs worked. Finally, I have used the Ai-Thinker firmware (AiThinker_1.5.4_AT_Firmware_DIO_32M_4MByte.bin). And it might work well. If I send the AT+GMR command over serial at 115200 baud, I get following:
AT+GMR
AT version:1.1.0.0(May 11 2016 18:09:56)
SDK version:1.5.4(baaeaebb)
Ai-Thinker Technology Co. Ltd.
Jun 13 2016 11:29:20
OK

Is it the right response? I would say, it is.  :)
What bothers me is the response to AT+RST:
AT+RST


OK

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

load 0x40100000, len 1856, room 16
tail 0
chksum 0x63
load 0x3ffe8000, len 776, room 8
tail 0
chksum 0x02
load 0x3ffe8310, len 552, room 8
tail 0
chksum 0x79
csum 0x79

2nd boot version : 1.5
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 4Mbit(256KB+256KB)
jump to run user1 @ 1000

⸮⸮r⸮l⸮l⸮ ⸮l`⸮⸮r⸮l⸮l⸮ l`⸮⸮r⸮l ⸮⸮⸮ l`⸮⸮r⸮l ⸮⸮
Ai-Thinker Technology Co. Ltd.

ready

1) The flash tool shows me a Flash SIze of 32Mbit. However, the ESP response says: SPI Flash Size & Map: 4Mbit(256KB+256KB). Is this OK?
2) Did I use the right *.bin?
3) What about the string of strange characters before "Ai-Thinker..." line?
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 27, 2018, 01:19 am
Where did you find that AiThinker bin file?



Also, do a screen capture of your Flash tool making sure to expand it so that the file names including path
are fully visible.


.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 10:22 am
Where did you find that AiThinker bin file?
webpage: http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/
download: http://www.electrodragon.com/w/File:At_firmware_bin1.54.zip
file: AiThinker_ESP8266_DIO_8M_8M_20160615_V1.5.4.bin

Also, do a screen capture of your Flash tool making sure to expand it so that the file names including path
are fully visible.
see the "FlashTool-AT-setup.png" attachment.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: travisperro on Apr 27, 2018, 10:33 am
I programm my Arduino Mega through ESP 07 following this https://github.com/jeelabs/esp-link could it be worth give it a try
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 11:21 am
OK, thank you, I will try it. Does it include also binaries for flashing?
Anyway, do you think my flashing with Ai-Thinker firmware was successful?
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: Juraj on Apr 27, 2018, 12:47 pm
you always set only one file for flashing? did you read the AT firmware readme file?
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 01:10 pm
No, I set one file only when AT firmware v1.54 used. This was also described in the guide, you gave provided (http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/ (http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/), Step 3).
And yes, I did read it and it describes it too (see end of "readme.txt").
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 27, 2018, 03:55 pm
I programm my Arduino Mega through ESP 07 following this https://github.com/jeelabs/esp-link could it be worth give it a try
That's not what the OP is trying to do.

Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 27, 2018, 03:57 pm
No, I set one file only when AT firmware v1.54 used. This was also described in the guide, you gave provided (http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/ (http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/), Step 3).
And yes, I did read it and it describes it too (see end of "readme.txt").
Look at the JPG/PNG in Step #5


Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 27, 2018, 04:15 pm
https://www.auselectronicsdirect.com.au/arduino-wi-fi-wireless-shield (https://www.auselectronicsdirect.com.au/arduino-wi-fi-wireless-shield)

has a ZIP with some documentation you may want to read

Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 27, 2018, 04:26 pm
also read https://community.blynk.cc/t/getting-started-with-esp-13-sheild-esp8266/6704/18 (https://community.blynk.cc/t/getting-started-with-esp-13-sheild-esp8266/6704/18)


Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 04:34 pm
OK, thanks a lot. Now, when I know, how to flash it, I will only look for the right firmware
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 27, 2018, 04:42 pm
This wifi shield is very interesting.

I have emailed CVessey the guy who posted on the Blynk forum about how he is using the shield.
I hope to learn more about it.


Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 05:15 pm
That would be great! Anyway, once I will succeed in loading the right firmware up, the whole story starts yet for me: to fund the right libraries for developing...
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 27, 2018, 06:47 pm
The biggest problem with these shields is that they often come with some proprietary firmware. Maybe it's useful to some but I prefer to use a firmware that's more commonly used by the community. This means going through the nightmare poorly documented process of flashing the Espressif AT firmware.

The other problem people run into is that the shield uses pins 0 and 1 for communication. That means on the Uno, Mega, etc. that you can't really use Serial for debug output so you're flying blind until you can start receiving debug output over WiFi. Of course it's fairly easy to connect the shield to other pins. If you use it with the Leonardo then that's not an issue since pins 0 and 1 are Serial1 on that board.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 07:06 pm
Look at the JPG/PNG in Step #5
I did look at the picture and tried to upload the firmware, that has more BIN files. However, the AT firmware was just one BIN file. SO, I used only the on. And what a surprise: it was my biggest success in this topic :-)
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: Juraj on Apr 27, 2018, 07:43 pm
if you upload only the AT firmware user.bin, you leave everything else unchanged. the boot section, the settings section, the SDK settings. The blank.bin clears some settings valid only for the SDK version used to build the user.bin (AT firmware in this case). If the user.bin uses invalid setting from not cleared section, the esp8266 behaves strange.

(https://www.espressif.com/sites/default/files/getstart/NEWESP8266/figure-4-12_.jpg)
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 10:25 pm
https://www.auselectronicsdirect.com.au/arduino-wi-fi-wireless-shield (https://www.auselectronicsdirect.com.au/arduino-wi-fi-wireless-shield)
has a ZIP with some documentation you may want to read
I have read this, try to flash the DOIT firmware, which worked fine, but the shield did not respond at the given IP address. Then I have tried the AT firmware, which did not worked either.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 10:45 pm
The ZIP file from auselectronicsdirect.com contained a "ESP8266_Doit_ser2net(v2.4.1).bin". I could upload it to the shield. And as I wrote, however, it did not respond at the 192.168.4.1 address, as declared in the docs. As juraj have written, that only one BIN file uploaded at 0x00000 causes the ESP to behave strange, to what addresses should I upload the other BIN file (like blank.bin etc.) then?
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: agrp87132 on Apr 27, 2018, 10:56 pm
I have no experience with ESP-13, etc.

But it seemed you were making progress with the AT firmware.

I have no idea what you mean by "it did not respond at the 192.168.4.1 address, as declared in the docs."

what????

Try AT commands, like AT+CWMODE?

http://room-15.github.io/blog/2015/03/26/esp8266-at-command-reference/ (http://room-15.github.io/blog/2015/03/26/esp8266-at-command-reference/)
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 27, 2018, 11:00 pm
agrp87132 is right

The Espressif AT firmware does not anything like 192.168.4.1 page that was possible with the DoIt firmware.

The Espressif AT only responds to AT commands.
After you flash the ESP-13 with Espressif AT firmware, you will configure the ESP-13 using AT commands.



At this point you might as well just flash the ESP-13 with Espressif AT firmware.
Try step #7 of http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/ (http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/)
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 11:03 pm
No, no, no, I was referring to what the shield should do, when loaded with the DOIT firmware -  see https://www.auselectronicsdirect.com.au/assets/files/TA0142%20WIFI%20Shield%20Library%20File.zip, "Wifi Shield User Manual .pdf" file.
I fully understand that the AT firmware doesn't provide anything like this.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 27, 2018, 11:05 pm
Because of everything you have done, we don't really know for sure what you ESP-13 shield will do.

Decide DoIt firmware or Espressif firmware.

Don't mix and match.

Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 11:08 pm
Sorry, for that. I just wanted to try all given advises. But the goal is to have it AT firmware of course.

At this point you might as well just flash the ESP-13 with Espressif AT firmware.
Try step #7 of http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/ (http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/)
I have done all of the steps described in this article and succeeded only with Step 3 approach. But not completely - the response to AT commands was not good - see my post #22
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: agrp87132 on Apr 27, 2018, 11:11 pm
Way, way back in post 15 you seemed on the right track.

Edit: I am sorry post 22

those appear to be what you would expect from AT+GMR and AT+RST
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 11:14 pm
Not really, because the shield rebooted again and again. The best attempt was described in post #22.

those appear to be what you would expect from AT+GMR and AT+RST
Not quit, because the response contained strings of some strange chars.
And the ESP did not respond to much AT commands.

At this point you might as well just flash the ESP-13 with Espressif AT firmware.
Try step #7 of http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/ (http://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/)
Just have tried. This leads to the same result as in post #15 :-(
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 27, 2018, 11:23 pm
Show us a screen capture of your Flash Download tool.
I want to see it!

Otherwise, we are going in circles.

.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 11:26 pm
Here it is attached. Shows how I am just flashing the AT firmware v 1.54, results as in post #22.
The other snapshot are AT responses from Arduino IDE serial monitor.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: agrp87132 on Apr 27, 2018, 11:31 pm
If I send the AT+GMR command over serial at 115200 baud, I get following:
AT+GMR
AT version:1.1.0.0(May 11 2016 18:09:56)
SDK version:1.5.4(baaeaebb)
Ai-Thinker Technology Co. Ltd.
Jun 13 2016 11:29:20
OK


What do you mean
Not quit, because the response contained strings of some strange chars.
And the ESP did not respond to much AT commands.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 11:31 pm
Well, see the AT+RST response in the other attachment.
And I have also tried some other AT commands form the instruction set guide of NONOS SDK v2.2.0 and majority leads to ERROR.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 27, 2018, 11:44 pm
Well, see the AT+RST response in the other attachment.
That Serial Monitor screen capture says you are all set.

You need to follow the steps https://community.blynk.cc/t/getting-started-with-esp-13-sheild-esp8266/6704/18 (https://community.blynk.cc/t/getting-started-with-esp-13-sheild-esp8266/6704/18)

If you want to connect to a webserver, then you should follow those steps that cvessey wrote. It will set up the ESP-13 as a client.

Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 11:46 pm
OK, I will. Thanks.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: agrp87132 on Apr 27, 2018, 11:50 pm
Yes, it's not perfect, but things in the world of DIY seldom are, at least I thought I saw some progress, no?

My advice, get your esp back to the state in post #22,

and issue more AT commands

do you have a home network
issue AT+CWMODE=1 then
issue AT+CWJAP="SSID","password"
then
AT+CIFSR to get ip address
then ping that IP
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 27, 2018, 11:55 pm
I think that the DoIt config at 192.168.4.1 seems to set up some of the things for people that I had to do with AT commands with my ESP8266-01.

The AT command AT+CWSAP? will give us more information.

Anyway, after that you will need to read https://alselectro.wordpress.com/2015/05/05/wifi-module-esp8266-1-getting-started-with-at-commands/ (https://alselectro.wordpress.com/2015/05/05/wifi-module-esp8266-1-getting-started-with-at-commands/) which explains how to do what you want with AT commands.



AT commands are rather cumbersome as you will see.


You may want to see where you can download ESP8266 Arduino Core firmware into the ESP-13 shield and forget about using the Arduino Uno completely.


.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 27, 2018, 11:56 pm
That Serial Monitor screen capture says you are all set.

You need to follow the steps https://community.blynk.cc/t/getting-started-with-esp-13-sheild-esp8266/6704/18 (https://community.blynk.cc/t/getting-started-with-esp-13-sheild-esp8266/6704/18)

If you want to connect to a webserver, then you should follow those steps that cvessey wrote. It will set up the ESP-13 as a client.

The procedure that cvessey wrote doesn't work at all. I do not even get a ping response from IP: 192.168.4.1 :-(
The same result as with DOIT firmware.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 28, 2018, 12:00 am
Have you tried with a smartphone?

I get the impression that the DoIt firmware starts up the ESP-13 as a server.

Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 28, 2018, 12:01 am
The AT command AT+CWSAP? will give us more information.
forget about using the Arduino Uno completely.
AT+CWSAP?

+CWSAP:"AI-THINKER_211907","",1,0,4,0

OK

I can even see the "AI-THINKER_211907" wifi network and can connect to it. But that's all. No ping response, no browser response. The same result with mobile phone.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 28, 2018, 12:07 am
Anyway, after that you will need to read https://alselectro.wordpress.com/2015/05/05/wifi-module-esp8266-1-getting-started-with-at-commands/ (https://alselectro.wordpress.com/2015/05/05/wifi-module-esp8266-1-getting-started-with-at-commands/) which explains how to do what you want with AT commands.
Here an example of errors in AT responses:
AT+CIOBAUD?


ERROR
AT+CWLAP


ERROR

Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 28, 2018, 12:25 am
One tricky thing you'll encounter is that the AT commands have changed over time so you will need to adjust some commands you find in tutorials to your firmware version. I haven't found official documentation for the aithinker version of the AT firmware but even Espressif doesn't seem to provide their documentation for old versions of the AT firmware so you need to dig it up from somewhere else on the Internet if you are using an old version of their AT firmware for some reason.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: agrp87132 on Apr 28, 2018, 12:27 am
AT+CWMODE?

I think only 1 & 3 does AT+CWLAP work

EDIT: If AT+CWMODE? returns a 2
then AT+CWMODE=3

And AT+CIOBAUD? doesn't work for me either
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 28, 2018, 12:34 am
I have to thank all of you for help!! Thanks very much! I have just tried to connect to our home wifi, and the result seems to me OK:
AT+CWJAP?
+CWJAP:"madrid","74:ea:3a:a5:be:be",4,-51
OK

Last question:
If I am not mistaken, in this hw config, UNO is used only as USB-to-TTL. Which means, I will not develop sketches for UNO, but fur ESP8266 instead. Am I right?
And if I want to use UNO, do I need some wifi-to-UART library and sketch to upload to ESP first?
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: agrp87132 on Apr 28, 2018, 12:45 am
now that is where you need to read

https://tttapa.github.io/ESP8266/Chap01%20-%20ESP8266.html (https://tttapa.github.io/ESP8266/Chap01%20-%20ESP8266.html)

or
http://www.martyncurrey.com/esp8266-and-the-arduino-ide/ (http://www.martyncurrey.com/esp8266-and-the-arduino-ide/)


there are some uses of esp as a dumb serial to wifi bridge for the Uno and the like, but limited

esp as microcontroller you can use more libraries

Edit: to use as a dumb serial to wifi bridge you are good to go!
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 28, 2018, 01:02 am
There are multiple ways to use an ESP8266:

WiFi adapter module - In this usage you install a firmware on the ESP8266 such as the AT firmware and then control the ESP8266 from a separate Arduino board such as an Uno, Mega, Leonardo, etc. When using the ESP8266 in this way with the AT firmware I recommend the WiFiEsp library: https://github.com/bportaluri/WiFiEsp (https://github.com/bportaluri/WiFiEsp). This library provides an interface that is similar to the Arduino Ethernet and WiFi libraries so you can easily use code written for those libraries with minimal modifications.

Directly programming - In this usage you install an ESP8266 hardware package (https://github.com/esp8266/Arduino/) to the Arduino IDE that adds ESP8266 boards to the Arduino IDE. Then you can write sketches and upload them directly to your ESP8266. That sketch is the firmware on your ESP8266 so you won't be using the AT firmware, DOIT firmware, etc. The benefit of this is that the ESP8266 is actually a much more advanced microcontroller than the more outdated microcontroller on your Uno. The downside is that the support for the ESP8266 is not quite so good as the standard Arduino boards that have been around for years and have so many users. You will find that some libraries and sketches don't work on your ESP8266 and you have less pins to work with. The ESP8266 also runs at 3.3 V, which makes it a bit more difficult to interface with some standard Arduino accessories. Supposedly it is tolerant to 5 V logic input. The shield form factor is kind of clunky for this usage, unless you specifically want to interface with a standard Arduino board. Otherwise I would recommend buying a standalone ESP8266 board like the WeMos D1 Mini for this usage.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 28, 2018, 01:11 am
OK, great, thanks. I will start with using ESP thru serial from Arduino. This would be with WiFiEsp library, right?
I have also found another one: https://github.com/ekstrand/ESP8266wifi
Do I understand right, that these libraries "transform" high-level routines to AT commands and send them over serial to ESP?
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 28, 2018, 01:20 am
This would be with WiFiEsp library, right?
That is the library I prefer. There is a problem with that library when you use it with the ESP8266 connected a board that has Serial on pins 0 and 1. The problem is that the WiFiEsp library by default outputs debug information on Serial and expects you to have the ESP8266 connected via Software serial to other pins. The debug output conflict with the AT commands being sent on the same serial port. So you need to edit the library to turn off the debug output, as shown here:
https://github.com/bportaluri/WiFiEsp/pull/46/files (https://github.com/bportaluri/WiFiEsp/pull/46/files)
You should also note that the examples that come with WiFiEsp are written for the ESP8266 connected via the SoftwareSerial library but it only needs some very minor changes to make them work with Serial.

You also have the option of connecting the ESP8266 to other pins on your Arduino board and using the SoftwareSerial library to create a serial port on those pins.

Either way, if you want help let me know.

I have also found another one: https://github.com/ekstrand/ESP8266wifi
That is somewhat similar to WiFiEsp except that it does not provide a compatible interface so you can't reuse code that was written for the Ethernet or WiFi libraries and you can't use it with other libraries that are compatible with those libraries.

Do I understand right, that these libraries "transform" high-level routines to AT commands and send them over serial to ESP?
That's correct. They hide all the AT commands inside a library and provide you with a much more user friendly API that wraps them.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: ieee488 on Apr 28, 2018, 01:23 am
Does that library keep pace with Espressif's AT command firmware releases?


Also, instead of disabling debug, can we have the debug go out a different set of pins?


.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: agrp87132 on Apr 28, 2018, 01:31 am
Oh yeah, I almost forgot, WiFiESP library uses softwareserial.h which is error prone at 115200 baud rate,
you need to reset it to 9600

Edit: so I guess you're not good to go!
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: pert on Apr 28, 2018, 06:15 am
Does that library keep pace with Espressif's AT command firmware releases?
The readme says:
Quote
Supports ESP SDK version 1.1.1 and above (AT version 0.25 and above).
Also, instead of disabling debug, can we have the debug go out a different set of pins?
Yes, you just need to edit this file as necessary:
https://github.com/bportaluri/WiFiEsp/blob/master/src/utility/debug.h (https://github.com/bportaluri/WiFiEsp/blob/master/src/utility/debug.h)
Oh yeah, I almost forgot, WiFiESP library uses softwareserial.h which is error prone at 115200 baud rate,
you need to reset it to 9600
Other than the debug output, the WiFiEsp library doesn't use anything specific. You pass it the Stream object it should use for communication with the ESP8266 via WiFi.init(). The example sketches are written to use SoftwareSerial if a second hardware serial port isn't available but there's nothing in the library that requires that and it's easy enough to change the examples.

I was waiting to see whether milanbx would decide they wanted to use software serial before bringing the issue of the baud rate up to avoid further confusing matters. If they stick with hardware serial, as the shield is wired, then there's no need to change baud rate. If they want to use software serial then likely they will need instructions for modifying the shield connections anyway.
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: Juraj on Apr 28, 2018, 06:57 am
just a clarification: AT firmware doesn't configure AP. you had AP at 192.168.4.1 with AT firmware because the DoIt firmware configured it and the AT firmware started it because the configuration was remembered because you didn't erase the flash or write the blank.ino to clear the settings.

the esp8266 SDK is a part of every program (firmware or sketch) that should run on the esp8266. and the SDK reads the settings on flash and starts the STA or AP (unless it has remembered in the settings to not to do it).
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 28, 2018, 11:27 am
To react on all the given advices and options, which I really appreciate, just let me remind my primarily concern: It is a wifi shield and I want to use it with Arduino! The issue was, that the original DOIT firmware was not saving setup entered on the config page (192.168.4.1). AT firmware was just a workaround. If I would be successful in uploading functional DOIT firmware, this all would be solved!
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 28, 2018, 09:48 pm
Juraj, could you advise me, if there is only one BIN file with the DOIT firmware (https://www.auselectronicsdirect.com.au/assets/files/TA0142%20WIFI%20Shield%20Library%20File.zip (https://www.auselectronicsdirect.com.au/assets/files/TA0142%20WIFI%20Shield%20Library%20File.zip)), can I use the other BINs (like blank.bin) to uplode the firmware properly, so that nothing bad remains in the flash?
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: Juraj on Apr 29, 2018, 06:58 am
I would use settings from the AT firmware readme replacing the 'user' file. this are general settings for the esp8266 programs build with the SDK. ESP8266_AT_Bin_V1.6.1/bin/at/README.md

I do not know the flash size of the esp on the shield, but for example a section from the readme file:

Code: [Select]
### Flash size 8Mbit: 512KB+512KB
    boot_v1.2+.bin              0x00000
    user1.1024.new.2.bin        0x01000
    esp_init_data_default.bin   0xfc000 (optional)
    blank.bin                   0x7e000 & 0xfe000


boot_v1.2+.bin  - 2+ means some version greater then 2

note that blank.bin goes to 2 addresses, so it should be twice in fields of the tool

the Flash Download Tool changes a copy of esp_init_data_default.bin with detected settings and flashes the copy to esp8266

btw: arduino builder for esp8266 creates one bin, which is a concatenation of boot.bin, user.bin (sketch) and esp_init_data_default.bin, with zeros (blank.bin) in-between
Title: Re: ESP 13 wifi shield with DOIT firmware issue
Post by: milanbx on Apr 29, 2018, 10:06 am
OK, I understand. In the meantime, I have succeeded in uploading the original DOIT firmware a finally setting up the AP/STA+client/server parameters. Everything works fine. Even having the shield on top of UNO. That was my goal, thus: SOLVED :-)

The most important topic to read were these:
1) advices and instructions to flash in pert's topic (https://forum.arduino.cc/index.php?topic=466167.msg3208886#msg3208886), mailny for the flash tool, WiFiESP and more other very good explanations - thanks pert
2) DOIT firmware BIN (https://www.auselectronicsdirect.com.au/arduino-wi-fi-wireless-shield) for the DOIT firmware option - thanks ieee488
3) how to flash AT firmware (https://www.instructables.com/id/ESP-12F-Flashing-AT-Firmware/) for the AT firmware option - thanks ieee488
4) very good A Beginner's Guide to the ESP8266 (https://tttapa.github.io/ESP8266/Chap01%20-%20ESP8266.html) - thanks agrp87132
5) and very good explanations of what's behind the scenes - thanks juraj!
And, of course, finding out, when is the right time to pres RST buttung during upload :-)
Thank you all again!