Go Down

Topic: Wireless programming of an arduino with HC-05 bluetooth module (Read 10547 times) previous topic - next topic

boylesg

Is this possible using a device like this:



I have successfully used a slave and master device to get an arduino to communicate with Teraterm.

But I have not succeeded in getting the IDE to communicate with the arduino during program upload - I tried connecting the RXD and TXD pins on the HC-05 to the TXD and RXD pins on the arduino.

I held the reset pin on the arduino until the IDE began uploading.

But it does not work.

yoyomankind

Check out these sites and see if that helps:

http://makezine.com/projects/diy-arduino-bluetooth-programming-shield/

http://www.techbitar.com/modify-the-hc-05-bluetooth-module-defaults-using-at-commands.html

boylesg

It is looking as though you need an actual PCI bluetooth card to do it.

Has anyone managed to connect an arduino to the IDE using two of the HC-05 modules?

One plugged into the arduino and one into a USB socket in the PC?

pito

Yes, I am using HC-05 for uploading to the 328p or 1284p.
You must set HC-05 such it toggles a pin thus it works like DTR on FT232.
Except setting the proper baudrate you have to set

AT+POLAR=1,0

and wire a 100nF (or 1uf) ceramic capacitor between pin32 of the HC-05 and the 328p reset.

See more

http://blog.iteadstudio.com/upload-program-to-arduino-with-bt-shield/


boylesg

Yes, I am using HC-05 for uploading to the 328p or 1284p.
You must set HC-05 such it toggles a pin thus it works like DTR on FT232.
Except setting the proper baudrate you have to set

AT+POLAR=1,0

and wire a 100nF (or 1uf) ceramic capacitor between pin32 of the HC-05 and the 328p reset.

See more

http://blog.iteadstudio.com/upload-program-to-arduino-with-bt-shield/


I am not really clear about what this means: "Download Arduino IDE. ( don't use the Arduino 00xx ) "

What version of the IDE are you using?

Thus far I have been trying to just hit the reset button at the right time but no success.

The additional problem seems to be that all these guides say that you need to click on the bluetooth icon in windows and connect to the HC-05 blah blah.

But when I connect my HC-05 to windows xp it simply appears as a com port - there is no bluetooth icon any where. No blue tooth services running in control panel->Computer management->Services.

So I am stuck.

I go the things communicating with each other with the Software Serial example. If I typed something in Serial Monitor, it would appear in Teraterm connected to the com port associated with the HC-05 module.

But that is as far as I can get.

boylesg

Also, fiddling around with pin 32 on the HC-05, I have noticed that the arduino will reset through a 100nF cap the first time you touch one of tis leads to pin 32 on the HC-05. But then it stops working, and the only way to make it work again is to discharge the cap.

So what is that about?

There does not seem to be much point in implementing a setup where you can upload a program to the arduino only once via the bluetooth and then have to manually discharge the cap to get it to work again.......assuming of course I could get the damn thing to upload a program to the arduino in the first place.

habanero

Also, fiddling around with pin 32 on the HC-05, I have noticed that the arduino will reset through a 100nF cap the first time you touch one of tis leads to pin 32 on the HC-05. But then it stops working, and the only way to make it work again is to discharge the cap.

So what is that about?

There does not seem to be much point in implementing a setup where you can upload a program to the arduino only once via the bluetooth and then have to manually discharge the cap to get it to work again.......assuming of course I could get the damn thing to upload a program to the arduino in the first place.
I'm guessing that you need to attach a resistor between pin 32 & GND to automatically discharge the capacitor after it's triggered the reset pin on the Arduino, that has a high enough resistance so it doesn't direct pin 32 to GND when it goes HIGH and thus fails to trigger the reset pin, but low enough to discharge the capacitor before the next upload cycle. The DIY article used around 10-15k Ohm.

boylesg

I think I understand why my setup is not working after a bit of further reading.

I have a HC-05 module connected to my PC via a simple USB to serial converter cable with Vcc, GND, Tx and Rx connectors at the other end.

I also have a USB to FTDI module connected to my PC via an ordinary USB cable and this works just fine when uploading programs to an arduini.

I was reading that FTDI has the ability to pass information as to what is connected to it to the PC and windows. Therefore the arduino IDE knows what baud rate  to use from the Boards.txt file.

Looking at that file there is no default baud rate or anything so, if the ide does not know what is connected to the other end of the USB cable, then who the hell knows what it does when you hit the upload button.

With the simple USB to serial converter cable all the IDE can see is 'COM 6' or what ever.

With the USB cable plus FTDI it sees 'Com 6 (Uno)'.

So there is know way I can make these HC-05 modules work as I want them to without getting one of those USB bluetooth dongle things.

Then presumeably Windows XP will kick in with Bluetooth settings and connections I can manipulate so that the IDE can then know what is connected at the other end.

It is a pity none of the tutorials I have read really flesh out this critical detail - I doubt I am the only one to has tried to make the connection through 2 x HC-05 modules + 1 x USB to Serial cable rather than the 1 x USB bluetooth dongle + 1 x HC-05.


Isaac96

Hi. I have a computer with Ubuntu and Windows 7 dual-boot. It has built-in bluetooth and I also have a HC-06. I cannot get Windows to connect to the Bluetooth module as a COM port. Is that easier to do in Ubuntu 14.04?
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

habanero

Hi. I have a computer with Ubuntu and Windows 7 dual-boot. It has built-in bluetooth and I also have a HC-06. I cannot get Windows to connect to the Bluetooth module as a COM port. Is that easier to do in Ubuntu 14.04?
I don't know if this pertains to your situation but I had to install the Toshiba Bluetooth driver to get my PC to connect to my HC-05, as the default driver that came from my BT dongle didn't have the proper BT stack. It seems that BT is a fairly robust standard that encompasses all sorts of communications protocols, e.g. audio, data, control, etc., and you have to have the right drivers to connect to each type of device.

Isaac96

My computer has a built-in BT module, so that should not be a problem. BTW, it is a old Lenovo laptop, 64 bits dual core 1.33 GHz. I am using it as a desktop computer, and I hardly ever use it because I have to connect up a screen and keyboard, as the screen is cracked. I am writing (or typing) this from my usual computer.
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

guix

Here is my setup for programming Arduino Megas with a HC-05:


Isaac96

The STATE pin is the DTR pin? Would this be the same for a HC-06?
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

CCommander

How would the Reset-Circuit change for an Arduino Due?

Can the Arduino Due be connected just through an 0.1 uF Cap to the HC-05 without the use of additional resistors?

MikeLemon

Here is my setup for programming Arduino Megas with a HC-05:


The STATE PIN goes HIGH as soon as there's a bluetooth connection between the two modules how would it work?

Did anyone figured out a way to program those and can make a proper tutorial about it?

Go Up