Hi everybody,
I'm trying to connect my Mega 2560 by bluetooth with my computer for upload and serial communication
I have a HC-05 (GW-040) and I connected it using this tuto :
Hi,
I tried with Tera Term, same 'no response'
One idea is that the 3.3v from TX HC05 is not detected on RX MEga side which works with 5v. How can I check if this voltage difference could be the issue ? Is the upload using both way (RX and TX) and then as it works it would meant that it is not the issue ?
You can be pretty sure there is no need to check. Using the 3.3v signal out of HC-05 Tx direct into Mega is standard procedure, and the fact that you have already used that connection when you upload is proof that you are looking in the wrong place.
Having said that, I don't really know where the right place is, but I rather suspect it is in the PC bluetooth configuration. If you check the device manager you may find that there are two COM ports related to the dongle. Try both with TerraTerm.
Nick_Pyner:
You can be pretty sure there is no need to check. Using the 3.3v signal out of HC-05 Tx direct into Mega is standard procedure, and the fact that you have already used that connection when you upload is proof that you are looking in the wrong place.
Having said that, I don't really know where the right place is, but I rather suspect it is in the PC bluetooth configuration. If you check the device manager you may find that there are two COM ports related to the dongle. Try both with TerraTerm.
Indeed, I have 3 COM related to BT : COM 10 & 11 (Incoming) and COM 12 (outgoing)
The upload works only on COM12. The point is that when I connect Terra to COM12, HC05 seems to connect (blinking "slowy") but nothing appears on Tera, when I connect on 10 or 11, HC05 doesn't connect (blinking quickly) => only Com12 connect to BT, but then if 'incoming' is on COM 10 or 11, I can't get them
I exchanged my HC05 by a HC06 I have in spare, and guess what ... it works ! I receive data on Tera Term, without changin wiring or whatever. After a quick check it seems that HC06 is not allowing upload, HC05 is much more convenient.
So the issue is coming from HC05 : either the module doesn't work well, or it is the configuration required for the upload in Slave mode (step4 DIY Arduino Bluetooth Programming Shield - Make:) ?
Given the price, I will buy an antoher HC05 from another source, I will see if it's a material issue ...
I let you know
shn13:
The point is that when I connect Terra to COM12, HC05 seems to connect (blinking "slowy")
This depends on what you mean by "blinking slowly", but rather suggests HC-05 is in AT mode, which is one flash about every two seconds. If this is the case, there is no chance of communication, and the event has nothing to do with TerraTerm, or anything else at the PC end. I think it would have quite a lot to do with your wiring, particularly the KEY pin.
"Connected ready to talk" depends on the version. LED steady 'on' is the most common. Others are steady 'off' with occasional flashes.
Getting a result with HC-06 may simply be because this device does not have a KEY pin and is thereby excluded from your wiring error. There may nothing wrong with your HC-05 and the problem is the way you use it, but you probably haven't done any damage. If HC-05 is faulty, it may be due to a solder bridge on the backboard, which should be apparent on close inspection. That is the only fault I have ever heard of.
Nick_Pyner:
This depends on what you mean by "blinking slowly", but rather suggests HC-05 is in AT mode, which is one flash about every two seconds. If this is the case, there is no chance of communication, and the event has nothing to do with TerraTerm, or anything else at the PC end. I think it would have quite a lot to do with your wiring, particularly the KEY pin.
Nick_Pyner:
Who knows? It is down to you to exlain what you mean by "blinking slowly".
You are right. When I pair my computer with HC-05, then led blinks twice (2 flashs in less than 0,1 second) every 2 to 3 seconds
Upload is then working, but no signal back on Serial Monitor
guix => I have the same connection than you (on Mega)
shn13:
When I pair my computer with HC-05, then led blinks twice (2 flashs in less than 0,1 second) every 2 to 3 seconds
OK. That suggests you are in communications mode after all, not AT, and I guess you are using a ZS-040 board.
But pairing and connecting are not the same thing. In order to use the terminal, you must make the conenction with it.
It is not a good idea to connect bluetooth to pins 0,1 when you want to use the serial monitor. Move it to Serial1 instead and alter the commands accordingly. It IS OK to use pins 0,1 if you are communicating with some other device, but you just get to use the serial monitor to look at what is going on, not do anything with it.
Nick_Pyner:
It is not a good idea to connect bluetooth to pins 0,1 when you want to use the serial monitor.
The point is that I would like to upload & have a Serial communication through the same Bluetooth channel . The HC06 worked well when connected on pin 0 & 1, and upload will work only if connected on 0 & 1
I tried Serial communication with the HC05 connected on pin 10 & 11 (using softwareSerial) = nothing again
while whith HC06 it works in the same configuration... it means for me that I have an issue with HC05, and as upload is working well there must be something wrong elsewhere ... I ordered a new one, I will see ...