Bluetooth Mate Silver Master-Slave communication with a computer

I have successfully connected my two bluetooth mate silver modules to one another, these are connected to two Arduino pro minis respectively. I send an oscillatory binary value from the slave to the master, this triggers an LED to turn on/off as this data is received. The issue I am facing is that the devices’ COM ports are occupied when this is happening (signalled by a green light on the Bluetooth modules) and as such, I cannot extract data from the master to the PC. I would like to know if the Bluetooth mate silver is capable of SENDING DATA TO THE COMPUTER WHEN IN MASTER/SLAVE MODE?

This is the Bluetooth module embedded in my pc: Qualcomm Atheros QCA9377 Bluetooth 4.1

I have attached my code below.

//MASTER

String slaveMAC = “000666FB9C03”;

int led = 10;

int val = 0;

void setup()

{

Serial.begin(57600);

Serial.print(“$$$”); // enter command mode

delay(100);

Serial.println(“SU,57”); // set baud rate to 57600

delay(100);

Serial.println(“C,” + slaveMAC + “\r”); // connect to slave device

delay(100);

Serial.println(“SM,1”); // set device to master

delay(100);

//Serial.println(“—,” + slaveMAC + “\r”); // exit command mode, enter data mode

Serial.println(“—\r\n”); // exit command mode, enter data mode

delay(100);

pinMode(led,OUTPUT);

digitalWrite(led,HIGH);

}

void loop()

{

if(Serial.available() > 0)

{

val = Serial.read();

}

if(val == ‘1’)

{

digitalWrite(led,HIGH);

Serial.println(“Hello”);

val = 0;

}

else if(val == ‘0’)

{

digitalWrite(led,LOW);

val = 0;

}

delay(10);

}

//SLAVE

String masterMAC = “000666EBE858”;

int val = 20;

void setup()

{

Serial.begin(57600);

Serial.print(“$$$”); // enter command mode

delay(100);

Serial.println(“SU,57”); // set baud rate to 57600

delay(100);

Serial.println(“C,” + masterMAC + “\r”); // connect to slave device

delay(100);

Serial.println(“SM,0”); // set device to slave

delay(100);

Serial.println(“—\r\n”); // exit command mode, enter data mode

delay(100);

}

void loop()

{

if(Serial.available() > 0)

{

val = Serial.read();

}

Serial.println(‘1’);

delay(1000);

Serial.println(‘0’);

delay(1000);

}

Hi Tom,

I would need more information to be certain, but I think the issue you are running into here is bus contention with your serial lines from the Pro Minis. If you have the Bluetooth Mates connected to the hardware UART pins (D1 and D0), that will occupy serial communication between the Pro Mini and the computer while the Bluetooth module is transmitting.

If you use SoftwareSerial for the serial traffic for your Bluetooth modules, that will free up the hardware UART on the Pro Minis to talk to the computer. [This section of the Bluetooth Mate Hookup Guide goes into that a bit more in detail.

If you are using SoftwareSerial for your serial communication between Pro Mini and Bluetooth Mate or using that does not fix the issue, let us know and we can troubleshoot further.](Using the BlueSMiRF - SparkFun Learn)