HM-10 Bluetooth AT command from Arduino Uno

This works from serial monitor at any point during the program

  char c=' '; 

 if (Serial.available())
    {
        c = Serial.read();
 
        // do not send line end characters to the HM-10
        if (c!=10 & c!=13 ) 
        {  
             BTserial.write(c);
        }

but when you try to directly write the AT command to BTserial
it fails to configure module ?????
How can the HM-10 distinguish between the two ?????