Set up connections between two BluetoothBee step by step

wireless communication and related Bees.

Moderators: lily.li, violet, jessie

Uil123
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Tue Nov 29, 2011 4:53 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Bluetooth bee

Re: Set up connections between two BluetoothBee step by step

Post by Uil123 » Tue Nov 29, 2011 5:01 am

Hi,

I have problems connecting my Bee in Linux.
I tried to follow the guide from the wiki. So I can see it, and pair it. But I cannot open the rfcomm via cutecom. The error message didn't really help. Is there another way I can try (maybe via commandline) to open the rfcomm device?
I also tried pairing via hcitool. It works too. But browsing the device with sdptool doesn't show any services. Is that supposed to be that way?

I tried it with Windows and it worked. But it won't help me with my Linux application ;-)

So has someone a suggestion?

Thank you in advance.

Best regards,

Loki85
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Wed Aug 31, 2011 6:05 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Bluetooth master/slave

Re: Set up connections between two BluetoothBee step by step

Post by Loki85 » Mon Dec 05, 2011 8:12 pm

Hello,
I have a ARM Cortex M3 Board and connected the Module, but when I use this Code, I dont see the BT Device in my Windows. :(
What I'm doing wrong ???

void SetupBT (void)
{


/* USART2 Clock an*/
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE);

/*Init USART2 USART2: CTS PA0, RTS PA1, TX PA2, RX PA3 */

/* Configure USART2 RTS and USART2 Tx as alternate function push-pull */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_Init(GPIOA, &GPIO_InitStructure);

/* Configure USART2 CTS and USART2 Rx as input floating */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_3;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_Init(GPIOA, &GPIO_InitStructure);

USART_InitStructure.USART_BaudRate = 115200;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_RTS_CTS;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
USART_Init(USART2, &USART_InitStructure);
USART_Cmd(USART2, ENABLE);

/* Init BT */
Delay(200);
send_string("\r\n+STWMOD=0\r\n");
send_string("\r\n+STNA=IMU200\r\n");
send_string("\r\n+STAUTO=0\r\n");
send_string("\r\n+STOAUT=1\r\n");
send_string("\r\n +STPIN=0000\r\n");
Delay(200);
send_string("\r\n+INQ=1\r\n");
Delay(200);

}

Loki85
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Wed Aug 31, 2011 6:05 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Bluetooth master/slave

Re: Set up connections between two BluetoothBee step by step

Post by Loki85 » Mon Dec 05, 2011 10:09 pm

please help me, I've bought 10 modules for my ten devices.
I want to setup a connection with my PC but I dont find the device with my BT Dongle. I measured VCC and its at 2,7V-3V

I'm using it with ARM Cortex M3 from ST (STM32F103ZE)

Is my procedure correct?

with regards
Sam

Loki85
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Wed Aug 31, 2011 6:05 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Bluetooth master/slave

Re: Set up connections between two BluetoothBee step by step

Post by Loki85 » Wed Dec 14, 2011 1:21 pm

*push*

Delene
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Fri Feb 10, 2012 9:39 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Bee

Re: Set up connections between two BluetoothBee step by step

Post by Delene » Thu Mar 08, 2012 9:58 pm

I have tried to connect my bluetooth bee device in master and salve mode to a laptop computer and both times it keeps coming up with connection failed.

These boards don't seem to be very active, where else can I get help from?

Or find out how to resolve my issues

User avatar
Steve Chang
Elementary-2
Elementary-2
Posts: 290
Joined: Tue Jan 18, 2011 2:14 pm

Re: Set up connections between two BluetoothBee step by step

Post by Steve Chang » Fri Mar 09, 2012 9:16 am

Loki85 wrote:Hello,
I have a ARM Cortex M3 Board and connected the Module, but when I use this Code, I dont see the BT Device in my Windows. :(
What I'm doing wrong ???

void SetupBT (void)
{


/* USART2 Clock an*/
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE);

/*Init USART2 USART2: CTS PA0, RTS PA1, TX PA2, RX PA3 */

/* Configure USART2 RTS and USART2 Tx as alternate function push-pull */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_Init(GPIOA, &GPIO_InitStructure);

/* Configure USART2 CTS and USART2 Rx as input floating */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_3;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_Init(GPIOA, &GPIO_InitStructure);

USART_InitStructure.USART_BaudRate = 115200;
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_RTS_CTS;
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;
USART_Init(USART2, &USART_InitStructure);
USART_Cmd(USART2, ENABLE);

/* Init BT */
Delay(200);
send_string("\r\n+STWMOD=0\r\n");
send_string("\r\n+STNA=IMU200\r\n");
send_string("\r\n+STAUTO=0\r\n");
send_string("\r\n+STOAUT=1\r\n");
send_string("\r\n +STPIN=0000\r\n");
Delay(200);
send_string("\r\n+INQ=1\r\n");
Delay(200);

}
The default communication baudrate should be 38400, but it seems you use 115200.

User avatar
Steve Chang
Elementary-2
Elementary-2
Posts: 290
Joined: Tue Jan 18, 2011 2:14 pm

Re: Set up connections between two BluetoothBee step by step

Post by Steve Chang » Fri Mar 09, 2012 9:20 am

TheFoxy wrote:Hi,
i have a little prob. with my new Serial port bluetooth module (Master/Slave)
if i connect it with my pc via sscom32e i got for example:
+
+STWMOD=1
OK
WORK:MASTER
+BTSTATE:0
+BTSTATE:1
+BTSTATE:3
CONNECT:FAIL
+BTSTATE:1

+
+INQ=1
OK

+BTSTATE:2


+RTINQ=44,11,E0,AC,70,2A;Galaxy S
+
+CONN=44,11,E0,AC,70,2A

OK

+BTSTATE:3

CONNECT:FAIL

+BTSTATE:1

and my mobile phone gave me an error! Phone it's a <<Samsung galaxy>> BT 3.0
if i try as Slave i don't get anything (no Require; pincode)

And what is the meaning of this message?
+BTSTATE:0
+BTSTATE:1
+BTSTATE:3
CONNECT:FAIL
+BTSTATE:1


Please Help!

TY :)
The bluetooth module is with 2.0 firmware. Maybe that's the problem. Try it with phone with 2.0 bluetooth first.

User avatar
Steve Chang
Elementary-2
Elementary-2
Posts: 290
Joined: Tue Jan 18, 2011 2:14 pm

Re: Set up connections between two BluetoothBee step by step

Post by Steve Chang » Fri Mar 09, 2012 10:05 am

Delene wrote:I have tried to connect my bluetooth bee device in master and salve mode to a laptop computer and both times it keeps coming up with connection failed.

These boards don't seem to be very active, where else can I get help from?

Or find out how to resolve my issues
Try it more times. Sometimes it's tricky.

viswa
Staff
Staff
Posts: 168
Joined: Tue Jan 25, 2011 11:16 am
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: Seeeduino Film,Motion Frame,UartSbee

Re: Set up connections between two BluetoothBee step by step

Post by viswa » Fri Mar 09, 2012 12:29 pm

Uil123 wrote:Hi,

I have problems connecting my Bee in Linux.
I tried to follow the guide from the wiki. So I can see it, and pair it. But I cannot open the rfcomm via cutecom. The error message didn't really help. Is there another way I can try (maybe via commandline) to open the rfcomm device?
I also tried pairing via hcitool. It works too. But browsing the device with sdptool doesn't show any services. Is that supposed to be that way?

I tried it with Windows and it worked. But it won't help me with my Linux application ;-)

So has someone a suggestion?

Thank you in advance.

Best regards,

Hi,

[1]Were you able to bind the bluetooth bee address to a rfcomm port ?

Code: Select all

user@user-desktop:~$ sudo rfcomm bind 0 00:13:EF:00:00:24 1
user@user-desktop:~$ ls /dev/rfcomm*
where 00:13:EF:00:00:24 is bluetoothbee address(it may varry from device to device). If bind works, /dev/rfcomm0 is like any other serial port.

[2]Use 38400 baud rate for initial connection.

xpleria
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Thu May 24, 2012 10:00 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: arduino, bluetooth bee, ks0108b lcd

Re: Set up connections between two BluetoothBee step by step

Post by xpleria » Thu May 24, 2012 10:14 pm

I want know if I can use the bluetooth bee directly with the arduino mega 2560 or I have to have the xbee shield.

Post Reply