-
Notifications
You must be signed in to change notification settings - Fork 1
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
More than 16 syncgroups cannot be advertised via BLE #1404
Comments
Pending CL https://vanadium-review.googlesource.com/#/c/23864 disables BLE to avoid this problem. |
Updated CL to ignore failure as long as 1 plugin succeeds -- BLE is re-enabled. |
@afandria I would expect we would see the same issue on Android as well? or is the implementation substantially different? |
Currently two related crashes will occur should the user have more than 16 syncgroups. The root of the cause is Serve() will start advertising each syncgroup, and if the platform has BLE then some will fail as the current BLE implementation can only support 16 total advertisements. If BLE advertisement fails, one crash was a null dereference of the advertisement's stop(). Note CL #23804 fixed this type of crash in one place in the function there was another where stop could be nil and dereferenced. The other crash is a vlog.Fatal should advertising syncgroups fail. This CL allows advertising to continue (only logging errors) should at least one plugin work. That way BLE can work up to its max, but mDNS can continue advertising all syncgroups. This is one solve the >16 BLE advertisements issue with BLE, filed as vanadium/issues#1404. Closes vanadium/issues#1390, vanadium/issues#1403, vanadium/issues#1398 Change-Id: I07fee516a5246ad8ff72e1107158c16f33d68562
The limit of 16 comes from: It is somewhat arbitrary, but the general idea was that we need to limit the total amount of data available from the GATT server. IIRC, @jhahn21 noted that the actual limit varies depending on the hardware and the software stack and 16 was an unscientifically chosen arbitrary bound by us. Long story short though: Yes, this issue affects all platforms, it is not Android or iOS specific. |
Would it be possible implement something like a bloom filter for the syncgroup ids or advertisement data, instead of listing all the data? Or at least in the case for >16 advertisements? |
The current BLE implementation has a hard limit on 16 advertisements. As each syncgroup is advertised on its own, it means we can only have 16 syncgroups advertised. This is a problem for many apps such as todos as each todo list has its own syncgroup.
@asadovsky @asimshankar @ultrasaurus @afandria
The text was updated successfully, but these errors were encountered: