static void device_found(const bt_addr_le_t *addr, s8_t rssi, u8_t type, struct net_buf_simple *ad) { /* We're only interested in connectable events */ if (type == BT_LE_ADV_IND || type == BT_LE_ADV_DIRECT_IND) { ad_parse(ad, eir_found, (void *)addr); } }
static void device_found(const bt_addr_le_t *addr, int8_t rssi, uint8_t type, const uint8_t *ad, uint8_t len) { char dev[BT_ADDR_LE_STR_LEN]; bt_addr_le_to_str(addr, dev, sizeof(dev)); printk("[DEVICE]: %s, AD evt type %u, AD data len %u, RSSI %i\n", dev, type, len, rssi); /* We're only interested in connectable events */ if (type == BT_LE_ADV_IND || type == BT_LE_ADV_DIRECT_IND) { /* TODO: Move this to a place it can be shared */ ad_parse(ad, len, eir_found, (void *)addr); } }