Skip to content
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

Don't know how to write to Control Point #2

Open
bin2ai opened this issue Feb 18, 2019 · 0 comments
Open

Don't know how to write to Control Point #2

bin2ai opened this issue Feb 18, 2019 · 0 comments

Comments

@bin2ai
Copy link

bin2ai commented Feb 18, 2019

I am having difficulties getting a notification's "appID" using the control point characteristic.
example. "com.apple.facetime"

This is my current understanding of how I can obtain that information.

Once a notification has be received I get the notificationUID and pass it into the control point characteristic's write value function. Based off of the ANCS documentation site, the format should be [commandID-notificationUID-attributeID].

From this threads ANCS code, I declared the pControlPointCharatersitic globally & statically (instead of inside of the myClient class) but when we use the writevalue() function it hangs. Is there another approach to obtain ALL OF the notification's information?

example of how I am currently trying to implement it.

  1. new notification received
  2. enters function "NotificationSourceNotifyCallback"
  3. scrapes uint8_t *pData for the notificationUID (pData's last 4 bytes)
  4. requests more data from control point by sending [1-notificationUID-0] to (NOW Static) pControlPointCharacterstic object function, "writevalue".
  5. hangs, and doesn't exit writevalue function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant