Good afternoon, I would like to know how I can connect the STM32-F401RE core board with Android via Bluetooth and also configure said bluetooth. The bluetooth model is the HC-05.
Hi Jose,
Here are all of the available Mbed OS BLE examples: GitHub - ARMmbed/mbed-os-example-ble: BLE demos using mbed OS and mbed cli
Please let me know if you have any questions!
– Jenny, team Mbed
Good Jenny, I want to do it is that through an application on Android (made in MITAPPInventor) by pressing a button do a functionality that has implemented in MBED. I already have my bluetooth assigned in my own application and I send a character, for example ‘A’ of advances. What I would like to know how I can do to read from MBED the character sent from the application via Bluetooth. I’ve been looking at the example of “BLE_Button” but I do not know if with my own application it would be worth it.
I do not know if I explained well. A greeting.
I forgot to indicate the small code that I have:
<>
void recibeDatos(){
char byteRecibido = pc.getc(); //Devuelve el caracter
switch(byteRecibido) {
case ‘A’:
avanza();
break;
case ‘H’:
home();
break;
}
}
int main(){
pc.baud(9600);
pc.attach(&recibeDatos);
}
<
>
From my own app I press the button and I send the command to the function recibeDatos() that depending on the character that it is does one function or another, but it does not do what I should do. I do not know if I’m making any mistakes.
Thank!!
2 years late, but still unanswered!
The HC-05 is a BluetoothClassic Module and doesn’t support BLE. I feel like the staff at mbed should be aware of that and not point you to a BLE repo.
So much goddamn misinformation out there about Bluetooth/BLE/Bluetooth Smart/Bluetooth 4/Bluetooth2/Bluetooth5 it's amazing any of it works at all