Bluetooth Mate Auto reset for Arduino Wireless Programming

Ok i figured it out, after a days worth of work and a lot of research.
Some thanks to Bill Welch and his info in this link, http://bvwelch.com/?p=186

Preparing the Bluetooth mate silver.
to program/change settings on the Bluetooth mate silver i used the FTDI basic board http://www.sparkfun.com/products/9716, and connected it up like this

**FTDI ** Mate silver.
Gnd -> Gnd
Vcc -> Vcc
RX -> TX
TX -> RX

You then have to set up the Bluetooth module. You can do it from this tutorial http://www.jhwarren.com/bluetooth-mate/ from the "Setting up Bluetooth" title
Remember the COM port that the pc has assigned to the Bluetooth module. There should be two that show up, but it is the lowest value we want.

To configure the RN-42 (Bluetooth module) you need a serial terminal software, I don’t think you can do it from the Arduino IDE serial window. You can use puTTY but I like to see what I’m typing into the serial screen so i used X -CTU http://www.digi.com/support/kbase/kbaseresultdetl.jsp?kb=125
It is used for Xbees, but you can still use the terminal.
Once its installed and opened, in the “Com Port Setup” box select the port that your FTDI board is on, mines usually one of the lower valued one. Once you have selected what you think it might be, go to the Baud dropdown tab and select 115200. This is the default baud rate for the Bluetooth module. Then select the terminal tab and type the following in the space below, it’s not case sensitive.

Note if the terminal comes up with an error then it is not the right com port or the device is not connected. Or if nothing happens when you type in $$$ then it’s the wrong com port, (or bud rate, but very unlikely if you have never used the BT module before)

Type the following

$$$ // enter command mode, you should see the red light flash more frequently on the BT module
SU,57.6 [-Press enter] // Changes the baud rate to 57600
S~,3 [-press enter] // sets the profile to DMD
--- [-press enter] // ends command mode

Additional commands
D - Display basic settings
SF,1 - factory reset.
For the entire list of commands see the link http://www.sparkfun.com/datasheets/Wireless/Bluetooth/rn-bluetooth-um.pdf

After altering the settings you need to reset the module, so just pull the power then repower it again.

Connecting to a Arduino mini pro
First off, an additional wire needs to be soldered onto the RN 42, pin 33 (remote DTR) see this datasheet for the location of pin 33
http://www.rovingnetworks.com/documents/RN-41.pdf - i know its the RN 41 but basically has the same pin out as the RN 42, look under "Pin description" for the location of pin 33 (4th from the left)

If you are having trouble with Arduino IDE being really slow when your Bluetooth is on, follow this thread http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1237179908/0

The Arduino mini pro needs to be connected to the Bluetooth mate in this configuration

Arduino Bluetooth mate
Gnd/ BLK -> Gnd
Gnd/CTS -> CTS - I
Vcc -> Vcc
RX -> TX
TX -> RX
GRN/DTR -> PIN 33 (remote RTS) – newly soldered wire. I used a 0.1uF cap between these connections because that is what is used when making a bread board Arduino for an auto reset using an FTDI.

Once connected, write your own sketch or use the one provided.

int ledPin = 13;
void setup() {
  Serial. begin(57600) ; 
  pinMode(ledPin, OUTPUT) ; 
}
void loop() {
  // Look for data coming in from the Bluetooth Mate
  if (Serial. available() > 0) {
    char data = Serial. read() ; // Read the character
    Serial. print(data) ;        
    
    // ' 1' turns on the LED, ' 0' turns it off
    if (data == '1' ) {
      digitalWrite(ledPin, HIGH) ;
    } else if (data == '0' ) {
      digitalWrite(ledPin, LOW) ;
    }
  }
  delay(10) ;
}

Make sure the correct board selected in the tools menu and the right COM port is selected, (the one I told you to remember earlier)

Press upload and hopefully success!

UPDATE I think you have to change the rxtxSerial.dll file in the arduino folder with one that can be downloaded from the thread mentioned above http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1237179908/0. I cant really test if the origional rxtxSerial.dll file works in uploading because the IDE becomes way to slow for me to try it (when my laptop's Bluetooth is on).