arduino / arduino/ArduinoCore-arc32
disconnect after sending Notifications
- Dominant language
- C
- Stars
- 330
- Forks
- 281
- PR merge metrics
- No merged PRs in 30d
Description
Hello everybody,
I'm just trying to send messages from the Arduino to an Android client via BLE. For this I use the library CurieBLE version 2.0.
To send as many packages as possible, I use notifications. The goal is to generate as much throughput as possible. However, the Arduino always disconnected after a few notifications, if the connection interval is greater than 12. What can be the reason and which class is responsible for the dissconnect?
The code:
`BLEFloatCharacteristic valueCharacteristic("19B10000-E8F2-537E-4F6C-D104768A1216", BLERead | BLENotify);`
```
while (central.connected()) {
while ((endtime - starttime) <= 60000) // do this loop for up to 1min
{
float sensorValue = analogRead(A0);
boolean succes = valueCharacteristic.setValue(sensorValue); //send Value per Notification
endtime = millis();
}
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
No source file or test is named. Start at BLEFloatCharacteristic.setValue and the central.connected loop, then reproduce the disconnect with a connection interval greater than 12; done means identifying the responsible class and documenting the cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, c
- Domain
- embedded-iot, mobile-dev, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100