Ersetze mal
mit
Serial.print("CMD: "); Serial.println(cmd); cmd = "";`
Was kommt bei BT und was bei Serial heraus?