-
Notifications
You must be signed in to change notification settings - Fork 81
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
Give BLE scan more options. #2643
Conversation
Split out the fields and make them accessible. This makes it possible to move more code into Toit, and also gives more control to users that need more advanced advertisement fields.
Active scans send a request to the device when they have received an advertisement.
Most users shouldn't touch them, but for power users it's nice to have them available.
We don't want to accidentally run board1 and board2 of unrelated tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
src/resources/ble_esp32.cc
Outdated
@@ -2443,10 +2443,10 @@ PRIMITIVE(scan_start) { | |||
disc_params.passive = passive ? 1 : 0; | |||
|
|||
/* Use defaults for the rest of the parameters. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@@ -62,12 +62,17 @@ main-peripheral: | |||
next-semaphore.down | |||
peripheral.stop-advertise | |||
|
|||
is-general-advertisement := false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
…h/ble-extended-scan.20.active-scan
…h/ble-extended-scan.30.more-options
…h/ble-extended-scan.20.active-scan
…h/ble-extended-scan.30.more-options
…h/ble-extended-scan.20.active-scan
…h/ble-extended-scan.30.more-options
Most users shouldn't touch them, but for power users it's nice to have them available.