Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:48 03 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Flashing an ESP8266-01.

Author Message
banda
Newbie

Joined: 12/05/2014
Location: New Zealand
Posts: 35
Posted: 01:31pm 29 Nov 2015
Copy link to clipboard 
Print this post

I'm dreading this. If one's dumb electronically like me it shows.
However, be brave.

I have just had some ESP8266-01 modules delivered but (ahem) I didn't order an FTDI thingy to flash them with. Can I use my Micromite TX/RX programmer module to do the job? I want to get playing but it will be about 2 weeks to get an FTDI.

Thanks for advice.
Bary
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 01:42pm 29 Nov 2015
Copy link to clipboard 
Print this post

Hi Banda,

Could you describe what you are using as a Micromite TX/RX programmer? You might already have what is needed for your esp module.
 
banda
Newbie

Joined: 12/05/2014
Location: New Zealand
Posts: 35
Posted: 02:30pm 29 Nov 2015
Copy link to clipboard 
Print this post

It came with my first Micromite from MicroMite.org. I've looked it up at MicroMite.org and it has an FT232RL chip. It has 5 pins: 5v, 3v3, TX0, RX1, 0v.
And it's red.
Barry
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 03:01pm 29 Nov 2015
Copy link to clipboard 
Print this post

That will work perfectly. The esp unit runs at 3.3v, so does the umite, so your good to go. You may need to use an external 3.3v power supply to power the esp, though. Do the following with everything powered down...

Hook up the TX pin of the esp to the RX pin of the "programmer"
Hook up the RX pin of the esp to the TX pin of the "programmer"
Hook up the VCC pin and CH_PD pin of the esp to the 3v3 pin of the "programmer"
Hook up the GND pin of the esp to the 0V pin of the "programmer"
Temporarily hook up the GPIO 0 pin to the 0v pin of the "programmer"

Download the flasher from espbasic.com

Unzip that download.

Power up your setup.

Select your comport and 512K in the flasher program and flash your esp. If your esp module pcb is black instead of blue, select the 1M file instead.

Power down the esp and remove the temporary connection only from GPIO-0 pin on the esp. At this point, you may need to use the external 3.3v power supply as the esp can draw a bit of current during regular operation. (up to 250ma or better).

Fire up Tera Term and set your com port and then baud rate to 9600.

Power up the esp and you should see some action on tera term at which point you can now connect your wifi to the esp and look at 192.168.4.1 in your browser and rock and roll. Follow the instructions on the website for further details.

Keep us posted on your progress....

Edited by viscomjim 2015-12-01
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 08:11am 30 Nov 2015
Copy link to clipboard 
Print this post

Thanks Jim for that useful 'reference' as to how to update firmware (I was just about to read how to do it when I saw your post!)

Just to reiterate Jim's comment for Barry; you will need to power the ESP externally with 3v3 as the FTDI module is only good for 50mA. Any more and you can damage the FTDI chip.

Let us know how it goes . . . .

WW

Edited by WhiteWizzard 2015-12-01
 
banda
Newbie

Joined: 12/05/2014
Location: New Zealand
Posts: 35
Posted: 04:38pm 30 Nov 2015
Copy link to clipboard 
Print this post

I've taken great care to follow your instuctions and got to the part that said
'Download the flasher from espbasic.com'.
I did so, but now the stupid thing wont do as it's told.
When I tried to unzip it a miniature blue tornedo whirled forever and nothing happened.
When I tried to delete it and start again it said:
'The action can't be completed because the file is open in System.
Close the file and try again'.
It doesn't tell me how to close the file.
I've closed down entirely then started again, but the thing still says the same thing.

However, it's not your fault. I'm doomed. Thank you for all your assistance.

Barry


 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:00pm 30 Nov 2015
Copy link to clipboard 
Print this post

Barry,
If you are having trouble unzipping the download, it is likely to be corrupt.
I would download it again.

When you said "I've closed down entirely then started again", I assume that you restarted Windows. That's a good thing to do in this situation.

Jim
VK7JH
MMedit
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 07:58pm 30 Nov 2015
Copy link to clipboard 
Print this post

The espbasic flasher is ESP_Basic_Flasher.exe an exe file. You just need to run it after its downloaded.

ESP basic download page
Latest F4 Latest H7 FotS
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 10:19pm 30 Nov 2015
Copy link to clipboard 
Print this post

Does anyone know if it is possible (or better still, has done it) to configure a ESP8266 module (of any generation) onto your LAN with a fixed IP address AND then use TeraTerm on a TelNet connection to connect to the IP address (and PORT) so that anything typed in TT appears on the ESP's Tx pin.

Or put another way, can I control a MicroMite wirelessly.

I have seen numerous posts about this (including the likes of TasseyJim's MMLink) but never see a total working solution.

I have recently had great fun with Bluetooth and cracked that one (can now fully access MM's via any BT Windows or Android device (i.e. Tablets & Cell Phones)) and am looking to do the same with WiFi.

I have never really played with TelNet before so have a learning curve there; but am hoping that making a TeraTerm connection via TelNet will mean this is all hiden from me.

Any advice, comments, guidance is very much appreciated. . . .

WW
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 04:46am 02 Dec 2015
Copy link to clipboard 
Print this post

@WW
[code]
/*
WiFiTelnetToSerial - Example Transparent UART to Telnet Server for esp8266

Copyright (c) 2015 Hristo Gochkov. All rights reserved.
This file is part of the ESP8266WiFi library for Arduino environment.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <ESP8266WiFi.h>

//how many clients should be able to telnet to this ESP8266
#define MAX_SRV_CLIENTS 1
const char* ssid = "**********";
const char* password = "**********";

WiFiServer server(23);
WiFiClient serverClients[MAX_SRV_CLIENTS];

void setup() {
Serial1.begin(115200);
WiFi.begin(ssid, password);
Serial1.print("\nConnecting to "); Serial1.println(ssid);
uint8_t i = 0;
while (WiFi.status() != WL_CONNECTED && i++ < 20) delay(500);
if(i == 21){
Serial1.print("Could not connect to"); Serial1.println(ssid);
while(1) delay(500);
}
//start UART and the server
Serial.begin(115200);
server.begin();
server.setNoDelay(true);

Serial1.print("Ready! Use 'telnet ");
Serial1.print(WiFi.localIP());
Serial1.println(" 23' to connect");
}

void loop() {
uint8_t i;
//check if there are any new clients
if (server.hasClient()){
for(i = 0; i < MAX_SRV_CLIENTS; i++){
//find free/disconnected spot
if (!serverClients || !serverClients.connected()){
if(serverClients) serverClients.stop();
serverClients = server.available();
Serial1.print("New client: "); Serial1.print(i);
continue;
}
}
//no free/disconnected spot so reject
WiFiClient serverClient = server.available();
serverClient.stop();
}
//check clients for data
for(i = 0; i < MAX_SRV_CLIENTS; i++){
if (serverClients && serverClients.connected()){
if(serverClients.available()){
//get data from the telnet client and push it to the UART
while(serverClients.available()) Serial.write(serverClients.read());
}
}
}
//check UART for data
if(Serial.available()){
size_t len = Serial.available();
uint8_t sbuf[len];
Serial.readBytes(sbuf, len);
//push UART data to all connected telnet clients
for(i = 0; i < MAX_SRV_CLIENTS; i++){
if (serverClients && serverClients.connected()){
serverClients.write(sbuf, len);
delay(1);
}
}
}
}
[/code]
It is one of the samples included in the Arduino (Software NOT hardware) version of the ESP8266.
https://github.com/esp8266/Arduino

Microblocks. Build with logic.
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 06:38am 02 Dec 2015
Copy link to clipboard 
Print this post

Hi White, have you tried the HM-11 or HM-12 so you can use an apple product (iphone, ipad) using Bluetooth? I want to get my hands on one to try. As far as regular Bluetooth, are you willing to shed some light on your setup with the uMite. What are you using on the other end (android, etc) to communicate with the uMite? This is very interesting to me as one could make a board that does not need a display or buttons and use a Bluetooth device to configure things, etc. I really like this idea and would like to pursue it. Any advise or input would be greatly appreciated.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 07:08am 02 Dec 2015
Copy link to clipboard 
Print this post

@viscomjim,

I ended up allowing for Windows and Android SPP connection with a HC05. SPP and iOS are a non starter. Looked briefly at other BLE modules but uncovered the fact they only allow small packets of data so thought this would not be ideal for the MM's Editor.

On an Android I am using BTerm 2 - works a treat apart from:
1: No function keys; so F2 (run) and F4 (edit) are a big miss
2: No cursor keys so a pain in the ar$e to use the Editor with the Android on-screen pop-up keyboard

BUT the MM 'gadget' I am connecting to has a keyboard so am only using the connected BT device (tablet or cell-phone) as a display.

I discovered that the HC05 is the best to use with Android and Windows devices - and is nice and low cost. It will allow you to do what you indicate i.e. use BT to configure (and program, and edit) a 'device'.

Now using a MicroSoft Surface 3 to do my MM development with a BT connection and no drop out whatsoever.

One 'trick' I have up my sleeve is a nice switching circuit to toggle between USB (via FTDI) and BT without dropping either connection. A single tactile button toggles between either USB or BT allowing me to have two 'connections' to the MM. In an educational environment the 'teacher' can temporarily take over control of the MM from the student to 'demonstrate' a principle, and then control passed back to the student - all very fluid.

Do let me know if you have a stab at iOS & BT with any other BT(LE) module. I do want to solve this but I am desperately fighting time to release a product

Hope this helps. PM me if you need more info . . . .

WW



 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 08:51pm 02 Dec 2015
Copy link to clipboard 
Print this post

@WW,

If you look at the source i posted (example included in the Arduino/ESP8266) then you can see there is a possibility to have multiple connections over tcp/ip all to the same serial port. This would allow for several people to join a session.
All looking at the same screen. This would be nice for a teacher to share his display with as many others as needed.

Also.
Imaging a teacher with 20 students. He would be able to connect to each one of them, separately or just having multiple teraterms open.
The capability to switch between one student and the other is i think invaluable.
And all that with a 3-4US$ module out of the box, just load the software.

Microblocks. Build with logic.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 09:47pm 02 Dec 2015
Copy link to clipboard 
Print this post

@MicroBlocks

If I'm honest, I don't know where to begin with the posted code.
What do I load it into (or run it on)?

I guess I am a bit too 'uneducated' in this field at present and would need step-by-step instructions on getting a ESP8266 talking to a MM for the purposes of connecting to the MM console via a remote PC.

I understand the concept; just not how to 'execute' it with the example code.

Hopefully someone can help . . .

WW

EDIT: Fully agree with the teacher/student switching comments. This is what I have currently and works well (with BlueTooth).

Hopefully will be able to do this with WiFi too (soon!!) . . .Edited by WhiteWizzard 2015-12-04
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 10:35pm 02 Dec 2015
Copy link to clipboard 
Print this post

  Quote  What do I load it into (or run it on)?


If you visit esp8266.com, one of the forums is about using the Arduino IDE to program the ESP8266.

The Arduino IDE has been expanded recently to cover chipsets other than the original AVR. One of the new chips supported is the ESP8266 which is a microcontroller in its own right as well as having the on-chip wifi support.

To run MicroBlocks's code you need to install the Arduino IDE together with the ESP8266 addon. Then you can compile the code and the Arduino IDE will automatically load it onto the ESP8266 (i.e. program it)

This all works extremely seamlessly but you will need to invest a bit of time on the ESP8266.com website learning how to set up the Arduino environment. There are very good tutorial postings on the site. A dedicated 4 hours should get you up and running and then there is already a huge range of Arduino code that will immediately work directly on the ESP8266 with no other processor required
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 11:25pm 02 Dec 2015
Copy link to clipboard 
Print this post

Eplains it all and get you up and running qwuickly.
https://www.youtube.com/watch?v=8J7zflVO8K0

Or just follow the step by step instructions on:
https://github.com/esp8266/Arduino
I got it running in about 15 minutes.

It is not my code but an included sample.

I made some code that runs now and sends data to a service on sparkfun.
Works great already for about 24 hours and still going.
Even with deliberately switching of wifi router, disconnecting power etc.
Edited by MicroBlocks 2015-12-04
Microblocks. Build with logic.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 12:47am 03 Dec 2015
Copy link to clipboard 
Print this post

Thanks guys for the info/links.

Need to get my hands dirty with all of this to see if it actually works (or rather, what doesn't work).

Hopefully get to try this over the weekend . . . .

WW
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025