Nordic Bluetooth Numbers Database

repository·master·Indexed 19 days ago

https://github.com/nordicsemi/bluetooth-numbers-database

An open-source repository providing metadata and definitions for Bluetooth Assigned Numbers, including Company IDs, Service UUIDs, Characteristic UUIDs, Descriptor UUIDs, and GAP Appearances. It allows software to display Bluetooth UUIDs and Manufacturer IDs in human-readable formats using standardized JSON schemas based on official GATT Specifications.

Tokens
2K
Snippets
4
Records
6
Agent score
17%

What's inside bluetooth-numbers-database

  1. Use the Bluetooth Numbers Database for Bluetooth metadata

    master

    The Bluetooth Numbers Database provides a centralized, open platform for accessing metadata and definitions for Bluetooth Assigned Numbers, including GATT attributes and Company Identifiers.

    Use this project if your software needs to display Bluetooth UUIDs (GATT Attributes) or Manufacturer IDs in a human-readable format (e.g., showing names or descriptions instead of raw hex codes). Instead of maintaining your own local list, you can pull information directly from the /v1/ endpoint folder to ensure your application stays up to date with new Company IDs and GATT Attributes automatically.

  2. Reference the Company Identifiers schema

    master

    Company Identifiers are provided as a mirror of the official Bluetooth Specification to avoid the need for manual transformation of online listings.

    | Field | Type | Description | Required |
    | ------|------|-------------| ----------|
    | code  | `Integer` | Decimal value representing a Company as defined in the [official list of assigned Company Identifiers of the Bluetooth Specification](https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/). | **Yes** |
    | name | `String` | Name of the Company | **Yes** |
  3. Reference the UUID Definition schema

    master

    UUID definitions in this project follow a specific JSON structure used to identify GATT Attributes. This structure is based on the official GATT Specifications.

    | Field | Type | Description | Required |
    | ------|------|-------------| ----------|
    | uuid | `String` | **Unique Number** identifying the specific GATT Attribute. The number can be 16 or 128 bits UUID, and must comply with the format as defined in the [Bluetooth Core specification](https://www.bluetooth.com/specifications/bluetooth-core-specification/). Examples: "2902" for Client Characteristic Configuration Descriptor, "EF680100-9B35-4933-9B10-52FFA9740042" for Thingy Configuration Service.  | **Yes** |
    | name | `String` | The GATT Attribute's name. | **Yes** |
    | identifier | `String` | **Uniform Type Identifier**, a reverse-dot notation String used to set the context of the attribute. Apply the following naming convention to the identifier: (reverse domain URL).(attribute type).(generic use case).(specific use case). Example: `com.company.characteristic.example.configuration` | **Yes** |
    | source | `String` | The source of the UUID's definition. For example, all GATT Services, Characteristics and Descriptors have a `gss` specification value. Accordingly, Nordic-defined Services, Characteristics and/or Descriptors are marked with a `nordic` source value. | **Yes** |
  4. Reference the GAP Appearance schemas

    master

    GAP/GATT Appearance data is defined as a 2-byte value. The database provides schemas to decode this into Categories and Sub-Categories.

    Appearance Data bit mapping:

    • Bits 15-6: Category
    • Bits 5-0: Sub-Category
    #### Category Schema
    
    | Field | Type | Description | Required |
    | ------|------|-------------| ----------|
    | category | `Integer` | Decimal value identifying the Category, corresponding to reversed bits 15 to 6 of Appearance Data | **Yes** |
    | name | `String` | Name of the Category | **Yes** |
    | subcategory | `[Sub-Category]` | Array of Sub-Categories within an Appearance Category | **No** |
    
    #### Sub-Category Schema
    
    | Field | Type | Description | Required |
    | ------|------|-------------| ----------|
    | value | `Integer` | Decimal value identifying the sub-category within a parent category, corresponding to the reversed bits 5 to 0 from Appearance Data | **Yes** |
    | name | `String` | Name of the Sub-Category | **Yes** |
  5. Access the Bluetooth Numbers Database contents

    master

    The bluetooth-numbers-database package exports the raw data for Bluetooth identifiers and their corresponding JSON schemas. You can import the main module to access company IDs, service UUIDs, characteristic UUIDs, descriptor UUIDs, and GAP appearances, along with the schemas used to validate them.

    const bluetoothDatabase = require('bluetooth-numbers-database');
    
    // Access data
    const companies = bluetoothDatabase.companies;
    const services = bluetoothDatabase.services;
    const appearances = bluetoothDatabase.appearances;
    
    // Access schemas for validation
    const companySchema = bluetoothDatabase.schemas.companies;
    const serviceSchema = bluetoothDatabase.schemas.services;
    const appearanceSchema = bluetoothDatabase.schemas.appearances;
    
    console.log(bluetoothDatabase.version);
  6. Reference the exported database data and schemas

    master

    The following objects are exported by the package entrypoint:

    • version: The current version of the database.
    • companies: Data regarding Company Identifiers.
    • services: Data regarding Service UUIDs.
    • characteristics: Data regarding Characteristic UUIDs.
    • descriptors: Data regarding Descriptor UUIDs.
    • appearances: Data regarding GAP Appearances.
    • schemas: An object containing validation schemas for the data above:
      • schemas.companies: Schema for company data.
      • schemas.services: Schema for service attributes.
      • schemas.characteristics: Schema for characteristic attributes.
      • schemas.descriptors: Schema for descriptor attributes.
      • schemas.appearances: Schema for appearance data.