tree: c8aac249de7e2d5f730c240106ae70f12aed393d [path history] [tgz]
  1. client/
  2. common/
  3. target/
  4. build.sh
  5. Makefile
  6. README.md
  7. release_notes.md
embedded/README.md

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

  1. Follow the steps at Fast Pair Help to register a Model Id for your device.
  2. Review nearby_config.h and disable features, if any, that you don't wish to support.
  3. Implement the HAL defined in nearby_platform_*.h headers.
  4. Set platform specific compile flags in config.mk - see target/gLinux/config.mk for inspiration, and add your platform in build.sh, or use your own build system.
  5. Compile with ./build.sh <your platform>
  6. Start advertising in your application. For example
    nearby_fp_client_Init(NULL);
    nearby_fp_client_SetAdvertisement(NEARBY_FP_ADVERTISEMENT_DISCOVERABLE);
    
  7. Use Fast Pair Validator to verify that your device is behaving correctly.