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

Observer examples? #8

Open
henris42 opened this issue Feb 17, 2015 · 1 comment
Open

Observer examples? #8

henris42 opened this issue Feb 17, 2015 · 1 comment

Comments

@henris42
Copy link

Hi, would it be possible to have some working observer examples? Like for example iBeacon listener?
.. the API & docs so far make implementing this by myself rather non-trivial..:)

@trond-snekvik
Copy link
Contributor

We hope to add some more detailed (and cleaner) examples in the future, but for a quick start, I suggest that you extend upon the existing Observer project.

All the application specific stuff for the timeslotted operation is contained in the observer/main.c file. This file implements a non-filtering advertisement observer, which reports all advertisements to the UART. The interesting part is going on at line 181, where the observer spins until it gets a scan report from the framework. In this project, the observer only extracts the event type, advertisement address and RSSI from the event, but the event also contains the entire payload from the advertisement, from which you could start extracting information like iBeacon messages. I'm afraid dissecting the payload of the advertisements is somewhat out of scope for the framework (at least for now), but you can take a look at this stackoverflow answer to get started on filtering iBeacon devices from others.

I'll leave this issue open until we've added some extra examples.

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

2 participants