usb Arduino, xbe shield, bluetooth bee

wireless communication and related Bees.

Moderators: lily.li, violet, jessie

Post Reply
arduinow
Pre-kindergarten
Pre-kindergarten
Posts: 6
Joined: Thu Oct 15, 2009 5:19 pm

usb Arduino, xbe shield, bluetooth bee

Post by arduinow » Thu Oct 14, 2010 9:43 pm

Hi,

I have the following xbee shield to interface the bluetooth bee to a normal arduino board.
http://www.littlebirdelectronics.com/pr ... hield.html

I've managed to enable the bluetooth bee to set masteror slave, and enable inquiry mode through realterm program via usb/computer.

But i'm looking to bypass realterm and just send the commands from arduino.

Is that possible? I've been trying

Serial.write("\r\n+STWMOD=0\r\n");
Serial.write("\r\n+INQ=1\r\n");

Any help with code would be appreciated. thanks.

Icing
Elementary-1
Elementary-1
Posts: 140
Joined: Wed Oct 21, 2009 10:39 pm

Re: usb Arduino, xbe shield, bluetooth bee

Post by Icing » Fri Oct 15, 2010 1:15 pm

Hi,

For the hardware connection, please refer tohttp://www.seeedstudio.com/forum/viewto ... hilit=XBEE

For the code, I think after
"Serial.begin(38400);"
then
"Serial.print("\r\n+STWMOD=0\r\n");
Serial.print("\r\n+INQ=1\r\n");"
is ok.

May this helpful to you, and let me know if you have any question.

Regards,

-Icing

arduinow
Pre-kindergarten
Pre-kindergarten
Posts: 6
Joined: Thu Oct 15, 2009 5:19 pm

Re: usb Arduino, xbe shield, bluetooth bee

Post by arduinow » Fri Oct 15, 2010 3:23 pm

Hi,

Thank you for your response. I was successful in transmitting data from the bluetooth bee to my mobile phone.

I found that with just the inquiry command Serial.print("\r\n+INQ=1\r\n"); in setup, it was enough to keep the device in inquiry mode.
void setup() {
Serial.begin(38400);
//Serial.print("\r\n+STWMOD=0\r\n");
Serial.print("\r\n");
Serial.print("\r\n+INQ=1\r\n");
}

I had to borrow the original xbee shield with jumper pins to get it to work. I think I have resolder my shield's pins.

As a side note, I discovered the normal 'L' shaped xbee shield cannot be put ontop of the electronic brick shield due to placement of the shield's pins, not accepting ICSP pins. I don't use ICSP that often but some other shields still utilise it, might be something nice to have in the next revision.


Thanks again.

Icing
Elementary-1
Elementary-1
Posts: 140
Joined: Wed Oct 21, 2009 10:39 pm

Re: usb Arduino, xbe shield, bluetooth bee

Post by Icing » Mon Oct 18, 2010 4:49 pm

Hi,
I found that with just the inquiry command Serial.print("\r\n+INQ=1\r\n"); in setup, it was enough to keep the device in inquiry mode.
Yes, the execution of command STWMOD will be remembered by the Bluetooth Bee, so it is only need one time. However, the INQ should be used every time to make the module available.

By the way, command "\r\n+STAUTO=1\r\n" will make the module auto-connected to the last paired device, which means you don't need any command to make the module connected.
As a side note, I discovered the normal 'L' shaped xbee shield cannot be put ontop of the electronic brick shield due to placement of the shield's pins, not accepting ICSP pins. I don't use ICSP that often but some other shields still utilise it, might be something nice to have in the next revision.
Yes, thank you. We are making the new stem for you. http://www.seeedstudio.com/blog/2010/10 ... ut-a-logo/

Regards,

-Icing

Post Reply