How do I disable/enable command mode?

AT%DC command controls command mode.

%DC0 - ENABLE COMMAND MODE
%DC1 - DISABLE COMMAND MODE
Once COMMAND mode is disabled, to enable it you must power cycle the modem and then you have about 10 seconds to give the command AT%DC0 to enable it.