How to enter AT mode in HC-05 bluetooth module

The 9600 is the setting the HC-05 uses on the RX and TX pins when paired with another bluetooth device and it's actually communicating over the air. When you hold the key pin high at 3.3V while powering up the HC-05 (or some HC-05s have a key button you hold while powering up the HC-05) it goes into programming mode at 38400. If you do not hold the key pin high at 3.3V while powering up, but instead you later connect the key pin high, it goes into programming mode at whatever baud rate you or somebody else set previously with the AT+UART command. Since you may not remember or know what baud rate it was last set for, the special programming mode which always uses 38400 is there for you, so you don't have to hunt through many possible baud rates to establish a programming connection to re-program it.