bluetooth bee -standalone + xbee shield v2.0

I cannot get this setup to be recognized by my android phone.

I have a standalone bluetooth bee mounted in a xbee sheild v2.0 I then have that mounted on a osepp uno rs plus arduino compatible board.

I have the arduino powered up with the usb from my laptop. The lights on the shield and the bluetooth bee light up. - green on the shield and flashing blue on the bluetooth.

I have tried uploading the code to the arduino that is on the bluetooth bee wiki page and my android will not see it.

Any ideas where I am going wrong here?

I made some headway here. I uploaded some code found on an arduino basics blogspot website.

This is what i loaded onto the arduino:

/* This project combines the code from a few different sources.
This project was put together by ScottC on the 15/01/2013

Bluetooth slave code by Steve Chang - downloaded from : … oth_Shield

Grove Chainable RGB code can be found here : … troduction


#include <SoftwareSerial.h> //Software Serial Port

#define uint8 unsigned char
#define uint16 unsigned int
#define uint32 unsigned long int

#define RxD 6 // This is the pin that the Bluetooth (BT_TX) will transmit to the Arduino (RxD)
#define TxD 7 // This is the pin that the Bluetooth (BT_RX) will receive from the Arduino (TxD)


int Clkpin = 9; //RGB LED Clock Pin (Digital 9)
int Datapin = 8; //RGB LED Data Pin (Digital 8)

SoftwareSerial blueToothSerial(RxD,TxD);

void setup() {
Serial.begin(9600); // Allow Serial communication via USB cable to computer (if required)
pinMode(RxD, INPUT); // Setup the Arduino to receive INPUT from the bluetooth shield on Digital Pin 6
pinMode(TxD, OUTPUT); // Setup the Arduino to send data (OUTPUT) to the bluetooth shield on Digital Pin 7
pinMode(13,OUTPUT); // Use onboard LED if required.
setupBlueToothConnection(); //Used to initialise the Bluetooth shield

pinMode(Datapin, OUTPUT); // Setup the RGB LED Data Pin
pinMode(Clkpin, OUTPUT); // Setup the RGB LED Clock pin


void loop() {
digitalWrite(13,LOW); //Turn off the onboard Arduino LED
char recvChar;
if(blueToothSerial.available()){//check if there’s any data sent from the remote bluetooth shield
recvChar =;
Serial.print(recvChar); // Print the character received to the Serial Monitor (if required)

//If the character received = ‘r’ , then change the RGB led to display a RED colour
Send32Zero(); // begin
DataDealWithAndSend(255, 0, 0); // first node data
Send32Zero(); // send to update data

//If the character received = ‘g’ , then change the RGB led to display a GREEN colour
Send32Zero(); // begin
DataDealWithAndSend(0, 255, 0); // first node data
Send32Zero(); // send to update data

//If the character received = ‘b’ , then change the RGB led to display a BLUE colour
Send32Zero(); // begin
DataDealWithAndSend(0, 0, 255); // first node data
Send32Zero(); // send to update data

//You can use the following code to deal with any information coming from the Computer (serial monitor)
recvChar =;

//This will send value obtained (recvChar) to the phone. The value will be displayed on the phone.

//The following code is necessary to setup the bluetooth shield ------copy and paste----------------
void setupBlueToothConnection()
blueToothSerial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400
blueToothSerial.print("\r\n+STWMOD=0\r\n"); //set the bluetooth work in slave mode
blueToothSerial.print("\r\n+STNA=SeeedBTSlave\r\n"); //set the bluetooth name as “SeeedBTSlave”
blueToothSerial.print("\r\n+STOAUT=1\r\n"); // Permit Paired device to connect me
blueToothSerial.print("\r\n+STAUTO=0\r\n"); // Auto-connection should be forbidden here
delay(2000); // This delay is required.
blueToothSerial.print("\r\n+INQ=1\r\n"); //make the slave bluetooth inquirable
Serial.println(“The slave bluetooth is inquirable!”);
delay(2000); // This delay is required.

//The following code snippets are used update the colour of the RGB LED-----copy and paste------------
void ClkProduce(void){
digitalWrite(Clkpin, LOW);
digitalWrite(Clkpin, HIGH);

void Send32Zero(void){
unsigned char i;
for (i=0; i<32; i++){
digitalWrite(Datapin, LOW);

uint8 TakeAntiCode(uint8 dat){
uint8 tmp = 0;
if ((dat & 0x80) == 0){
tmp |= 0x02;

if ((dat & 0x40) == 0){
tmp |= 0x01;

return tmp;

// gray data
void DatSend(uint32 dx){
uint8 i;
for (i=0; i<32; i++){
if ((dx & 0x80000000) != 0){
digitalWrite(Datapin, HIGH);
} else {
digitalWrite(Datapin, LOW);

dx <<= 1;

// data processing
void DataDealWithAndSend(uint8 r, uint8 g, uint8 b){
uint32 dx = 0;

dx |= (uint32)0x03 << 30; // highest two bits 1,flag bits
dx |= (uint32)TakeAntiCode(b) << 28;
dx |= (uint32)TakeAntiCode(g) << 26;
dx |= (uint32)TakeAntiCode® << 24;

dx |= (uint32)b << 16;
dx |= (uint32)g << 8;
dx |= r;


I was able to get my android to recognize the bluetooth finally. Unfortunately when it asks me to pair with a code it just get the message “unable to communicate with seeedbtslave”.

I know its a code issue now but I have no idea where to go from here. Where can I get the proper code to get this to work?

I don’t tried your code, but there’re two prepared things you need to pay attention to:

  1. Did red and blue led blinks 1time / 2s in interval while connecting?

  2. Could you see the SeeedSlave (or MAC address ) on the setting of your phone? And did you pair your Android phone with bluetooth bee - standalone here?

BTW, here is the wiki of Bluetooth bee - standalone: … Standalone