The onAdvertisement(bool start) is called with a false when a connection occurs.
It would be far more useful for the onAdvertisement() to be called before and/or after the periodic advertisements. I really wanted to do one or 'n' advertisements and shut down the radio for a long period to extend the battery.
The other obvious useful thing would have been to update data in the advertisement packets between advertisements. But that isn't practical since it isn't being called before and/or after each advertisement.
Is there any easy way to accomplish either of those?
The onAdvertisement() isn't providing usefulness that I can't get with begin(), onConnect(), and onDisconnect().
It's called after begin with true, but we know that is going to happen.
It's called with false during connection, but onConnect is called, so we know that too.
It's called after onDisconnect() with true, but we also know that it's going to start advertising unless the onDisconnect was because we called end().
So basically onAdvertisement() isn't called when it actually starts or stops transmitting an advertisement, it's called after begin(), connect(), and disconnect(). Doesn't seem very useful to us!!!
Please update the documentation to be a little more clear. Is Simblee the same? This cost me way too much time to figure out that I can't use it either of the ways I was expecting from the name and documentation.