Bluetooth HC05 - Configuration/Communication mode

Hi:

I just wanted to know if I can establish a connection with my HC05 bluetooth module and then change to a configuration mode to change name, baud rate or other setting by sending some char value.

Example:

If the bluetooth module receives a "1" it would change the KEY pin to LOW and the Communication mode is enabled, but if it receives a "0" the configuration mode change the KEY pin to HIGH and I'm able to sent AT Commands.

I noticed that when I send the char "0" I lose the communication with the HC05 using my cellphone. Should I need to re-connect to the module?

Thanks.

alf007: I just wanted to know if I can establish a connection with my HC05 bluetooth module and then change to a configuration mode to change name, baud rate or other setting by sending some char value.

Not directly. Bluetooth is either in configuration made or communications mode/ You cannot talk to it and configure it. I guess you could send commands to Arduino, which could then take it out of communication mode, configure it, and then put it back into comms mode.

I noticed that when I send the char "0" I lose the communication with the HC05 using my cellphone. Should I need to re-connect to the module?

If you wish to regain communications, it sounds like a good idea. A much better idea would be to find out why you should lose communication when you send "0". More to the point, if what you say is true, and it probably isn't, find out why it does not happen if you send something else. Please don't tell us you are using a 9v PP3 battery to powewr Arduino.

Thanks Nick! I'll check my code and see what happends.