1 (edited by JZACK-XYUser 2022-11-26 04:30:16)

Topic: SOLVED: ESP8266 Upload Code - Failed to Connect Timed Out

I'm using this sample code directly from the RemoteXY.h library.   I'm very new to RemoteXY but pretty experienced with Blynk legacy.  I'm using an ESP8266 module.  I'm connecting to ESP8266 via the PC's USB port.

---------------------------------------------------------------------------------------------

```

< <

/*
   Simple button example
   
   This source code of graphical user interface
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 3.1.1 or later version
   download by link http://remotexy.com/en/library/
   To connect using RemoteXY mobile app by link http://remotexy.com/en/download/                   
     - for ANDROID 4.5.1 or later version;
     - for iOS 1.4.1 or later version;
   
   This source code 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.   
*/

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////


#include <ESP8266WiFi.h>
#include <RemoteXY.h>

// RemoteXY select connection mode

// **************************************************
// Added this code to the example trying to resolve
// the uploading connection to ESP8266 time out

#define REMOTEXY_SERIAL Serial
#define REMOTEXY_SERIAL_SPEED 9600    // tried 115200, it didn't work either

// **************************************************


// RemoteXY configurate 
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,1,0,1,0,27,0,10,13,2,
  1,0,9,9,46,46,6,7,50,50,
  2,31,88,0,65,4,62,16,31,31,
  14,62,35,35 };
 
// this structure defines all the variables and events of your control interface
struct {

    // input variables
  uint8_t button_1; // =1 if button pressed, else =0

    // output variables
  uint8_t led_1_r; // =0..255 LED Red brightness

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0

} RemoteXY;
#pragma pack(pop)



/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////


CRemoteXY *remotexy;

void setup()
{
  remotexy = new CRemoteXY (
    RemoteXY_CONF_PROGMEM,
    &RemoteXY,
    "",
    new CRemoteXYConnectionServer (
      new CRemoteXYComm_WiFi (
        "MYbasement",       // REMOTEXY_WIFI_SSID
        "Password123"),          // REMOTEXY_WIFI_PASSWORD
      6377                  // REMOTEXY_SERVER_PORT
    )
  );
 
 
  // TODO you setup code
 
}

void loop()
{
  remotexy->handler ();
 
  if (RemoteXY.button_1)  RemoteXY.led_1_r = 255;
  else RemoteXY.led_1_r = 0;
 
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay()


}

>>

```

-------------------------------------------------------------------------------------------------

The esp8266 uploading timed out error I'm getting:

File "C:/Users/JJ/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool\esptool.py", line 529, in connect
    raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))

esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
Failed uploading: uploading error: exit status 1
-------------------------------------------------------------------------------------------------


Any tips or pointers would be appreciated!  Thx....

2

Re: SOLVED: ESP8266 Upload Code - Failed to Connect Timed Out

Embarrassing - I didn't realize a Windows Update caused a Comm Port driver issue.    After some testing figured out even Blynk good working code wouldn't upload to an ESP8266.  Net/net - this problem has nothing to do with RemoteXY code not loading...