Skip to content

Instantly share code, notes, and snippets.

@ariccio
ariccio / BluetoothConstants.ts
Created January 10, 2022 18:59
GATT services and characteristics
//Extracted 1/10/2022 from my COVID-CO2-tracker project, in case they're useful to anybody. I'm gonna file an issue/suggesting a few places, and it seems polite to dump it here rather than a long preformatted bit in an issue.
export const GENERIC_GATT_SERVICE_SHORT_ID_DESCRIPTIONS = new Map([
//these are hex strings, without the 0x. Chrome zero extends the devices... so 0x1800 becomes 0x00001800.
// This is a hack to make things easy.
['1800', "generic_access"],
['1801', "generic_attribute"],
['1802', "immediate_alert"],
['1803', "link_loss"],