Files
flipper-bluepp/libble/ble_names.h
T
andy 888582e9a3 Add BLE HID Host app; share the central layer via libble/
Extract the reusable BLE central/GATT client and name/value decoders into
libble/ (moved out of bt_inspector). build.sh now stages libble/*.{c,h}
into each app dir at build time and builds every app in APPS=(...).

New app ble_hid_host: connects to a BLE keyboard or mouse, discovers the
HID service (0x1812), sets protocol mode (boot when offered, else report),
subscribes to the input-report characteristics, and decodes keyboard
(modifiers + key names) and mouse (buttons + dx/dy/wheel) reports live.
Events scroll on screen and are logged with raw bytes to
apps_data/ble_hid_host/. No pairing, so encryption-gated keyboards stay
silent; open devices and most mice work. Both faps build and pass APPCHK.
2026-07-07 00:53:32 +01:00

22 lines
1.1 KiB
C

#pragma once
#include <furi.h>
#include <stdint.h>
// Lookup tables and decoders. All return static strings or NULL when unknown.
const char* ble_company_name(uint16_t id);
const char* ble_uuid_name(const uint8_t* uuid, uint8_t len); // len 2 or 16, little-endian
const char* ble_appearance_name(uint16_t appearance);
const char* ble_adv_type_name(uint8_t evt_type);
const char* ble_att_error_name(uint8_t code);
void ble_hex(FuriString* out, const uint8_t* data, size_t len);
void ble_uuid_str(FuriString* out, const uint8_t* uuid, uint8_t len);
void ble_addr_str(FuriString* out, const uint8_t* addr);
// Manufacturer-specific data decoders (Apple Continuity, Microsoft CDP, ...)
void ble_decode_mfg(FuriString* out, uint16_t company, const uint8_t* d, uint8_t len);
// Service data decoders (Fast Pair, Eddystone, Exposure Notification, ...)
void ble_decode_svc_data(FuriString* out, uint16_t uuid, const uint8_t* d, uint8_t len);
// Characteristic value decoder: appends "decoded" representation(s) of a value.
void ble_decode_value(FuriString* out, const uint8_t* uuid, uint8_t uuid_len, const uint8_t* d, size_t len);