Following the tutorial here https://www.b4x.com/android/forum/threads/hc-05-classic-bluetooth.66677/
for connecting bluetooth to android I managed to connect android to stm32 with bluetooth (HC-06 in this case).
The connection pins are as explained here https://www.b4x.com/android/forum/threads/stm32-and-softwareserial.84936/#post-538283 .
The HC-06 requires 5v as vcc but the rx -tx pins use 3.3v so they connect directly to the stm32 rx-tx pins.
The led pin number has to change, I used 32 for the on-board green led.
for connecting bluetooth to android I managed to connect android to stm32 with bluetooth (HC-06 in this case).
The connection pins are as explained here https://www.b4x.com/android/forum/threads/stm32-and-softwareserial.84936/#post-538283 .
The HC-06 requires 5v as vcc but the rx -tx pins use 3.3v so they connect directly to the stm32 rx-tx pins.
The led pin number has to change, I used 32 for the on-board green led.