HC-06 Configuration

Hello,
I use an HC-06 BT module conected to Arduino MEGA.
I'm not sure it is HC-06 but it have six pins (gnd,5V,3.3V,Rx,Tx,Key).
I want to configure it in order to change passsword and birate (i want be able to upload setch with it).

So as i saw on some posts I connect Key to 5V
Then I should be able to change parameters.

My problem is
When I send AT I received nothing
When I send AT+NAMEname My module confirm with OKsetName
When I send other instruction (AT+NAME?, AT+PSWDxxxx....) nothing happenin !

On the other hand I read that when module is in configutation statement it can't communcate.
but I can connect it and communicate with my phone as soon as I sent AT+NAMEname...

I also red that the module LED change its speed when in configuration ...not mine !

Is somebody have an idea about my troubles and can help me ?

A picture of your module and link to where you got it from could help

hereis a picture, I bought it on Amazone but it is not available anymore !

Transceiver Module Bluetooth RF RS232 port série pour Arduino

41poVdPlj1L.SY90-1.jpg

Don’t you have something with a higher res? Like taking a picture from your smartphone

Don't bother, a picture isn't going to tell us anything, and there is no need to remember where you got it from either. You have already said that it has 6 pins, and that means it isn't an HC-06, it's an HC-05. A far more useful input would be what's going on with the status LED. If it is flashing fast, about 2Hz, you are no longer in AT mode, and hence no AT responses.

When I send AT+NAMEname My module confirm with OKsetName

If you have had one OK back from it, after connecting to the KEY, it means two things for certain.

  1. Yes, you have an HC-05
  2. You are using the right procedure - if rather haphazardly

I think your problem may be down to three possibilities

  1. You have HC-05 on a later board, one that has a little button, and you are not using it properly. I don't think this is likely, as I think the KEY pin suggests you have a JY-MCU board, and no button.

  2. You have a sloppy temporary connection to the KEY pin

  3. You are not using the proper endings to your commands - or using endings that you shouldn't

Check the Martyn Currey website. He is the guru and specifically covers button and no-button methods

OK it seems it is an HC-05 ...

I have no button on board

I looked at the Maryn Curre website and didn't find the exacly same board but I will try different procedures (upercase, lowercase...)

I already tried /r/n , /r , nothing but with no more result !

I will post again afer tests.

@Nick

May be a picture to you won't help and you know all the components out there?

Agree the one major visual difference between 05 and 06 is the 6 versus 4 pins set up - I've tons of those things in various incarnations in my drawers - so I was curious to see if I would recognize one.

When it comes to the source - For example this is sold as a 6 pin HC-06

So would still be of interest....

@jmlat - try connecting your key to 3.3 V not 5v some of those components Are not 5v tolerant and you might need To adapt the 5v Tx from your arduino to the 3.3 v the BT module Rx expects (most are fine at 5v, key might be a bit more sensitive - hopefully you did not burn it)

jmlat:
OK it seems it is an HC-05 ...

I have no button on board

I looked at the Maryn Curre website and didn't find the exacly same board but I will try different procedures (upercase, lowercase...)
I already tried /r/n , /r , nothing but with no more result !

I'm sure you have proven it is an HC-05 by virtue of using the KEY and actually getting a response. Unless Martyn has something to say about it, I believe there are essentially two types of HC-05 - those on a board with a button, and those without. The procedures are slightly different but I'm sure the code is the same. Of course this is your golden opportunity to come up with something nobody has seen before, but you might clarify things by coming forth with which particular breakout board you are using. This is usually clearly marked on the back as a code e.g. JY-MCU ( never has a button) or ZS-040(sometimes has a button, sometimes not). I'm guessing you have a JY-MCU

If you are certain that you have had a response before, this can't be a serious problem - just something stupid that will likely only happen once.

Here pictures of my modue

I tried

Uppercase
-no endline
-/n
-/r
-/n/r

Lowercase
-no endline
-/n
-/r
-/n/r

38400 Bds
9600 Bds

The only way to have a response to AT+NAMEtest is 9600Bds Uppercase /n/r
but no response to AT…

Do you really mean / or have you actually been using backslash ()

What about \r\n in that order ?

Two questions:

  1. When you connect power, do you see a flashing LED?
  2. What name did bluetooth originally respond with when you paired it with your phone?

(I understand you have used it)

I said somewhere above that this is your golden opportunity to come up with something nobody has seen before, and it looks like you might have done exactly that - a dual voltage HC-06. I must admit that when you said six pins, that was enough but, now I look at the rest, I see a new twist, and that is clear on the pictures you posted. I'm struggling to explain all the events, but you said you have an HC-06, and I think you might be right and, while you have a six-pin header, the KEY pin is either unused, or is for some test I don't know about. If so, what this means is that all this stuff about buttons and keys is immaterial.

Although there is still much mystery, the reasons for thinking you have an HC-06 are:

  1. You never responded to my comment about the LED flashing, and perhaps for good reason - you have no idea what I'm talking about, and don't need to..

  2. You have had some action at 9600, which is the AT Mode speed of an HC-06. HC-05 AT mode is 38400, and this cannot be changed, i.e. configuring an HC-05 at 9600 won't get you any joy.

  3. I believe this is a modern board, and thus it would probably have a button if it was for HC-05.

  4. The solder connections in the picture suggest that pin 31 is not connected but pin 24 is. Pin 31 is the LED pin for HC-05, while pin 24 is LED pin for HC-06, and I assume you have seen it flashing.

I have never seen a 6pin HC-06 before, but dual voltage goes some way to explain it.

If you check Martyn's site for configuring HC-06, you might get a result. I believe commands are all capitals, no line feeds or cr, but I just use a one-shot programme, no monitor.

@Nick

Glad you finally agree that a picture is actually worth something :slight_smile:

(What's originally triggered my question was his description:

I'm not sure it is HC-06 but it have six pins (gnd,5V,3.3V,Rx,Tx,Key).

@jmlat - you might have this HC-06 one (or that HC-05 one)

I have already said what I need to say on this in reply #11, and grovellingly admitted that I missed OP’s actual description of the pins. As for your link, the first almost certainly isn’t an HC-06 anyway, but I saw no point in arguing about it.

Hi Nick - My point was not about arguing - your input was totally relevant - just that I've seen many crazy things sold out there from china that are wrongly labeled or designed in weird ways that I found it's no good enough to trust a label when behavior is not what is expected

@jmlat - you have not answered about the / versus , sending \r\n versus \n\r, connecting key to 3.3V instead of 5... a few more things for you to explore

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 !

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 ?

jmlat:
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.

  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.

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.

can't remember what was its original ones.

LINVOR?

And yes i use this module.

OK. That proves the wiring is kosher.