cancel
Showing results for 
Search instead for 
Did you mean: 

send motion sensor data via BLE with STEVAL-STWINKT1B

aag
Associate II

Hello!

I am trying to create a program where I send motion sensor's data via BLE using evaluation board STEVAL-STWINKT1B. For that, I have used as a guide the firmware example on the board's website (https://www.st.com/en/embedded-software/stsw-stwinkt01.html#get-software -- using example project BLE-SampleApp). 

The problem I am having is that once I start to manipulate the example project (I need to work with motion sensors, not with environmental ones) I start getting a lot of errors I don't really understand. 

Anybody has a solution or has had a similar problem as I have? I just need a project that reads the motion sensors every XX ms and sends the raw data through BLE. The central device I am going to read the data from is a Raspberry Pi 4B (all the other options the firmware example has wouldn't be necessary).

Thank you!

3 REPLIES 3
liaifat85
Senior III

Is it possible for you to copy-paste the errors to this forum?

shakspere13
Associate

For issues modifying the BLE-SampleApp example for motion sensor data on the STEVAL-STWINKT1B, consider checking documentation, reviewing error messages, analyzing code changes, verifying hardware connections, updating SDK/toolchain, utilizing debugging tools, and exploring other motion sensor integration projects for insights.

aag
Associate II

First of all, thank you for your fast response!

Going back to the issue, I am quite stuck with the project I intend to do. I have downloaded the firmware example (on the link attached on the previous post) and have been trying to merge the projects BLE-SampleApp (sends environmental sensor's data through BLE) and Serial_DataLog (sends motion sensor's data throught serial port). 

 

First I tried attaching Serial-DataLog's files to the BLE-SampleApp but a lot of error ocurred when I tried using the motion sensors functions. I can't remember exactly what the errors were, but suddenly a lot of them appeared. I can remember that a lot of the errors were due to multiple definitions, when the functions were declared only once (the errors didn't have a lot of sense). 

 

Since I stayed stuck in that project a lot of time, I have tried doing something similar but the other way around: trying to introduce the BLE files and functions into the Serial-DataLog application. I had some errors because there were lots of files that I had to attach, but I have managed to build the project without errors. What I have done is leave the original project the same but introducing the BLE initializacion functions. 

 

The problem is that now that I initialize the BLE, the task manager fails and the program goes to an infinite loop, and I don't understand why or how I can introduce the BLE communication...

 

The functions I use to initialize the BLE are Init_BlueNRG_Stack() and Init_BlueNRG_Custom_Services(), and the program stays stuck here:

aag_0-1701780465670.png

Does anyboda have a solution? It is supposed to be simple changing the example codes and adapting it to your interests, but I don't see it simple at all. I have been reading lots of documentation but I only read documents refering to the exaples given, and not on how to modify the examples... 

Any solution will be much appreciated because I can't think of more solutions... 

Thank you!!