Skip to main content
Associate II
December 30, 2024
Solved

Control STM32 with phone over bluetooth

  • December 30, 2024
  • 1 reply
  • 1462 views

I'm planning on making a 3D printed remote controlled crane and wanted to control it over Bluetooth from my phone with an app. It would simply be a board with some low power h-bridge drivers connected to a bluetooth capable stm32 that would communicate with my phone to control the speed and direction of the motors. I will admit I haven't had a big look into everything yet as I am just getting an idea of what's possible but I found the STBLEToolbox app on iphones that can be used to connect to an stm32 and was wondering if something like that would work where I can send values (basically a duty cycle) to control motor speed. I was also wondering if the layout of the app is customizable (like can I add joysticks to make it more user friendly?). so far I have only seen examples where the app connects to the stm32 and you can send a single character but thats not very useful for my application. I am still looking around to see if I can find more information but thought I could ask here first if there is a simple yes it might work or a definite no answer. Ideally I would like to be able to connect an Xbox or Playstation controller over bluetooth but I haven't looked into that yet. 

Best answer by STTwo-32

There is not an official guide but i think you can refer to this application to understand how it is implemented. You can also take a look at the mobile apps of the same Github repository. That should be helpful.

Ps: we are tooking about BLE here and not Bluetooth.

Best Regards.

STTwo-32

1 reply

STTwo-32
Technical Moderator
December 30, 2024

Hello @La246 @and welcome to the ST Community.

Firet, ST MCUs are not using the Classic Bluetooth. So, you can Connect them to any Bluetooth based device. Our STM32WB/WBA are based using BLE for communication. For your use case it is yes, you can create your own app that is simular to the ST Toolbox app but with your own interfaces, commands and variables (our apps can’t be modified by a user to add his own interfaces). 

Best Regards.

STTwo-32

La246Author
Associate II
December 30, 2024

Thanks for the reply.

 

Would you know of any resources I could use for starting to create a basic bluetooth app for this application?

STTwo-32
STTwo-32Best answer
Technical Moderator
December 30, 2024

There is not an official guide but i think you can refer to this application to understand how it is implemented. You can also take a look at the mobile apps of the same Github repository. That should be helpful.

Ps: we are tooking about BLE here and not Bluetooth.

Best Regards.

STTwo-32