RN42 module to module control of pin output

Hello,

I am trying to control the pin output (high/low) on a RN42XVP-I/RM module, by sending commands from a Bluetooth Mate Silver controlled by an arduino pro mini.

I have connected both modules to my PC and removed the need for authentication (SA,0 , R,1).

I can connect the devices, but I am unable to put the slave module into command mode and then send commands to change pins high and low (s*,0400 and s*,0404).

My code so far is below. This connects the devices, as shown by a constant LED on the slave module, but once connected, I cannot work out how to put the slave device into command mode and control the pin output. Any help would be great!

Serial.begin(115200);                  // Begin the serial at 115200bps
  delay(100);
  
  Serial.print("$");                     // Enter command mode
  delay(100);
  Serial.print("$");
  delay(100);
  Serial.print("$");                     
  delay(100);                            

  Serial.println("SM,1");                // Set to master
  delay(100);
  
  Serial.println("C,00066612345A");      // Connect to other bluetooth device
  delay(100);

Thanks