I have a Seedstudio Bluetooth Shield V2.0 and an Arduino Uno.
GOAL: I want to test these this by any testing means. This means, through CoolTerm or ANY iOS app to test that I can establish a blue tooth connection.
I connected the Seedstudio Bluetooth with the Arduino Uno. I used this simple code for this device to act as the slave from this website: http://www.seeedstudio.com/wiki/Seeed_BLE_Shield_v1
Slave BLE Code:
#include <SoftwareSerial.h> //Software Serial Port
#define RxD 2
#define TxD 3
#define DEBUG_ENABLED 1
SoftwareSerial BLE(RxD,TxD);
void setup()
{
Serial.begin(9600);
pinMode(RxD, INPUT);
pinMode(TxD, OUTPUT);
setupBleConnection();
}
void loop()
{
char recvChar;
while(1){
if(BLE.available()){//check if there's any data sent from the remote BLE shield
recvChar = BLE.read();
Serial.print(recvChar);
}
if(Serial.available()){//check if there's any data sent from the local serial terminal, you can add the other applications here
recvChar = Serial.read();
BLE.print(recvChar);
}
}
}
void setupBleConnection()
{
BLE.begin(9600); //Set BLE BaudRate to default baud rate 9600
BLE.print("AT+CLEAR"); //clear all previous setting
BLE.print("AT+ROLE0"); //set the bluetooth name as a slaver
BLE.print("AT+SAVE1"); //don't save the connect information
}
ISSUE: Now that is done, how am I supposed to establish a connection between the slave and Master, where the master device is my iOS device (iPhone)? Is there an app you guys know where on APP store where I can test this? I took the CoolTerm approach as well, am I not doing something correct on CoolTerm? Because I went on CoolTerm and sent a string "AT" and I got a response back on CoolTerm saying "OK", but when I sent the string "AT+ROLE0", I get no response back on the CoolTerm. (I followed the directions on the website linked, they said to use CoolTerm).
Let me know of what I should do.
Thank You.