Skip to content

How to Get Bluetooth Device Type / Class #1313

@agmo-chichun

Description

@agmo-chichun

Describe the bug
I want to determine the bluetooth device type. Whether it's a headset, computer, phone, or others.
I tried comparing the manufacturerData with the assigned numbers from the bluetooth specifications but could not find the matching records.

Anyway we can get the bluetooth device type / class? Or which data should we used to find the matching records from the bluetooth assigned numbers?

To Reproduce

  1. Call scan() and getDiscoveredPeripherals() methods
  2. Get manufacturerData from the callback result

Expected behavior
Able to get the bluetooth device type / class. (Audio / Computer / Printer / Phone)

Screenshots
Expect can differentiate the device type like Macbook.

image

Smartphone (please complete the following information):

  • Platform: Android / iOS
  • react-native-ble-manager version: ^11.5.6
  • react-native version: 0.75.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions