9 years, 5 months ago.  This question has been closed. Reason: Duplicate question

printing bluetooth data

Hi , I am HC-06 module for bluetooth communication with Nucleo ST F410RE. I am facing an isssue in this. The following are my circuit connections:

HC-06 - mbed

RXD - TX/D1

TXD - RX/D0

GND - GND(CN6, below 5v)

VCC - 5v

also I have connected

CN10 PA2 - TX near CN4

CN10 PA3 - RX near CN4

the code I am using is

include "mbed.h" include "Serial.h" Serial pc(D1,D0);

Serial device(PA_2,PA_3);

int main() {

pc.baud(9600);

pc.printf("Success");

while (1) {

if (pc.readable()) {

pc.printf("Function executing");

device.putc(pc.getc());

}

}

}

Below are the steps I am following:

1. Installed Bluetooth SPP Maanager app (from play store) on android mobile and HTerm software on computer(Windows)

2. Connected to bluetooth HC06 from android device

3. Compiled the above code and dumped onto board

4. I am able to see the message "success" printed on both mobile and HTerm

5 Then send some characters from HTerm - able to see the message printed on the Hterm and mobile

I am able to do upto this. But when I try sending message from Mobile (SPP application) I am not able to see the message on HTerm. Can anyone please tell me Where I am doing Wrong. Quick response is appreciated. I got stucked here. I am trying to contribute HC06 bluetooth communication program to mbed repository.

Question relating to:

Bluetooth serial communication with Bluetooth Shield from Seeed Studio bluetooth

It works if USART 1 is used instead of USART 2 because TX and RX pins of USART1 are by default enabled

posted by Hema Vadlamudi 09 Dec 2014