Fail: My old HC-05 Bluetooth module was an HC-06 and it only took me a week to figure it out.
Sometimes you make bad assumptions and they lead you into the alley for a week. Then you figure it out and get back on the path to getting stuff done.
I spent a week trying to reconfigure my Bluetooth HC-05 module to a higher data rate. I tried the key pin. Then I tried strapping the mode switch pin to 3.3 volts. Nothing worked. My devices were 8 years old so I assumed the missing buttons on my devices were just a versioning thing
My HC-06 Devices JY-MCU |
I was just stuck with 9600 bps which is not cool because causes its own issues https://joe.blog.freemansoft.com/2023/01/replicating-micropython-repl-across-hc.html
I did notice something weird it always responded to the AT command when connected to a terminal prompt. It just didn't respond as expected to the AT commands. I couldn't type any of the expected commands.
Eventually, I ran across this instructable that said that the board with my markings was probably actually an HC-06 which was always in command mode. This was originally an HC-05 article that had HC-06 content added later. That mix of content was enough to recognize the issue.
- https://www.instructables.com/AT-command-mode-of-HC-05-Bluetooth-module/#:~:text=For%20HC05%3A%20Type%20%22AT%22,name%2C%20type%20AT%2BNAME.
Communicating with the HC-06
The HC-06 is always in AT command mode. You don't strap one of the pins to switch from data to command.
The HC-06 AT command mode expects the entire command to be entered within 1 second. This is part of the reason only bare AT was accepted. I took longer than a second to enter the command. The Bluetooth adapter started responding as an HC-06 when I pasted the commands into the window instead of typing. Note that you never need a return character. Just paste the whole line as is with no extra spaces or returns.
- AT
- Replied: OK
- AT+NAME
- Replied: setname
- AT+VERSION
- Replied: linvorV1.5
- AT+NAMEMOD2
- Replied: <i don't remember>
- Changes the name to MOD2
- AT+BAUD8
- Replied: OK115200
- Changes the device RX/TX rate to 115100
Comments
Post a Comment