apache / mynewt-nimble

Apache mynewt
https://mynewt.apache.org/
Apache License 2.0
680 stars 392 forks source link

Feature: Support to ask user for authorization #1668

Open Singh-Sumeet opened 8 months ago

Singh-Sumeet commented 8 months ago

This MR aims to add:

  1. Support to ask user for authorization in case of GATT read or write operations.
  2. Relevant event handling in bleprph app.
Singh-Sumeet commented 8 months ago

@sjanc Please TAL

Singh-Sumeet commented 6 months ago

@sjanc PTAL

andrzej-kaczmarek commented 6 months ago

@Singh-Sumeet we discussed with @sjanc and we agreed that return value from callback should be used instead of event struct field. we'd also like to have an option in future to make it authorization asynchronous so the return values should be reject, accept, pending - please add appropriate macros for that. reject should be set to 0 so authorization is rejected by default.

Singh-Sumeet commented 2 days ago

Hi @andrzej-kaczmarek , I have made the required changes. I don't understand what you mean by making it "Authorization Asynchronous", but I have created the macro nonetheless.