2024-10-30 12:34 AM
We are developing a Bluetooth application using the STM32WB55RG. According to the documentation, I found that using the Router and service approach can achieve a one-to-many connection. I want to know if, once a peripheral establishes a connection with the router, it can still connect to other phones. Can the router simultaneously connect to two phones, as shown in the diagram below? Additionally, I found an open-source project on GitHub that has a server-multiple client connection feature, but I am not sure how it is implemented. Could you provide any documentation on server-multiple client connections?
Solved! Go to Solution.
2024-11-22 07:17 AM - edited 2024-11-22 07:26 AM
Hello @CHEN25
I've been able to make it work on both Web Bluetooth App and my phone and also using two Smartphone (an Iphone and another android phone)
. You just have to:
Adv_Request(APP_BLE_FAST_ADV);
to restart the advertising after the connection of the first central device. Now, your project will give you the opportunity to connect to the first device and after that you can connect to a second one will the first one is still able to advertise.
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.
2024-11-19 08:55 AM
Hello @CHEN25 and welcome to the ST Community.
The WB device can support 2 connections as peripheral device (meaning connection to 2 central/master devices) and in // can manage additional connections with 6 peripherals (being a central/master device in this case). So, you can connect your router to two smartphones and connect a server to a Smartphone and a Router.
For more details about how to build a BLE application, you may want to take a look at 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.
2024-11-21 10:32 PM
Thank you for your answer.AN5289 is useful for my development process, but it doesn't seem to mention how to build a P2PSEVER that can be connected by multiple Client.As you said the WB device supported connecting to two central devices, but there is no mention of it in any of the docs or the official routines.It confuses me.I try to set #define CFG_BLE_ NUM_LINK 8 but it doesn't help, my device can still only be connected by one central device, what should I do to make it work as I want?
2024-11-22 12:48 AM
Hello @CHEN25
On the P2P Server example, you have to restart advertising after connecting to the first client. That can be done using the command "Adv_Request(APP_BLE_FAST_ADV);" between "/* USER CODE BEGIN HCI_EVT_LE_CONN_COMPLETE */" and "/* USER CODE END HCI_EVT_LE_CONN_COMPLETE */" on the app_ble.c file of the P2PSEVER (make sure that you are having the last version of the STM32CubeWB V1.20.0).
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.
2024-11-22 01:29 AM
Thanks!I tried that, but the fact is that the second client can establish a new connection with the server only when the first client disconnects, and there is no effect of simultaneous connections. I have also confirmed that I am using STM32CubeWB V1.20.0. And here is part of the configuration for the test demo.
2024-11-22 07:17 AM - edited 2024-11-22 07:26 AM
Hello @CHEN25
I've been able to make it work on both Web Bluetooth App and my phone and also using two Smartphone (an Iphone and another android phone)
. You just have to:
Adv_Request(APP_BLE_FAST_ADV);
to restart the advertising after the connection of the first central device. Now, your project will give you the opportunity to connect to the first device and after that you can connect to a second one will the first one is still able to advertise.
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.
2024-11-25 12:50 AM
Thanks for your answer, I tried to start a new p2psever project from example and it works fine on this new one.