cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed with BLE server/client program

snak3in
Associate II

hi, I have two B-WB1M-WPAN1 cards and I would like to create a program that works as a client server, so one card will act as a server and then other client cards will send messages to it via BLE, I saw the example proposed by the company "BLE_HR_p2p_Sensor" which might look like what I want to do but I haven't quite figured out how it all works.
Where can I find, for example, a complete file with commands useful for BLE transmission?
Then if you have any advice they are welcome, I would also be curious to understand how the connection through the application from the phone to the card works.

1 ACCEPTED SOLUTION

Accepted Solutions

No For sure, the first one is for a server and now we will have Client configuration. So, you should make some changes.

PS: this discussion became so long. I think if your original request is answered, you may select the best answer with an "accept as Solution". Then, you can keep creating new threads whenever you find that you need help.

Best Regards.

STTwo-32

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

13 REPLIES 13

You've posted this in the MPU section, but the B-WB1M-WPAN1 seems to be targetted at MCUs ?

 

My bad sorry, how can i change it?

 

You're using an STM32 MCU, then?

If so, I could move it...

yes correct, thanks

STTwo-32
ST Employee

Hello @snak3in and welcome to the ST Community.

For the Client, server part of the question, you can go to this question. I think the answer should be helpful. 

To understand how the BLE transmission works and how the application operates between board and Smartphones, you can use the AN5289

Best Regards.

STTwo-32

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

ok thanks, let's say that I understood a little more about this whole system by looking at what you sent me.
I still have several doubts however, first of all I created a "server" program on my B-WB1M-WPAN following one of your tutorials on YouTube but when I start it very often I can't see it from the ST BLE Toolboox app, yesterday I noticed that I could see it when I put only the favorites in the filters, today that I'm trying again I can't even see it this way

Hello @snak3in 

For a P2P Server application on the B-WB1M-WPAN, the best way for me is to refer to this working application. It includes a .ioc file that should help you to understand the configurations. Also, you can go to the code and check what you have to add. Also, you can refer to this wiki for better explanation.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Yes, the part that acts as a server doesn't seem to create too many problems for me at the moment, more than anything else it's the client program which I don't really know how to do, I'll try to use examples already created for other devices maybe you have some suggestions on which one to follow.
For the problem I wrote before where I can't see the card from the app on the phone I've managed to solve it for now, basically if I flash the BLE_HR_p2p_Sensor program and connect to it, then flash my program I can still see the card.

The B-WB1M-WPAN and the NUCLEO-WB15CC are both based on a STM32WB15CC MCUs (different pinout and package). So, you can start from the BLE_p2pClient example and go to check the datasheets of both Module and MCU. Also, try to understand the difference of layout between boards.

Finally, you are always welcome to be back with a new post on this forum if you need help on your future work. For this post, if you find it helpful for now, please close it by accepting a solution.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.