mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
1.3 KiB
1.3 KiB
Nearby embedded SDK library
This repository contains Nearby SDK library for embedded systems. Nearby SDK implements the Fast Pair protocol and its future versions per https://developers.google.com/nearby/fast-pair/spec
Threading model
Nearby SDK assumes a single-threading model. All calls to the SDK must be on the same thread, or protected with a mutex. That includes:
- client API, for example
nearby_fp_client_SetAdvertisement() - ble and other event callbacks
- timers
Porting guidelines
- Follow the steps at Fast Pair Help to register a Model Id for your device.
- Review
nearby_config.hand disable features, if any, that you don't wish to support. - Implement the HAL defined in
nearby_platform_*.hheaders. - Set platform specific compile flags in
config.mk- seetarget/gLinux/config.mkfor inspiration, and add your platform inbuild.sh, or use your own build system. - Compile with
./build.sh <your platform> - Start advertising in your application. For example
nearby_fp_client_Init(NULL); nearby_fp_client_SetAdvertisement(NEARBY_FP_ADVERTISEMENT_DISCOVERABLE); - Use Fast Pair Validator to verify that your device is behaving correctly.