Change the name of my bluetooth module hc06

r1erick2

New Member
HI, I'm tried to change the name of my HC-06 Bluetooth module, anybody has any idea how to change the name and pin code? I tried using this code

setfreq m8 'nécessaire pour disposer du débit de 9600bauds
high B.5 'avec B.5 reliée à Rxd du HC06
serout B.5, T9600_8,("AT+NAME") 'pas de cr, lf !
serout B.5, T9600_8,("PICAXE01")'pas de cr, lf !

but doesn't work..

thank you.
 

hippy

Technical Support
Staff member
You perhaps need a PAUSE before the first SEROUT and after the second, and it might be worth issuing a couple of AT commands to ensure it is in the correct mode and ready for the AT+NAME command. Untested -
Code:
setfreq m8 'nécessaire pour disposer du débit de 9600bauds
high B.5 'avec B.5 reliée à Rxd du HC06
Pause 2000
serout B.5, T9600_8,("AT")
Pause 2000
serout B.5, T9600_8,("AT")
Pause 2000
serout B.5, T9600_8,("AT+NAME") 'pas de cr, lf !
serout B.5, T9600_8,("PICAXE01")'pas de cr, lf !
Pause 2000
PAUSE 2000 is a one second delay at 8MHz.
 

PhilHornby

Senior Member
See this Web Site: http://www.martyncurrey.com/hc-06-zg-b23090w-bluetooth-2-0-edr-modules/

It probably doesn't contain any new technical information, but in the comments section, there are a few (recent) complaints about HC-06 modules that do not respond to "AT" mode, even though they otherwise work. One user reports the default baud rate to be 38400, not 9600!

I don't think it is your under-lying problem, but I think you should only use one Serout command: serout B.5, T9600_8,("AT+NAMEPICAXE01") - otherwise you will introduce a slight pause into the datastream. The HC-06 uses some unknown timeout value, to determine the end of the command.

I would use a Terminal Emulator program (such as Putty) to configure the Name, Pin (and baud rate) - partly because it easier to see what is happening, and partly, because it only needs doing once anyway. You will need a separate USB<-->Serial adaptor, such as this one. Don't forget to set it to 3V3 mode, or use level shifting resistors.

(The HC-05 is a bluetooth module, which is much simpler to work with, yet has much more functionality. It is very similarly priced to the HC-06.)
 

r1erick2

New Member
No works. :(.. the breadboard has the resistors.

I tried all but nothing, actually, I used a serial FTD1232 using the software Tera Term even Arduino UNO too, the HC-06 does not respond back, I changed the baud speed and nothing maybe has a lock in the system or other AT code because it looks so different, has a smaller chip on the board, It has the BK3231 and looks so different from the others HC bluetooth chips, the Bluetooth key name is JDY-30 and BT04-A, I bought around 10 and I tested all.

I recommend this APP for Android it is awesome for serial monitor or create any control.

http://www.keuwl.com/electronics/rduino/bluet/09-baud-rate//


20181216_185925.jpg

any help will be ok...

thank you...
 
Last edited:

PieM

Senior Member
Hi,

With BK3231 chip , test with : serout B.5, T9600_8,("AT+NAMEPICAXE01" ,cr,lf)
 

hippy

Technical Support
Staff member
With BK3231 chip , test with : serout B.5, T9600_8,("AT+NAMEPICAXE01" ,cr,lf)
This does seem to be a common problem with 'clone modules'; not all modules are the same, not all use the same silicon, not all run the same firmware, not all have the same default settings or configuration, nor support the same commands in the same way.

Products sold are sometimes not actually a clone of the original module they are sold as even if they offer similar functionality.

The best way to discover what any particular module controlled over serial supports is to wire their UART via a MAX232 or similar inverter, connect to a PC serial port, and run a terminal emulator to see what the baud rate is, what commands work, what responses are, and the times taken for such responses.
 

PieM

Senior Member
With HC05, HC06, HC11, HC12, i use pl 2303 USB to TTL Serial Adaptor ($0.65 on Ali !) and direct wires.
I run Termite with BT and HC11/HC12 config with transceivers
 

coparu67

Senior Member
This program works fine with my HC-06s

setfreq m8
output C.6
input C.7

do while b0=0
serout C.6, T9600_8, ("AT+NAMEROBOTICS")
pause 500

serin [500], C.7, T9600_8, b0,b1,b2,b3,b4,b5,b6,b7,b8,b9
debug
loop
 
Top