Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ESP8266EX based wifi module does not respond on any AT commands ( E103-W01-IPX)

Status
Not open for further replies.

zainka

Full Member level 2
Joined
Nov 18, 2004
Messages
135
Helped
5
Reputation
10
Reaction score
3
Trophy points
1,298
Location
No(r)way
Activity points
1,648
Hello

I have a few wifi modules from eByte type E103-W01-IPX
These run on chip ESP8266EX. I know they are programmable devices but as I understand the product description at ebay they are already uploaded with working FW as they are said to be AT ready. However, I am not able to get any responce from the device and www.ebyte.com seems to be down.

Anyone know where to find complete datasheet for this ebyte modules or have any experience with them?

Here is the exact module I have.:
**broken link removed**
When I am enabling the module I get a short flash in the red LED.


Alternatively I could upload new FW if needed using the guides given by Espressif. But, the module is already soldered to a board and the FW upload tutorials seems to relay on some SPI based flashing tool, and several files are to be uploaded at different address offsets. I have not found any document describing how to flash via UART. I have GPIO0 connected and I know the device will enter FW upload mode if this pin is set High whilest enabling the module, and GPIO15 is pulled low. Question is what is the protocol for uploading a binary to correct address in the chip via uart only and not by using a flashing tool? The module is connected to an STM32H743VIT and I have a microSD where I may store the binaries for upload.
 

The short flash indicates it is initializing properly. Visually, it looks like the many other ESP8266 16-pin modules and I would be very surprised if it didn't have the same connections.

They are usually programmed using the serial UART pins, not SPI. Make sure you are using no more then 3.3V data levels because they are not 5V tolerant and try different Baud rates. It is common for these to be supplied with either 9600 or 115200 bauds as default and their native (un-programmed) speed is a strange one which I can't remember but is something like 74200 Bauds. Most modules like that will report the firmware level and some internal memory addresses as they boot up.

Brian.
 

Hi and thanks..
I was 76800baud (2 x 38400) (format 8.1.NONE) and the boot message showed that the FW is rather old

"\r\n ets Jan 8 2013,rst cause:1, boot mode:(5,7)\r\n\r\nwaiting for host\r\n", '\0' <repeats 30 times>"

It works for now, but soner or later I should upgrade and downloaded the newest FW from www.espressif.com.
Then I must create an algorithm to flash the module via uart using my STM32H743 device. For the records, the file.:
https://www.espressif.com/sites/def...cation_note_firmware_download_protocol_en.pdf
have a description for how to flash FW via MCU and is what I need to implement.
 
Last edited:
Updating Chinese ESP8266 modules is tricky. You must be very sure what you are doing. Read the literature in detail before proceeding.
 

Updating Chinese ESP8266 modules is tricky. You must be very sure what you are doing. Read the literature in detail before proceeding.

I know, therefor I asked Espressif if they have an example code with the implementation of the flashing algorithm. Haven't got any answer yet but before starting writing the algorithm myself I rather do some research for existing implementation known to work or which I may base my own work on. I have implemented several algorithms for different protocols before but here I do not have many chances before the module is bricked-

However, I noticed that the module is marked with ESP8266MOD and not ESP8266EX which is the chip mentioned in the litle documentation I have for the E103-W01-IPX module I have. I believe it is just a fancy way of saying that this is a MODule based on ESP8266ex (thus ESP8266MOD) and that it is not some clone of the real ESP8266EX. (?)

Second, it seems that there are several versions of the ESP8266EX chip with different amount of flash, something that is important to know when setting up the flash algorithm. But. The chip itself on my module is mounted inside an EMS shielding-case, soldered to the board, and thus the chip is not visible. I may desolder this shielding and read the version number directly on the chip and from this get the flash size, but before I do this, is there any AT command that will give the flash size and/or chip version in return?

This leads to the third problem. I have not been able to get any response from the device yet. The uart link seems ok, this is verified by the boot message received at startup (which does not look like the other boot messages I have seen reported for the ESP8266EX chip, but then again the module date is from 2013), and by monitoring the RX and TX pin on the module I can see that the module is receiving the command (I am transmitting "AT\r\n" and "AT+GMR\r\n") but the module does not respond with anything. Tried different methods of terminating a command with both \r\n, just \n and just \0, but I never got any response. Please verify that using \r\n is correct termination of string. ​i.e. ASCII 13 and 10

I also sent "ATE1\r\n" and then "AT\r\n" but I never get any OK in return and the module does not start echoing.
I also tried to change baudrate after boot to see if the 78600baud is just used for initial boot message but offcourse, to no help.

Thus, you might understand why I think a reflash is needed,
Any share of light will be appreciated

- - - Updated - - -

Hmm, just found the Arduino project using a similar module.
It claims that my device is in Firmware flashing mode. This is given by the boot message I receive after enabling the device.

This is a bit strange since I have not set GPIO0 to enter FW mode but I guess it is because it has never been flashed and that the module just defaults to a bootloader mode. (For the record, I have GPIO15 pulled low, GPIO2 is pulled high by internap PU, and GPIO0 is controlled by a gpio on my MCU. High for normal mode, and Low for boot mode. The module always gives the same message regardless of the GPIO0 status)

If so, I now HAVE to write the flashing algorithm..
Better sooner than never
 
Last edited:

I suggest you download Arduino IDE, even if you don't use it normally. It includes a flash utility via a serial or USB serial port and it will identify the device it sees connected. You can download the firmware and your own program with it.

It is available for Linux, Windows and I think OSX. I use the Linux version myself for ESP8266 and ESP32 devices.

Brian.
 

I suggest you download Arduino IDE, even if you don't use it normally. It includes a flash utility via a serial or USB serial port and it will identify the device it sees connected. You can download the firmware and your own program with it.

It is available for Linux, Windows and I think OSX. I use the Linux version myself for ESP8266 and ESP32 devices.

Brian.

Hmm, That wont solve the problem without some tweakings because the module is soldered to a board already and connected to a uart on the Cortex MCU used.
The Arduino IDE flash tool, I guess, requires the module to be connected to a PC serial port.

Desoldering the device is not an option, but I could perhaps disable the cortex uart and set it's gpio as input, and then solder a UartTTL to USB converter to the board...
I might try that. Should work. But is the Arduino IDE detecting ESP8266 based modules?
 

Yes, it will work with either a conventional RS232 serial port (with voltage level conversion of course) or a USB serial port, you choose which in the IDE.

Although it is called 'Arduino' IDE, it also has Espressif's C compiler built in and it allows program development for ESP8266 and ESP32 modules as well as native Arduino boards. I use it for both ESP types. The 'C' program structure is slightly different to normal in that is has a 'run once' section for initialization and a 'loop' section for the main code but other than that is very standard.

Disabling the Cortex should work, I'm not familiar with it but does holding it in reset automatically make GPIO pins inputs like on most MCUs?

Brian.
 

Dsabling the Cortex should work, I'm not familiar with it but does holding it in reset automatically make GPIO pins inputs like on most MCUs?

Brian.

Yes, but I also need to set gpio0 to correct value. But this i not a task at all. I just halth the core and set the value in the per register directly....


But...... I use STM32CubeIDE now, but it is eclipse based. Eclipse is the worst thing that ever, and I mean ever, happend to the world of coding. ;)
I noticed that ArduinoIDE promoted that it was usable for other platforms aswell. What is your overall impression of ArduinoIDE? I use linux to but my requirements is that any IDE I use is crossplatform capable, like ArduinoIDE. Good or bad?
 

Don't expect miracles from Arduino IDE and it has almost no debugging facilities but it is easy to use and yes, it is cross platform for Linux, OSX and Windows.
You can download it from : https://www.arduino.cc/en/Main/Software
or, try it on-line directly on their cloud servers. I use it with Kubuntu 19.10 very successfully, mostly for remote system monitoring via WiFi with ESP8266 and for Bluetooth applications with the ESP32.

Follow the instructions to load the ESP libraries and then if you wish, download from hundreds of user/manufacturers application libraries for individual features (WiFi, LCD, OLED, RTC etc.) or you can of course write your own.

Brian.
 

I have ArduinoIDE now but see there is quite a few library options for ESP8266 to install.
Which one are you using for flashing new FW? WebSerial?
 

I have ArduinoIDE now but see there is quite a few library options for ESP8266 to install.
Which one are you using for flashing new FW? WebSerial?

No, this library is used to make ESP8266 module connect to Wifi network from a board which has a bootloader already programmed there (Arduino, on this case). First you need to setup your Arduino IDE to be able to work with Espressif devices; there are detailed tutorials on the Web explaining the steps, such as this one (note it also depicts electrical connections):

After that, you could search any library which could restore the original firmware to set the module act as a shield based on Hayes commands, such as this one (a bit outdated):

And to be honest, these verbiage AT-based interfaces are somewhat deprecated in face to the easiness to use these modules with your own (e.g Arduino) program communicating via UART, so I would suggest you consider changing from original approach.
 

Hmm. Since the module is stuck on 76800baud i am not able to use Arduino. It simply does not have that baud as an option.
I will rather find a windows bunker and download the firmware using espressiff's own tool. Maybe later today.

Thanks so far.
 

Doesn't it use auto speed detection during programming?

Tests here show it will program at any speed I tell it but obviously with different completion times. I normally use modules with built in USB interfaces but I have some 'bare' boards with only the ESP8266 and an EEPROM on them and I program them using a simple USB UART like this one:
https://www.ebay.co.uk/itm/USB-to-E...=263899748515b935c64400094796bc1cba56e47d4550
Which is nothing more than a normal UART and a big (1000uF) capacitor across the USB plug to keep the supply stable as it programs.

Brian.
 

Hello again and thanks for all the input..

Been some time, vacation and so on, but have tried diferent solutions mentioned above but without any success so far. The module simply does not respond to anything.
The module is atleast working to some extent since I do get the boot message as mentioned earlier, so the module is not completely bricked, however I start thinking that there might be an HW issue with the receive pin of the module.

Since the board never respond to the mentioned tools, included esptool.py that I installed and which runs well on my ubuntu platform. I decided to start writing my own driver based on the mentioned application notes and the example codes as given in its appendix, and also by looking and learning more about the SLIP protocol by studying the source of esptool.

The example code in the application notes gives an example on how to setup the erase flash function. I did this and built a message that sent this to the device

This is what is sent to the device (with comment on what each data means) when trying to erase 1000 bytes from address 0 (just for the fun of it)


0xc0 SLIP_END
0x00 Header start
0x02 Command
0x10 Nr of bytes in body
0xfa 0x00 0x00 0x00 CRC (have tried to reverse order. Should be little endian though)
0x00 0x10 0x00 0x00 Erase Size
0x01 0x00 0x00 0x00 Number of blocks
0x00 0x04 0x00 0x00 Block Size
0x00 0x00 0x00 0x00 Start Address
0xc0 SLIP_END


By using two serial adapters and the receive pin on both (+ serial resistors), I monitor both directions on the module while my MCU and the module where trying to establish communication, using two terminals on my ubuntu box.Thus I am able to see the boot message transmitted from the module at poweron / reset and should thus also be able to see any responces given by the module. I could also see any data sent TO the module (i.e. the message above) on the other terminal.

Using a oscilloscope I have monitored the signal levels and quality directly on the module pins, and they looks good in both directions (as measured on the pin directly) with no overshoot or deformation.

However, Never ever am I able to get any responses from the module.

Thats why I think there might be an issue with the HW, or rather, the tracks or solderings on the module PCB. As mentioned earlier, there is an EMS shield soldered to the board so I have to desolder this if I want to check this.

However, before I do. Can you verify that the message I receive at poweron / reset really is the correct message expected to see at boot on a ESP8266EX based module? (I guess this says something about the boot ROM)


ets Jan 8 2013,rst cause:1, boot mode:(5,7)
waiting for host


And what does it mean by "Waiting for host" is it searching for some magick number? (thought that was 0xc0)
 
Last edited:

Using Cutecom in Linux, this what my modules report (at 74880 Bauds) during boot up:
[22:33:28:331] ␍␊
[22:33:28:376] ets Jan 8 2013,rst cause:2, boot mode:(3,6)␍␊
[22:33:28:376] ␍␊
[22:33:28:376] load 0x4010f000, len 1384, room 16 ␍␊
[22:33:28:376] tail 8␍␊
[22:33:28:376] chksum 0x2d␍␊
[22:33:28:376] csum 0x2d␍␊
[22:33:28:376] vbb28d4a3␍␊
[22:33:28:376] ~ld␊
So they seem to have the same date. I get this by manually resetting the ESP8266 which may account for the 'rst cause' being different. Unfortunately, I have module with a CP2102 USB interface attached and if I power cycle it I lose the USB link until after the message has been sent so I can't see if it is the same. Your 'rst cause 1:' means a normal boot, my 'rst cause:2' means it was reset using the reset pin.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top