Go Down

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

jmlat

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 ?

J-M-L

A picture of your module and link to where you got it from could help
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

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


Transceiver Module Bluetooth RF RS232 port série pour Arduino

J-M-L

#3
Jul 28, 2017, 11:12 pm Last Edit: Jul 28, 2017, 11:15 pm by J-M-L
Don't you have something with a higher res? Like taking a picture from your smartphone

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

#4
Jul 29, 2017, 04:49 am Last Edit: Jul 29, 2017, 04:54 am by Nick_Pyner
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.
Quote
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

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 will post again afer tests.

J-M-L

#6
Jul 29, 2017, 09:23 am Last Edit: Jul 29, 2017, 10:02 am by J-M-L
@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)
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

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.

jmlat

Here pictures of my modue

jmlat

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

J-M-L

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

What about \r\n in that order ?

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

#11
Jul 31, 2017, 05:24 pm Last Edit: Jul 31, 2017, 05:29 pm by Nick_Pyner
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.

J-M-L

#12
Jul 31, 2017, 07:03 pm Last Edit: Jul 31, 2017, 07:30 pm by J-M-L
@Nick

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

(What's originally triggered my question was his description:
Quote
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)


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

#13
Aug 01, 2017, 03:33 am Last Edit: Aug 01, 2017, 09:04 am by Nick_Pyner
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.

J-M-L

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
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