HC-06 Not responding to commands

I’m trying to change the settings on an HC-06 (such as device name/pin) with an Arduino nano and am having issues with it. I’ve tried some programs all similar to the attached one and none work. The bluetooth transmitter transmits and receives perfectly however this isn’t working. I don’t know what to try next. Any ideas?

PROG.ino (637 Bytes)

My first idea is that You read the first topics like "How to use Forum", "How to attache code". Using the phone I can't dowload any file.