Again: Error: Failed go connect to ESP8266: Timed out waiting for packet header

My project has been working for several years.
As of yesterday, when I try to re-compile and upload I find I can't.
I seem to recall that there was something about the board - so I un-installed/re-installed the Board Manager. Don't recall original version number, but re-install is the current version of NOdeMCU 0.9(ESP-12.)
Finally deleted most of my program, and left with the code below. Also removed the module from other hardware. The only change - added a 100 uF cap from enable pin to ground (which was originally not needed.)
Program compiles OK; Port is OK; Then fails to load.

Any good ideas??

<CODE/>

// Failed go connect to ESP8266:  Timed out waiting for packet header
//  XXX = trying to get display up!
//  5 Oct 23 - Now working on it as version 5A Oct 23

#include <Wire.h>
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
#include "HTTPSRedirect.h"
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>   //Local WebServer used to serve the configuration portal
#include <WiFiManager.h>
#include <EEPROM.h>
/////////////////////////
// For LCD only: (This must be placed BEFORE Setup, since LCD stuff must be global.)
const int rs = 12, en = 5, d4 = 14, d5 = 2, d6 = 0, d7 = 4;           //rs was originally pin 10. (either works OK)
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);                          //pins 8,9 work the lcd

void setup() {
  Serial.begin(115200); // mcb - does not work above here!!
  Serial.println("At the top of setup"); // mcb
  
      lcd.begin(16, 2); // Needed to Initialize the LCD interface.
      lcd.clear();
      
  } // end of setup  -  ready for   sec; then looks for nwk
  ///------------------------------------------------
  
  void loop() { //  We have a valid network to start
    
  }  //loopend
  //- - - - - - - 
  // End of everything!
<CODE/>

Problem solved!!!

I got to thinking - what stared all this business?
Answer: It's NOT really a software problem at all!
I've been using a single cable to plug, unplug and re-plug various modules, and all has worked well except for some software problems which is what I've been working on.
The only common link was the cable - which has always worked OK.
Since the problem appeared no matter which module I used, and even with old, known working software, why not the cable? This was the only common factor.
Anyway, I tried some contact cleaner on the tiny contacts of the micro-USB connector.
Voila! All is again working - all modules and all software!

This note is just to follow up on my original query - which assumed a software problem.

Thanks to anyone who reads this.
- Matt

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.