OTA programming of Uno with HC05

I am trying to set up Uno/HC-05 so I can upload new sketches.
I have gone through the AT command sequence, including Polar.
I have triple checked (I know -same eyes, same brain) the wiring with resistors and capacitor.
I am using software serial.
My VID and PID have no drivers available. 2341 & 0043, but my Com port is working fine, I think. I can load sketches when connected to computer via usb.
My HC-05 goes into receive(?) mode when I go to load a sketch - the led changes to 2 quick on, 1 slow off.
I have visited https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions. I have viewed and read numerous tutorials, forum posts, and youtubes.
What a way to start the new year!
I'm at wit's end. What can I do next? The error message is below. And I don't understand the message that popped up about formatting logs. Sorry.

</>
Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno"

Sketch uses 2052 bytes (6%) of program storage space. Maximum is 32256 bytes.

Global variables use 126 bytes (6%) of dynamic memory, leaving 1922 bytes for local variables. Maximum is 2048 bytes.

C:\Users\Bob\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Bob\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM13 -b115200 -D -Uflash:w:C:\Users\Bob\AppData\Local\Temp\arduino_build_58261/Blink_with_software_serial_HC05.ino.hex:i

avrdude: Version 6.3-20190619

     Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

     Copyright (c) 2007-2014 Joerg Wunsch



     System wide configuration file is "C:\Users\Bob\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"



     Using Port                    : COM13

     Using Programmer              : arduino

     Overriding Baud Rate          : 115200

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x86

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x86

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x86

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x86

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x86

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x86

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x86

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x86

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x86

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x86

avrdude done. Thank you.

Problem uploading to board. See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

</>

Are you by any chance using pins 0 and 1 for the HC05 ?

No, 11 & 12, software serial.

I do not know what tutorial you are following for OTA programming of the UNO with an HC05, but I don't think you can do it over software serial.

Can you post a link to what procedure you are following?

This tutorial is using the connection over hardware tx and rx.
https://www.electroniclinic.com/arduino-ota-over-the-air-programming-using-bluetooth/

The blink pattern indicates that the pc has connected to the HC05, but the downloaded code is not getting to the bootloader.

https://circuitdigest.com/microcontroller-projects/how-to-program-arduino-wirelessly-over-bluetooth

https://www.buildlog.net/blog/2017/10/using-the-hc-05-bluetooth-module/

https://www.fpaynter.com/2019/06/arduino-remote-programming-using-a-hc-05-bluetooth-module/

My SoftwareSerial function does this, from your link:

  1. Connect the TXD pin of the HC-05 with the RX pin of the Arduino
  2. Connect the RX of the HC-05 with the TX of the Arduino
My SoftwareSerial function does this, from your link:

1. Connect the TXD pin of the HC-05 with the RX pin of the Arduino
2. Connect the RX of the HC-05 with the TX of the Arduino

Please explain how. Do you have a sketch running on the Arduino while your are trying to load code?

Software Serial will not work at 115200 baud.

EDIT: All of the tutorials you linked show the HC05 tx and rx connections switched over from software serial (used during the AT mode set up) pins to the hardware serial pins for code download.

Ok, now I am really confused.
Yes, I hope to have a sketch running when I go to load (via the HC-05) a new sketch.
I thought the HC-05 sent the new sketch to the Uno via the HC-05 Tx, and was received on the UNO's Rx. But I can't(?) use UNO's hardware Rx/Tx pins, 0 & 1. Thus I have to use a software serial scheme.

"Software Serial will not work at 115200 baud." What will it work at, and how do I change it?

Oh, maybe I can use pins 0 & 1!
Or use AltSoftSerial library?

Running code stops when new code is being loaded .

You can indeed connect the HC05 to the hardware serial pins as it done in all the tutorials. You need to do this for the OTA programming.

Depending on how you want to use the Serial monitor you may be able to leave it connected to hardware serial pins after the loading process.

If you need to enter something from the Serial monitor you will need to switch the HC05 back to software serial pins.

Typically OTA programming is used when you can't connect to PC for loading code over usb so the monitor is not involved. What is your application?

No need for monitor.
Loading new FastLED WS2812 sequences. Nano is not convenient.
Ok if existing sketch stops.
I'll try hardware serial tomorrow. I'm excited now.

You should be able to send the information which defines the led sequence to the HC05 in normal data mode for passing along to the Arduino.

Why do you need to reprogram the Arduino rather than just sent it data?

I don't know the difference between reprogramming and sending a new sketch.

Can you post the sketch you want to change or reload?

Reprogramming and sending a new sketch are the same thing.

However, depending on what you want to change, it may not be necessary to reprogram the Arduino. You may be able to tell it to change some variables of a running program.

On the other hand, if you have patterns loaded into PROGMEM which you want to change, you will have to send new code to the Arduino.

Yes, I will post two typical sketches tomorrow. Thanks.

Hardware serial pins 0 & 1 made no difference to response or error message(s).
Would AltSoftSerial make a difference?
Two typical sketches:

/// @file    DemoReel100.ino
/// @brief   FastLED "100 lines of code" demo reel, showing off some effects
/// @example DemoReel100.ino

#include <FastLED.h>

FASTLED_USING_NAMESPACE

// FastLED "100-lines-of-code" demo reel, showing just a few 
// of the kinds of animation patterns you can quickly and easily 
// compose using FastLED.  
//
// This example also shows one easy way to define multiple 
// animations patterns and have them automatically rotate.
//
// -Mark Kriegsman, December 2014


#define DATA_PIN    2
//#define CLK_PIN   4
#define LED_TYPE    WS2812
#define COLOR_ORDER GRB
#define NUM_LEDS    120
CRGB leds[NUM_LEDS];

#define BRIGHTNESS          96
#define FRAMES_PER_SECOND  120

void setup() {
  delay(3000); // 3 second delay for recovery
  
  // tell FastLED about the LED strip configuration
  FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
  //FastLED.addLeds<LED_TYPE,DATA_PIN,CLK_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);

  // set master brightness control
  FastLED.setBrightness(BRIGHTNESS);
}


// List of patterns to cycle through.  Each is defined as a separate function below.
typedef void (*SimplePatternList[])();
SimplePatternList gPatterns = { rainbow, rainbowWithGlitter, confetti, sinelon, juggle, bpm };

uint8_t gCurrentPatternNumber = 0; // Index number of which pattern is current
uint8_t gHue = 0; // rotating "base color" used by many of the patterns
  
void loop()
{
  // Call the current pattern function once, updating the 'leds' array
  gPatterns[gCurrentPatternNumber]();

  // send the 'leds' array out to the actual LED strip
  FastLED.show();  
  // insert a delay to keep the framerate modest
  FastLED.delay(1000/FRAMES_PER_SECOND); 

  // do some periodic updates
  EVERY_N_MILLISECONDS( 5 ) { gHue++; } // slowly cycle the "base color" through the rainbow
  EVERY_N_SECONDS( 10 ) { nextPattern(); } // change patterns periodically
}

#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0]))

void nextPattern()
{
  // add one to the current pattern number, and wrap around at the end
  gCurrentPatternNumber = (gCurrentPatternNumber + 1) % ARRAY_SIZE( gPatterns);
}

void rainbow() 
{
  // FastLED's built-in rainbow generator
  fill_rainbow( leds, NUM_LEDS, gHue, 7);
}

void rainbowWithGlitter() 
{
  // built-in FastLED rainbow, plus some random sparkly glitter
  rainbow();
  addGlitter(80);
}

void addGlitter( fract8 chanceOfGlitter) 
{
  if( random8() < chanceOfGlitter) {
    leds[ random16(NUM_LEDS) ] += CRGB::White;
  }
}

void confetti() 
{
  // random colored speckles that blink in and fade smoothly
  fadeToBlackBy( leds, NUM_LEDS, 10);
  int pos = random16(NUM_LEDS);
  leds[pos] += CHSV( gHue + random8(64), 200, 255);
}

void sinelon()
{
  // a colored dot sweeping back and forth, with fading trails
  fadeToBlackBy( leds, NUM_LEDS, 20);
  int pos = beatsin16( 13, 0, NUM_LEDS-1 );
  leds[pos] += CHSV( gHue, 255, 192);
}

void bpm()
{
  // colored stripes pulsing at a defined Beats-Per-Minute (BPM)
  uint8_t BeatsPerMinute = 62;
  CRGBPalette16 palette = PartyColors_p;
  uint8_t beat = beatsin8( BeatsPerMinute, 64, 255);
  for( int i = 0; i < NUM_LEDS; i++) { //9948
    leds[i] = ColorFromPalette(palette, gHue+(i*2), beat-gHue+(i*10));
  }
}

void juggle() {
  // eight colored dots, weaving in and out of sync with each other
  fadeToBlackBy( leds, NUM_LEDS, 20);
  uint8_t dothue = 0;
  for( int i = 0; i < 8; i++) {
    leds[beatsin16( i+7, 0, NUM_LEDS-1 )] |= CHSV(dothue, 200, 255);
    dothue += 32;
  }
}
#include <FastLED.h>

#define NUM_LEDS  60
#define LED_PIN   6
#define MAX_SHOTS 5
#define MIN_SHOTS 1
#define SPEED_OF_SHOT random(10,25)
#define MIN_WAIT_BETWEEN_SHOTS 350
#define MAX_WAIT_BETWEEN_SHOTS 700
CRGB leds[NUM_LEDS];
uint8_t colorIndex[NUM_LEDS];

DEFINE_GRADIENT_PALETTE( greenblue_gp ) { 
  0,   0,  255, 0,
  46,  255,  255,  255,
  179, 255, 0, 0,
  255, 255,  255, 255
};

CRGBPalette16 greenblue = greenblue_gp;

void setup() {
  FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
  FastLED.setBrightness(50);

  Serial.begin(57600);
}

void loop() {
  
  uint32_t period = .1 * 60000L;       // X minutes
  for( uint32_t tStart = millis();  (millis()-tStart) < period;  ){
   blurPhaseBeat();
}
  //uint32_t period1 = .2 * 60000L;       // X minutes
  for( uint32_t tStart = millis();  (millis()-tStart) < period;  ){
  addingWavesandblur();
  }
  //uint32_t period2 = .2 * 60000L;       // X minutes
  for( uint32_t tStart = millis();  (millis()-tStart) < period;  ){
  movingDotred();
  }
  //uint32_t period2 = .2 * 60000L;       // X minutes
  for( uint32_t tStart = millis();  (millis()-tStart) < period;  ){
  phaseBeat();
  }
  
  //uint32_t period2 = .2 * 60000L;       // X minutes
  for( uint32_t tStart = millis();  (millis()-tStart) < period;  ){
  movingDotgreen();
  }

  //uint32_t period2 = .2 * 60000L;       // X minutes
  for( uint32_t tStart = millis();  (millis()-tStart) < period;  ){
  shotsbackandforth();
  } 

  //Fill the colorIndex array with random numbers
  for (int i = 0; i < NUM_LEDS; i++) {
    colorIndex[i] = random8();
  }
  //uint32_t period2 = .2 * 60000L;       // X minutes
  for( uint32_t tStart = millis();  (millis()-tStart) < period;  ){
  simplecolorpallette();
  } 
   
} 
  
 void blurPhaseBeat(){ 
  uint8_t sinBeat   = beatsin8(30, 0, NUM_LEDS - 1, 0, 0);
  uint8_t sinBeat2  = beatsin8(30, 0, NUM_LEDS - 1, 0, 85);
  uint8_t sinBeat3  = beatsin8(30, 0, NUM_LEDS - 1, 0, 170);

  // If you notice that your pattern is missing out certain LEDs, you
  // will need to use the higher resolution beatsin16 instead. In this
  // case remove the 3 lines above and replace them with the following:
  // uint16_t sinBeat   = beatsin16(30, 0, NUM_LEDS - 1, 0, 0);
  // uint16_t sinBeat2  = beatsin16(30, 0, NUM_LEDS - 1, 0, 21845);
  // uint16_t sinBeat3  = beatsin16(30, 0, NUM_LEDS - 1, 0, 43690);

  leds[sinBeat]   = CRGB::Green;
  leds[sinBeat2]  = CRGB::Blue;
  leds[sinBeat3]  = CRGB::Red;

  EVERY_N_MILLISECONDS(1){
    for(int i = 0; i < 4; i++) {
      blur1d(leds, NUM_LEDS, 50);
    }
  }
  //fadeToBlackBy(leds, NUM_LEDS, 10);
  FastLED.show();
}

void addingWavesandblur(){
  // Waves for LED position
  uint8_t posBeat  = beatsin8(30, 0, NUM_LEDS - 1, 0, 0);
  uint8_t posBeat2 = beatsin8(60, 0, NUM_LEDS - 1, 0, 0);
  uint8_t posBeat3 = beatsin16(30, 0, NUM_LEDS - 1, 0, 127);
  uint8_t posBeat4 = beatsin16(60, 0, NUM_LEDS - 1, 0, 127);


  // In the video I use beatsin8 for the positions. For longer strips,
  // the resolution isn't high enough for position and can lead to some
  // LEDs not lighting. If this is the case, use the 16 bit versions below
  // uint16_t posBeat  = beatsin16(30, 0, NUM_LEDS - 1, 0, 0);
  // uint16_t posBeat2 = beatsin16(60, 0, NUM_LEDS - 1, 0, 0);
  // uint16_t posBeat3 = beatsin16(30, 0, NUM_LEDS - 1, 0, 32767);
  // uint16_t posBeat4 = beatsin16(60, 0, NUM_LEDS - 1, 0, 32767);

  // Wave for LED color
  uint8_t colBeat  = beatsin8(45, 0, 255, 0, 0);

//  leds[(posBeat + posBeat2) / 2]  = CHSV(colBeat, 255, 255);
//  leds[(posBeat3 + posBeat4) / 2]  = CHSV(colBeat, 255, 255);
    leds[(posBeat + posBeat2) /3]  = CRGB(colBeat, 0, 0);
    leds[(posBeat3 + posBeat4)/2 ]  = CRGB(0, colBeat, 0);

  fadeToBlackBy(leds, NUM_LEDS, 5);

  FastLED.show();
 }

void blur(){
    EVERY_N_SECONDS(2) {
    for (int i = 0; i < 4; i++) {
      blur1d(leds, NUM_LEDS, 60);
    }
  }

  EVERY_N_SECONDS(4) {
    resetStrip();
  }

  FastLED.show();
}

void resetStrip() {
  // Fill strip with R, G and B stripes
  fill_solid(leds, NUM_LEDS, CRGB::Red);
  fill_solid(leds, (NUM_LEDS / 3) * 2, CRGB::Green);
  fill_solid(leds, (NUM_LEDS / 3), CRGB::White);
}

void movingDotred(){
 uint16_t sinBeat = beatsin16(35, 0, NUM_LEDS - 1, 0, 0);

  leds[sinBeat] = CRGB::Red;
  fadeToBlackBy(leds, NUM_LEDS, 10);
  FastLED.show(); 
}

void movingDotgreen(){
 uint16_t sinBeat = beatsin16(35, 0, NUM_LEDS - 1, 0, 0);

  leds[sinBeat] = CRGB::Green;
  fadeToBlackBy(leds, NUM_LEDS, 10);
  FastLED.show(); 
}


void phaseBeat(){
  uint8_t sinBeat   = beatsin8(30, 0, NUM_LEDS - 1, 0, 0);
  uint8_t sinBeat2  = beatsin8(30, 0, NUM_LEDS - 1, 0, 85);
  uint8_t sinBeat3  = beatsin8(30, 0, NUM_LEDS - 1, 0, 170);

  // If you notice that your pattern is missing out certain LEDs, you
  // will need to use the higher resolution beatsin16 instead. In this
  // case remove the 3 lines above and replace them with the following:
  // uint16_t sinBeat   = beatsin16(30, 0, NUM_LEDS - 1, 0, 0);
  // uint16_t sinBeat2  = beatsin16(30, 0, NUM_LEDS - 1, 0, 21845);
  // uint16_t sinBeat3  = beatsin16(30, 0, NUM_LEDS - 1, 0, 43690);

  leds[sinBeat]   = CRGB::Green;
  leds[sinBeat2]  = CRGB::Red;
  leds[sinBeat3]  = CRGB::White;
  
  fadeToBlackBy(leds, NUM_LEDS, 10);
  FastLED.show();
  }

  void shotsbackandforth(){
  int numShots = rand() % ((MAX_SHOTS - MIN_SHOTS) + 1) + MIN_SHOTS;
  for (int currShot = 1; currShot <= numShots; currShot++)
  {
    Serial.println("Green shot");
    doGreenShot();
  }

  int range = MAX_WAIT_BETWEEN_SHOTS - MIN_WAIT_BETWEEN_SHOTS;
  int delayBetweenShot = rand() % (range) + MIN_WAIT_BETWEEN_SHOTS;
  delay(delayBetweenShot);

  numShots = rand() % ((MAX_SHOTS - MIN_SHOTS) + 1) + MIN_SHOTS;
  for (int currShot = 1; currShot <= numShots; currShot++)
  {
    Serial.println("Red shot");
    doRedShot();
  }
  
  range = MAX_WAIT_BETWEEN_SHOTS - MIN_WAIT_BETWEEN_SHOTS;
  delayBetweenShot = rand() % (range) + MIN_WAIT_BETWEEN_SHOTS;
  delay(delayBetweenShot);
}


/*
 * Calls the shoot method with the green parameter
 */
void doGreenShot()
{
  int startingPin = 0; // The LED to start at

  for (int i = startingPin; i < NUM_LEDS-11; i+=2)
  {
    fill_solid(leds+i,10, CHSV(random8(),255,255));
    FastLED.show(); // Show changes
    leds[i] = CRGB::Black; // Set the first one to black
    leds[i+1] = CRGB::Black; // Set the first one to black
    leds[i+2] = CRGB::Black; // Set the first one to black
    leds[i+3] = CRGB::Black; // Set the first one to black
    delay(SPEED_OF_SHOT+3);
  }

  clearEnds();
  FastLED.show();
}

/*
 * Calls the shoot method with the red parameter
 */
void doRedShot()
{

  int startingPin = NUM_LEDS - 10; // The LED to start at

  for (int i = startingPin; i >= 0; i-=2)
  {
    int location = NUM_LEDS - i;
    fill_solid(leds + i, 5, CHSV(random8(),255,255));
    FastLED.show(); // Show changes
    leds[i+7] = CRGB::Black; // Set the first one to black
    leds[i+8] = CRGB::Black; // Set the first one to black
    leds[i+9] = CRGB::Black; // Set the first one to black
    leds[i+10] = CRGB::Black; // Set the first one to black
    delay(SPEED_OF_SHOT);
  }
  clearEnds();
  FastLED.show();

}

void clearEnds()
{
  for (int i = NUM_LEDS - 1; i >= NUM_LEDS - 12; i--)
  {
    leds[i] = CRGB::Black; 
  }

  for (int i = 0; i <= 12; i++)
  {
    leds[i] = CRGB::Black; 
  }
  FastLED.show();
}

void simplecolorpallette(){
  // Color each pixel from the palette using the index from colorIndex[]
  for (int i = 0; i < NUM_LEDS; i++) {
    leds[i] = ColorFromPalette(greenblue, colorIndex[i]);
  }
  
  EVERY_N_MILLISECONDS(2){
    for (int i = 0; i < NUM_LEDS; i++) {
      colorIndex[i]++;
    }
  }
  FastLED.show();  
}

Did you cross connect the module and the Arduino? tx->rx and rx->tx.
Have you programmed the HC05 for 115200 baud?

Would AltSoftSerial make a difference?

No. You have got to get the HC05 talking through hardware serial.

Tx/Rx are cross connected.
AT+BAUD 115000,0,0 has been done successfully.

Here is the test sketch I am trying to get onto the Uno.
I notice that some "test" sketches for this project don't include the Serial.begin statement.

void setup() {
  // configure LED_BUILTIN as an output
  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);
  
}
// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  Serial.println("Led is Switched ON");
  delay(1000);              // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
   Serial.println("Led is Switched ON");
  delay(1000);              // wait for a second
}

The Serial specifcation for the Arduino is 8N1. That is, eight data bits, no parity bit, and one stop bit.

The AT command is somewhat backward to this with the stop bit listed before the parity bit

To change HC-05 baud rate from default 9600 to 115200, 1 stop bit, 0 parity enter:

AT+UART=115200,1,0

I don't want to question your knowledge, you have given my situation quite a bit of time, but -
There are numerous tutorials and vids that say AT+UART=115200,0,0 when trying to setup ota.
Nevertheless, I will try it tonight or tomorrow morning.