sys/nimble_autoadv: add new module#13425
Conversation
9dda892 to
7376cd6
Compare
19a9755 to
cf07988
Compare
4e7c9c4 to
499576e
Compare
499576e to
15ab05f
Compare
8fe6a71 to
e156796
Compare
|
Could you please have a look, @haukepetersen ? :) |
|
Yes, will do. |
haukepetersen
left a comment
There was a problem hiding this comment.
Just some small remarks, else looks good to me
|
Thank you, I pushed a fixup commit |
haukepetersen
left a comment
There was a problem hiding this comment.
one thing I forgot to mention yesterday...
2e52ead to
35070e8
Compare
| } | ||
| } | ||
|
|
||
| int nimble_autoadv_add_field(uint8_t type, const void *data, size_t data_len) |
There was a problem hiding this comment.
just noticed: there is currently no way to reset the advertising data at runtime, right? I wonder if there is an easy and efficient way to add that functionality. I see two options: add a separate function like nimble_autoadv_ad_reset() or add something like a reset flag to this function here. I feel pretty much indifferent about this, so I let you decide whether you want to do this at all or which way would be best :-)
There was a problem hiding this comment.
I like the idea. It gives us a reset function without a code overhead, because I can simply move the initialization code in to the reset function. I squashed the previous fixups and pushed a new commit with my proposal for a reset function.
There was a problem hiding this comment.
So what I did is a complete reset. I believe you meant a reset only for the data stored in _ad. I don't really have a use case for a reset myself on hand, but I think if I would like to use it, than I would like to reset everything and make necessary changes afterwards.
a096b94 to
9d55a34
Compare
|
@haukepetersen So what do you think? |
|
Ping @haukepetersen |
|
@haukepetersen ? :) |
|
ping @haukepetersen :) ! |
|
@HendrikVE I tested the example |
Yes, it is! :) You picked exactly the application where we can reduce the code size by using this module. Have look at #13506 / 68d5778 |
Then can you suggest a testing procedure to see the changes? Is there an application where the device would no start advertsiing again? |
I'm using Nordics mobile app
|
Yes I did that to verify that things where working as before.
So I'm asking because in your PR description you state "Its main purpose is to restart the bluetooth advertising mechanism after a device disconnects, waiting for the next device connecting.". Do you know what was allowing this in master version of |
The restart of advertising is done by the In 1513526 by using the new
I would describe it like the following. |
|
I've tested that the examples are still operational with these changes. From what I see in the review all comments by @haukepetersen have been addressed and they where minor remarks, everything else was OK on his side #13425 (review). I'm trusting his close review of the code, I've tested and taken a general look. Please squash @HendrikVE! |
dc50520 to
24a29c1
Compare
module for automated bluetooth advertising
24a29c1 to
fe4f0a6
Compare
|
Squashed and checks passed, thanks! |
Contribution description
This PR is outsourcing the module
nimble_autoadvfrom my other PR #12012. Its main purpose is to restart the bluetooth advertising mechanism after a device disconnects, waiting for the next device connecting.Testing procedure
You can test this module with #13506.