@fomi thanks for reply fomi, I have a question. I want the code not for AT command, but for ClassA automatic operation. Is the code you preferred different from this one ?
Moreover, I programmed the code you suggested, but when I want to send it an string through serial connection, I receive "The Hard Fault exception occurs,Reset!". I don't know why?