Go Down

Topic: HC-06 Configuration (Read 1 time) previous topic - next topic

jmlat

I don't really hit /n or\n, I use Arduino monitor to send commands and i can chose on bottom whic kind of end it send...I tested all of them

About flashing LED , When i'm not connected it flashs about twice per second and when i'm connected it is continius light.
I didn't see special flash when i sent command.

1) I try to connect only 5v input with already discribe reults.
2) If i connect only 3.3V module don't wors
3) If i connect both 5v and 3.3v, no chage compre with 1)
4) Connecting Key to 5v was my first try
5) If i connect key to 3.3v...n differences.

It is not a very new module, i saw i ordered it in 2013 !

J-M-L

Ok

And your code is the very simple code reading from the serial console and sending to a SoftwareSerial instance connected to the BT Rx/Tx and reading from software serial and sending to the console? Can you post that code if any different than that? What baud rate do you Usero discuss with the BT module?

Are you adapting voltage to 3.3V esp from arduino Tx --> BT Rx ?

Hello - Please do not PM me for help,  others will benefit as well if you post your question publicly on the forums.
Bonjour Pas de messages privés SVP, postez dans le forum directement pour que ça profite à tous

Nick_Pyner

#17
Aug 01, 2017, 11:09 am Last Edit: Aug 01, 2017, 11:24 am by Nick_Pyner
About flashing LED , When i'm not connected it flashs about twice per second and when i'm connected it is continius light.
I didn't see special flash when i sent command.
OK that is normal
HC-06 is in AT mode by default so long as it is not connected to a device.
Quote
1) I try to connect only 5v input with already discribe reults.
2) If i connect only 3.3V module don't wors
It is not a very new module, i saw i ordered it in 2013 !
Clearly, it should work on 3.3v. maybe the surprising age of this thing is starting to tell. I assumed it was new because I have been using bluetooth since about 2011 and I have never seen one like it. Maybe that is because it wasn't on the market too long.....

What I would like to know is, have you actually used the module? Quickly trawling through your posts, it isn't entirely clear that you have, and you did not reply about the name it gives you when you paired it with your phone etc.  Clearly, yoiu have made the connection, hence the continuous LED, but that is all it proves, and there could still be a wiring problem. You will see good pictures on the Martyn Currey website.

jmlat

Sorry to did not reply about The nema it give me...Actual the only thing i can do is change the name and i did it often when i try other command . So now it gave me the name i gave it and i can't remember what was its original ones.

And yes i use this module. I tried to change its parameters because i'd like to use t in order to upload sketch to my Arduino MEGA without conecting it by USB.

Nick_Pyner

Quote
can't remember what was its original ones.
LINVOR?
Quote
And yes i use this module.
OK. That proves the wiring is kosher.

jmlat

What do you mean with LINVOR?

Nick_Pyner

LINVOR is the (usual) default name for an HC-06.
HC-05s announce themselves as "HC-05".

jmlat

Nick:
No the original name was not LINVOR but i'm quite sure it contains 06 (for my memory it was HP-06 !)


J-M-L:
My code
Code: [Select]
void setup() {
  // put your setup code here, to run once:
     Serial.begin(115200); // Default communication rate of the Bluetooth module
     Serial3.begin(9600);
     Serial.println("pret");
 
     pinMode(16,OUTPUT);
     pinMode(17,OUTPUT);     
     digitalWrite(16, HIGH);  //+ alim BT
     digitalWrite(17, LOW);   //- alim BT
}

void loop() {
  // put your main code here, to run repeatedly:
   if (Serial3.available()) {
        Serial.write(Serial3.read());
       
    }
    if (Serial.available()) {
        Serial3.write(Serial.read());
    }
}


I dirctly connected
Arduino Rx to Module Tx
Arduino Tx to Module Rx

Nick_Pyner

#23
Aug 02, 2017, 03:43 pm Last Edit: Aug 02, 2017, 03:49 pm by Nick_Pyner
No the original name was not LINVOR but i'm quite sure it contains 06 (for my memory it was HP-06 !)
OK, I did say "usually", most would have said "always", but the way things are with this device of yours, I'll believe anything. I guess the "06" suggests it is an HC-06. If it said "HC-05" it would put the matter truly to rest.

In the code, I assume Bluetooth is on Mega's Serial3, and you simply have the comment on the wrong line. I don't think you are sure to do damage by directly connecting Arduino Tx to bluetooth, but it is good practice to use a 1k/2k voltage divider thereto. You will see diagrams to this effect on Martyn's website.

You might find the following background notes useful. They are really for the rawest of newbies but there is actually a basic one-shot configuration programme for HC-06 on a Mega.

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

If you can get this circus sorted out, I would like to add the experience to these notes - possibly with advice to avoid this particular module.

J-M-L

I would try powering the BT not from pins 16/17 just in case your module needs more current at painring time (usually 20 to 30mA, but I've seen more)

Hello - Please do not PM me for help,  others will benefit as well if you post your question publicly on the forums.
Bonjour Pas de messages privés SVP, postez dans le forum directement pour que ça profite à tous

jmlat

Nick:
Quote
In the code, I assume Bluetooth is on Mega's Serial3, and you simply have the comment on the wrong line
Yes you're right : bad comment !

I don't understand what for 1k/2k divider : standard communication mode works well !
I will have a look on your links


 J-M-L:
I use pins 16/17 because 5v is already used...but i'll try to connect on 5V to AT mode

J-M-L

#26
Aug 03, 2017, 03:09 pm Last Edit: Aug 03, 2017, 03:12 pm by J-M-L
Your 5V pin can give lots more current than your digital pins - if you can't stick two wires in your 5V pin, there is a Vcc  (male) on the ICSP 6 pins port

The 1k/2k divider is to adapt voltage from 5V to 3.3V - see (in French) pont diviseur de tension / (or in English) Voltage divider. This might be needed if your Rx on the BT side is not protected as your arduino Tx will send a HIGH as 5V
Hello - Please do not PM me for help,  others will benefit as well if you post your question publicly on the forums.
Bonjour Pas de messages privés SVP, postez dans le forum directement pour que ça profite à tous

Go Up