How to set the communication mode of the terminal