Patent ID: 8346213

Claim:
A method of protecting AT commands during the interaction between an AT command module of a mobile terminal and a serial communication unit of an external device, comprising the steps of: (1) receiving said AT commands from said serial communication unit to said AT command module; (2) putting said AT command module into an ID verification mode, wherein said AT command module receives a username and password from said serial communication unit in turn, and verifies said received username and password, comprising the steps of: (a) sending information for prompting a user to input a username, and entering into a username input state; (b) receiving a character string from said serial communication unit, remotely processing display of said character string according to a flag variable so as to display said inputted character string, and recording said character string as a username; (c) sending information for prompting a user to input a password, and entering into a password input state; and (d) receiving a character string from said serial communication unit, remotely processing display of said character string according to a flag variable so as to hide said inputted character string, and recording said character string as password; and (3) when said ID verification is successful, putting said AT command module into an AT command processing state, wherein both step (b) and (d) comprise steps of: reading said received character from a receiving buffer; and determining whether said received character is password according to said flag variable; when said received character is password, sending a hidden character to said serial communication unit; when said received character is not password, sending said character back to said serial communication unit.