Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years ago. This question has been closed. Reason: Off Topic
HC06 bluetooth module and Nucleo STF410RE communication
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.
Thanks in advance
Regards
Hema C Vadlamudi
It is working...I used TX and RX pins enabled by default(USART 1) instead of USART 2.
posted by Hema Vadlamudi 09 Dec 2014