Give option to not advertise a primary service#420
Give option to not advertise a primary service#420matteo-meluzzi wants to merge 2 commits intoukBaz:mainfrom
Conversation
|
The CI/CD has failed on this pull request so please take a look at that. With the change that you have suggested, hasn't |
|
The CI/CD issue has been resolved — it was just a linter problem due to it not being installed on my machine. As for the change with |
|
There is still an issue with the lint failing CI/CD. If you used the original code with |
add_servicehas an additional argumentadvertisedwhich isNoneby default.if
advertised is None, then the behavior is unchanged compared to before.if
advertisedisTrueorFalse, its value is used to determine whether the service should be advertised.Since
advertisedhas default valueNone, this pull request is backwards compatible with all existing bluezero code.In addition, it gives developers the option to not advertise a primary service. This is useful because BLE has a maximum advertising size of 31 bytes, and a service UUID can use up to 16 bytes, which leaves little or no room for other data.