HC-05 sends endless println messages and does not respond

GolamMostafa:
When I have changed your if-else structure into switch-case structure

On its own changing between IF-ELSE and SWITCH-CASE could not possibly make any difference to a program.

...R