OTA programming UNO - HC05

Hi,
Does anyone knows a good tutorial about programming an arduino Uno with the Bluetooth module HC-05? Every tutorial I find is about the ESP8266

I did some test with the HC-05 module and the arduino Uno, and I am able to turn on/off a led via bluetooth. But now I want to upload new code (for example to change the delay of blinking, or a whole new code) via bluetooth to the UNO..

thx

Turns out Google is still working ...
Arduino OTA Over The Air Programming using Bluetooth

@Boffin I already tried this one, without success..

The software that you can download is for PC (not macOS) but with an USB toggle, I entered the following commands via serial monitor (in stead of the pc software)

AT+Name= MyDevice
AT+UART = 115200, 0, 0
AT + POLAR = 1,0

I can connect the HC-05 bluetooth module with my iMac, but I don't see the port in Arduino IDE to connect...

What should you do.

  1. Connect the HC-05 module to the computer. This requires the so-called TTL-dongle. This is actually a USB-UART converter. You can use any (FTDI, CH340, CP2102 etc.) with the appropriate driver. You also need a program like Serial Monitor. There are many such programs for both PC and Mac.
    OS X Serial Port Apps
    Serial Port Utility for Mac OS X: Best alternatives
  2. Configure HC-05 module. Submit some AT commands to configure the module. It does not always work, sometimes a module firmware update is required.
  3. Connect the module to Arduino and pair the computer with the module via Bluetooth. After that, the required COM port should appear on the computer.
  4. Start Arduino IDE, select the required port, download the program.

Don't expect it to say "Arduino Uno"; does a port disappear from the IDE when you disconnect, and appear again when you connect. Yo need to close and open the tools menu between the two steps.

  1. the settings for the HC-05 module are OK (that part was ok before my post here)

  2. I can connect with my iMac:
    Schermafbeelding 2021-07-03 om 09.49.05

  3. I see the port in my arduino IDE:
    Schermafbeelding 2021-07-03 om 09.49.23

  4. I am not able to upload to my Arduino via bluetooth:
    Schermafbeelding 2021-07-03 om 09.49.49

Pin connection as follow:
HC-05 UNO
VCC 5V
GND GND
RX TX
TX RX

Please enable show verbose output during upload and disable show verbose output during compilation om file->preferences in the IDE

Next attempt an upload and post the complete output from the output window (there more than likely will will be more than just the few lines that you showed).

Don't post screenshots of error messages, they are useless in 99.9% of the time.

Did you assemble the circuit correctly?
Have you connected a capacitor for automatic reset?

Arduino: 1.8.15 (Mac OS X), Board:"Arduino/Genuino Uno"

De schets gebruikt 1952 bytes (6%) programma-opslagruimte. Maximum is 32256 bytes.
Globale variabelen gebruiken 204 bytes (9%) van het dynamisch geheugen. Resteren 1844 bytes voor lokale variabelen. Maximum is 2048 bytes.
/Users/imac/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino8/bin/avrdude -C/Users/imac/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino8/etc/avrdude.conf -v -patmega328p -carduino -P/dev/cu.WordClock-SPPDev -b115200 -D -Uflash:w:/var/folders/2k/m9t1sj2x3w90t9l2_gvz_sk00000gn/T/arduino_build_33358/fastLed.ino.hex:i

avrdude: Version 6.3, compiled on Dec 16 2016 at 13:32:25
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

     System wide configuration file is "/Users/imac/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino8/etc/avrdude.conf"
     User configuration file is "/Users/imac/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : /dev/cu.WordClock-SPPDev
     Using Programmer              : arduino
     Overriding Baud Rate          : 115200

avrdude: ser_open(): can't open device "/dev/cu.WordClock-SPPDev": Resource busy

avrdude done. Thank you.

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

I think so, I followed this:

HC05-module-with-arduino

I think that there are some mistakes

To my knowledge, the HC-05 is a 3.3V device and should be powered from the 3.3V pin of the Arduino; the RX pin on the HC-05 should be connected to the TX pin of Arduino via a resistor divider to bring the level down to approx. 3.3V.

Further the LED does not have a current limiting resistor; either add it or remove the LED, the onboard L LED can take that function for now.

The HC-05 can be powered 3,6V to 6V (printed on the back of the module)
As I wrote before, my connections are as follow:

HC-05 UNO
GND GND
VCC 5V
TX RX
RX TX
STATE - Capacitor - RESET

When I use this configuration, I can access my UNO via bluetooth: I wrote a simple program so the serial.print send the data to my phone.. So it works without the resistor devider..

The led is not connected, I use the onboard led (this as test to see if I can change the delay by uploading a new sketch via bluetooth in the Blink-program)

The error text indicates that the port is busy. When loading the code through Arduino IDE, all other programs for working with the port must be closed. Some serial port programs do not properly close the port. After setting the HC-05 parameters, a computer restart is required.
During the download of the program, the USB cable between the Arduino and the computer should also not be connected.

P.S. It would be nice right from the start if you link to your module's sellers page.

P.S. It would be nice right from the start if you link to your module's sellers page.

Heed the advice @sterretje, one of the signals (Arduino TX) requires 5V to 3.3V matching.
A simple voltage divider can be used to match the levels.

I tried already a voltage divider. I found this on google:

The only difference between what I found and what @Boffin posted is that R1 is 1kOhm (not 10kOhm) and R2 is 2kOhm (not 4.7kOhm), but still no luck..

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