ESP8266 help ?

558 views
Skip to first unread message

Jon Russell

unread,
Jan 1, 2017, 1:45:06 PM1/1/17
to London Hackspace
Hi,

So, I thought I'd spend the day playing with an ESP8266 module. I don't seem to be getting very far.

I've had the module for a couple of year, and originally I got it working, but I cant remember what I did.

I current get (at 115200 baud) :

r’`ˆì$€ÛÄFŽûnÄ’Üpp’Ü<„ߌl$b›l#`ÀˆŽ
ÀÄ xÜÇnÀä6bb’ÜŒàŽ;b‚ß;ˆl’ß;ßbÀľ~òn
îÄðž?ÄÄ’ß<ÄÛrßßÃl``r Ü#‚nÀ$ŽŒl`j¤üä
ÿrŽ
i-Thinker Technology Co. Ltd.
ready

I've tried every baud rate to try and decode the first bit, but nothing seems to work.

I cuurently have :
>AT+GMR
AT version:0.21.0.0
SDK version:0.9.5

I have Reset & CH_PD tied high, and I'm using a 3.3v FTDI cable, with an external PSU.

Can anyone point me to some kind of official guide of how to flash the firmware to the latest version using windows tools ?

So far, the best guide I found is a guy, downloading a flashing tools from a random Google drive, and then running it, and pressing buttons on it in Chinese that he doesn't know what they say ?!

Even other blogs refer to the same Chinese flasher ?


I'm not sure I want to do that ? :-)

The ESP8266 community site (http://www.esp8266.com/wiki/doku.php?id=loading_firmware) points to the Espressif BBS, but I cant find firmware files there.

I don't really want to run Node, or Python. Ideally I want a windows GUI exe to flash the firmware and then use the Arduino IDE to write programs for it.

Do I have to install a special firmware to run the Arduino extension ? Isn't the default firmware LUA based ?

I got the ESP8266 Aurduino extension installed in the IDE, but it wont upload the ESP8266 blink program.


Is there an official Espressif flashing tool ? and an official firmware somewhere ?

Can anyone point me at a tutorial they have used that works ?

My Google Fu must be weak...

Thanks !!

Jon.

Jon Russell

unread,
Jan 1, 2017, 1:48:05 PM1/1/17
to London Hackspace
When I try and compile / upload an the ESP8266 blink program I get :

Sketch uses 222,201 bytes (51%) of program storage space. Maximum is 434,160 bytes.
Global variables use 31,576 bytes (38%) of dynamic memory, leaving 50,344 bytes for local variables. Maximum is 81,920 bytes.
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_send_command: wrong direction/command: 0x00 0x08, expected 0x01 0x08
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed

Henry Best

unread,
Jan 1, 2017, 2:09:40 PM1/1/17
to London Hackspace
Have you tried changing the 0x00 to 0x01 as the IDE expects?

Jon Russell

unread,
Jan 1, 2017, 2:11:11 PM1/1/17
to London Hackspace
How do I do that ?

Henry Best

unread,
Jan 1, 2017, 2:20:37 PM1/1/17
to London Hackspace
Edit the blink program in the Arduino IDE.

Michele Panegrossi

unread,
Jan 1, 2017, 2:28:24 PM1/1/17
to london-h...@googlegroups.com
If espcomm_send_command  is not declared in the Arduino sketch, you would have to look at the code of the ESP8266 library where that function is implemented. Change the hex value, save and upload. 
Is it possible that there has been a hardware version change since when you purchased that module?

M


On 1 Jan 2017 8:11 pm, "Jon Russell" <goo...@red-herring.co.uk> wrote:
How do I do that ?

--
You received this message because you are subscribed to the Google Groups "London Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to london-hack-space+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michele Panegrossi

unread,
Jan 1, 2017, 2:29:28 PM1/1/17
to london-h...@googlegroups.com
Look at what .h files are included in the sketch.

JJ

unread,
Jan 1, 2017, 2:39:38 PM1/1/17
to London Hackspace
Surely that's nothing to do with the sketch itself but coming from the ESP uploader?  Though as Michele says it could be down to firmware version, and you don't mention which ESP module you've got but I'm guessing an early bare type rather than ESP-MOD/NodeMCU/WittyCloud.  Try different baud rates and double check the connections and whether you have to ground any pins to put it into flash mode.  (I have nasty recollections of getting the early ESP-01 and -07 to program.)

And if that fails sling it in the bin and splash £2.25 on a NodeMCU from AliExpress which comes with serial, power regulation and lots of pins, though it'll take about three weeks to arrive but you can get them quicker in the UK if you don't mind paying more.  If by any chance you're in the vicinity of Ealing pm me as I have a couple on me right now.

Jon Russell

unread,
Jan 1, 2017, 3:07:26 PM1/1/17
to London Hackspace
Yes. It's not the code. It compiles successfully. It's the upload that's failing. That's why I think it's the firmware. During the upload the tx/rx LEDs flash and the ESP blue LED flashes but I get the error messages above.

It's an ESP-02 module. 8 pin.

Has anyone used the arduino IDE to upload code ? Does it need a different firmware ?

Anyone updated the firmware before ?

Thanks.

Jon.

Nick Reynolds

unread,
Jan 1, 2017, 3:25:36 PM1/1/17
to london-h...@googlegroups.com
From looking at my notes you have to hold GPIO0 low to flash some of these older more basic modules. Certainly do on the ESP01s I have and I built a little programmer board with a switch to make this easy.

--
You received this message because you are subscribed to the Google Groups "London Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to london-hack-space+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Nick Reynolds - 950SM|620SC
In the land beyond cleaning where the Dust Donkeys dwell

Mentar .

unread,
Jan 1, 2017, 3:51:25 PM1/1/17
to london-hack-space
The arduino IDE from 1.6.5+ handles everything for you through the board manager, you just have to make sure to pull down GPIO0 as Nick mentioned to tell the bootloader to expect the incoming data for programming.
Have you tried different module, there is a chance that it's fried though I've actually not managed to fry a single ESP8266 module so I think they are pretty resilient.

Michele Panegrossi

unread,
Jan 1, 2017, 3:54:57 PM1/1/17
to london-h...@googlegroups.com
That's true. I use the adafruit version of the ESP8266 called huzzah and their breakout has two onboard buttons. One to pull GPIO0 to ground and one for the reset of the board. To activate the boot loader you need to reset the board WHILE holding GPIO0 low. It should reset in boot loader mode for you to upload the firmware. 

M

Jon Russell

unread,
Jan 1, 2017, 5:16:43 PM1/1/17
to London Hackspace
Bingo !
Thanks Nick / Mentar.

Sketch uses 222,201 bytes (51%) of program storage space. Maximum is 434,160 bytes.
Global variables use 31,576 bytes (38%) of dynamic memory, leaving 50,344 bytes for local variables. Maximum is 81,920 bytes.
Uploading 226352 bytes from C:\Users\jon\AppData\Local\Temp\build3049509556606977130.tmp/Blink.cpp.bin to flash at 0x00000000
................................................................................ [ 36% ]
................................................................................ [ 72% ]
..............................................................                   [ 100% ]

I have a flashing LED !

I knew the hackspace hive mind would know !
:-)

Regards,

Jon



On Sunday, January 1, 2017 at 8:51:25 PM UTC, mentar wrote:
The arduino IDE from 1.6.5+ handles everything for you through the board manager, you just have to make sure to pull down GPIO0 as Nick mentioned to tell the bootloader to expect the incoming data for programming.
Have you tried different module, there is a chance that it's fried though I've actually not managed to fry a single ESP8266 module so I think they are pretty resilient.

On 1 January 2017 at 20:25, 'Nick Reynolds' via London Hackspace <london-h...@googlegroups.com> wrote:
From looking at my notes you have to hold GPIO0 low to flash some of these older more basic modules. Certainly do on the ESP01s I have and I built a little programmer board with a switch to make this easy.
On 1 January 2017 at 20:07, Jon Russell <goo...@red-herring.co.uk> wrote:
Yes. It's not the code. It compiles successfully. It's the upload that's failing. That's why I think it's the firmware. During the upload the tx/rx LEDs flash and the ESP blue LED flashes but I get the error messages above.

It's an ESP-02 module. 8 pin.

Has anyone used the arduino IDE to upload code ? Does it need a different firmware ?

Anyone updated the firmware before ?

Thanks.

Jon.

--
You received this message because you are subscribed to the Google Groups "London Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to london-hack-sp...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Nick Reynolds - 950SM|620SC
In the land beyond cleaning where the Dust Donkeys dwell

--
You received this message because you are subscribed to the Google Groups "London Hackspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to london-hack-sp...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages