-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLE : ATT Timeout occurred during multilink central connection #30624
Comments
Please ensure that you use unique GATT parameter variables for each simultaneous connection. For instance, your |
Hello |
@cvinayak |
yes, something like that, to avoid using the same memory for multiple simultaneous transactions. |
It's like it still didn't solve my problem
In this case, does discover_params also need to be set to So ATT timeout error, is it a problem that occurs when I use the same memory for multiple transactions at the same time? |
Yes. If you have based your application out of an upstream sample. I suggest you send a PR with your changes to make the sample capable of multiple connections simultaneously. This will make it easier to review your changes. |
how can I send a PR?I don’t know how to get my code up
Is there any reason for this? |
I pulled my code request but I’m not sure if I’m doing this right |
Multiple connections are being established sequntially and gatt service discovery is performed using the same single instance of No guard preventing sequential multiple connections: Use of single instance of |
Resolving as issue in the user's code. Please reopen if you find that not to be the case. |
Describe the bug
Situation:
Modify the example of zephyr BLE central_hr so that it can be connected to multiple peripherals.
Each peripheral will subscribe to the central, and then the peripheral uses
notify
to send the data to the central, and the central usesbt_gatt_write
to return the value to the peripheral.Now I use one central to 5 peripherals to test connection stability
It will work normally at first, but after a period of time, central will suddenly get stuck and the following error message will pop up.
In addition, the time of each error is random
Sometimes jump out
<err> bt_gatt: Error sending ATT PDU: -57
And I made the following changes in prj.conf
Expected behavior
At present, I want to allow central to communicate with 30 peripherals through BLE, so that the connection will continue to be stable. If the peripheral is disconnected, it will be reconnected, and there will be no bt_att: ATT Timeout error.
Impact
I don’t know which side is the problem at the moment, I don’t know what to do, I’m very helpless.
Logs and console output
![image](https://user-images.githubusercontent.com/12792709/101873359-c1bc4480-3bc1-11eb-80e3-47d26d91c608.png)
![image](https://user-images.githubusercontent.com/12792709/101873282-a3564900-3bc1-11eb-923a-8f074aa38329.png)
Usually there are errors as shown below
Sometimes there will be more
<err> bt_gatt: Error sending ATT PDU
The link is my running video. The first few minutes were normal and met my expectations, but in the end it got stuck and an error occurred
https://youtu.be/m5Ki--iXmXw
Environment (please complete the following information):
Additional context
This is my central code, if you need to read it, you can download it, hope it helps
C_N_w.zip
The text was updated successfully, but these errors were encountered: