Skip to content

Instantly share code, notes, and snippets.

View dpfrey's full-sized avatar

David Frey dpfrey

  • Sierra Wireless
  • Coquitlam, BC, Canada
View GitHub Profile
{
"locations:": ["bag", "missing"],
"discs": [
{
"manufacturer": "Innova",
"mold": "Orc",
"plastic": "Champion",
"numbers": "10 4 -1 3",
"weight": 169,
"color": "pink",
@dpfrey
dpfrey / bluez_adapter_scan.c
Last active July 18, 2018 20:57 — forked from parthitce/bluez_adapter_scan.c
StartDiscovery: Scan for new devices and list it
/*
* bluez_adapter_scan.c - Scan for bluetooth devices
* - This example scans for new devices after powering the adapter, if any devices
* appeared in /org/hciX/dev_XX_YY_ZZ_AA_BB_CC, it is monitered using "InterfaceAdded"
* signal and all the properties of the device is printed
* - Scanning continues to run until any device is disappered, this happens after 180 seconds
* automatically if the device is not used.
* gcc `pkg-config --cflags glib-2.0 gio-2.0` -Wall -Wextra -o ./bin/bluez_adapter_scan ./bluez_adapter_scan.c `pkg-config --libs glib-2.0 gio-2.0`
*/
#include <glib.h>