Javascript required
Skip to content Skip to sidebar Skip to footer

Espcomm Upload Mem Failed Cant Receive Slip Payload Data

esp8266:firmware-programming

Table of Contents

Programming and Reflashing the ESP8266 ESP-01

Instructions tested on April 2017, may be outdated! - The post-obit instructions require technical skills and assume that you are using my LELESP dev board (or a similar 1)

Testing the connection

I connected the module to my PC through the FTDI cable. At this point, I wanted to start talking to the ESP. For that, a last emulator like picocom or the standard screen command will practice the job. First, your board might talk at any of several baud rates. The ones to effort first are 9600 and 115200 (it depends on the version of the firmware running onboard).

Please note that most recent ESP firmwares require Carriage-Return-and-New-Line (\n\r - ASCII 10 13) line endings. Hence, y'all need press followed by Ctrl-J to send a command. All the same, picocom tin be easily configured to transport a linefeed after each railroad vehicle return. And so you can run picocom as follows.

picocom -b 115200 /dev/ttyUSB0 --omap crcrlf

and you are fix to send your first commands!

If your serial transmission charge per unit is correct, try typing "AT": it should repeat the characters equally you lot type them and should return an "OK". And you are now ready to offset working with the ESP8266.

AT  OK  AT+GMR AT version:0.25.0.0(Jun  v 2015 xvi:27:16) SDK version:ane.1.1 Ai-Thinker Technology Co. Ltd. Jun 23 2015 23:23:50   AT+RST  OK   ets Jan  8 2013,rst cause:2, kick mode:(3,vii)  load 0x40100000, len 1396, room sixteen  tail 4 chksum 0x89 load 0x3ffe8000, len 776, room 4  tail 4 chksum 0xe8 load 0x3ffe8308, len 540, room four  tail viii chksum 0xc0 csum 0xc0  2nd kicking version : ane.4(b1)   SPI Speed      : 40MHz   SPI Mode       : QIO   SPI Flash Size & Map: 8Mbit(512KB+512KB) leap to run user1 @ 1000  ���(�SQS�(RQ�)HT�)SHHHC���r�รน� Ai-Thinker Technology Co. Ltd.  invalid   AT+CWMODE? +CWMODE:ii  OK  AT+CWMODE=one  OK  AT+CWLAP +CWLAP:(4,"FASTWEB-ane-T4oittrFQO6h",-85,"f0:84:2f:4d:62:08",half-dozen) +CWLAP:(three,"Vodafone-25253631",-89,"00:24:89:ae:1b:f2",7) +CWLAP:(0,"Vodafone-WiFi",-ninety,"00:24:89:ae:1b:f4",vii) +CWLAP:(ii,"NoFlyZone",-61,"68:72:51:02:e0:17",9) +CWLAP:(4,"WIND-WiFi-C7BE",-79,"64:a6:51:00:c7:be",11) +CWLAP:(3,"Vodafone-30083995",-80,"xc:35:6e:7b:a0:b8",12)  OK AT+CIPSTAMAC? +CIPSTAMAC:"18:fe:34:da:c4:5b"  OK

Note the noise when you reset the device: some typical bootup letters are sent at 76800, . Only in that location should be a "ready" bulletin at the selected baud charge per unit if your UART Rx is wired correctly.

And so, ESP8266 boots up into the serial modem style, and you can communicate with information technology using a set up of AT commands (historically AT commands are based on the Hayes Control Gear up). Have a await at a list of the AT Commands supported by ESP8266 for more than information on the commands shown above.

Upgrading the firmware

Esptool.py is a tool that can exist used to install/upgrade firmware onto ESP-XX modules. It is a Python-based, open source, platform contained, utility to communicate with the ROM bootloader in Espressif ESP8266 ∧ ESP32 chips that was started as an unofficial community project only now is also supported by Espressif.

The latest stable esptool.py release can exist installed from pypi via pip or pip3 with

pip install esptool

and used as follows

esptool.py -p /dev/ttyUSB0 -b 115000 write_flash 0x000000 ai-thinker-v1.1.ane.bin  esptool.py v1.3 Connecting..... Auto-detected Flash size: 8m Running Cesanta flasher stub... Flash params prepare to 0x0020 Writing 1044080 @ 0x0... 55296 (5 %) ...  Wrote 1044480 bytes at 0x0 in 90.half-dozen seconds (92.three kbit/s)... Leaving...

Manually assembling a bootable firmware image can be a bit of a pain, but the tool is useful to install official, ready-fabricated AiThinker images.

Moreover, the virtually recent version of the Espressif firmware cannot run on the ESP-01. A working version of the firmware is ai-thinker-v1.1.1 (download hither - md5sum: 26fce93d7fa31fba177da9a4ae171657)

Setup ESP within the Arduino IDE

Beginning, Arduino IDE needs to exist configured to back up the ESP module (Arduino version one.half dozen.four or college is required). To install this boosted lath, as I did for the ATtiny44, follow this step:

  • Open up the preferences of the Arduino IDE from File → Preferences

  • Select the lath from Tools → Board → Boards Manager. Scroll down (or search) and select the ESP8266 board card; finally, install "ESP8266 platform" (version 2.xxx is the latest as of may 2017)

  • From Tools → Board select "Generic ESP8266 Module"

I left untouched all the lath settings under Tools and I only checked the upload speed (115200).

ESP Hello Globe with Arduino IDE

The first program I uploaded was the classic Blink sketch available from the Arduino examples. However, I changed the LED pin from 13 to 2 from 13, since ESP8266-01 has simply two GPIO pins: GPIO0 and GPIO2.

void setup() {   // initialize digital esp8266 gpio 2 equally an output.   pinMode(ii, OUTPUT); }
// the loop function runs over and over over again forever void loop() {   digitalWrite(two, HIGH);   // plow the LED on (Loftier is the voltage level)   delay(1000);              // wait for a second   digitalWrite(2, Low);    // plow the LED off by making the voltage LOW   filibuster(chiliad);              // await for a 2nd }

I compiled the code, clicked on (and released too early) the Upload button and…

Sketch uses 222,133 bytes (51%) of programme storage infinite. Maximum is 434,160 bytes. Global variables use 31,508 bytes (38%) of dynamic memory, leaving l,412 bytes for local variables. Maximum is 81,920 bytes. fault: failed reading byte warning: espcomm_send_command: cant receive slip payload information error: failed reading byte alert: espcomm_send_command: cant receive slip payload data error: failed reading byte ... alarm: espcomm_send_command: cant receive slip payload data alert: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed error: espcomm_upload_mem failed

So I kept the Program pressed push on my board, so i pushed Reset push button and, finally, tried to upload the program again

Sketch uses 222,133 bytes (51%) of programme storage space. Maximum is 434,160 bytes. Global variables use 31,508 bytes (38%) of dynamic retentivity, leaving 50,412 bytes for local variables. Maximum is 81,920 bytes. Uploading 233280 bytes from /tmp/arduino_build_830276/WiFiTelnetToSerial.ino.bin to wink at 0x00000000 ................................................................................ [ 35% ] ................................................................................ [ lxx% ] ....................................................................             [ 100% ]

The GPIO2 pin was switching periodically from iii.3V to 0V, blinking the fastened LED on my dev lath!


WARNING You need to enable wink programming when turning on the module. Then, if you want to programme the ESP8266, follows these steps:

  • turn off the ESP;

  • bring GPIO0 to ground;

  • plow on the ESP;

  • upload the code.

If you are using my board you only accept to

  • press (and go along pressed) the programme push button;

  • push the reset button;

  • upload the code;

In both cases, you lot can release the button-button every bit shortly every bit Arduino IDE starts uploading.


esp8266/firmware-programming.txt

· Last modified: 2019/02/02 22:07 by

admin

carringtonbroated98.blogspot.com

Source: https://docs.linuxconsulting.mn.it/esp8266/firmware-programming