Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android only shows "Unknown" device name when scanning with requestDevice() #633

Closed
mley opened this issue Mar 8, 2024 · 3 comments
Closed
Labels
bug Something isn't working cannot reproduce

Comments

@mley
Copy link

mley commented Mar 8, 2024

Describe the bug
When using the requestDevice() method to scan for BLE heart-rate monitors, Android shows the devices only as "Unknown" with their MAC address. I test this with a Polar H9 and a Garmin watch in broadcast mode. On iOS the names of the devices are shown correctly.

await BleClient.requestDevice({
        services: ['0000180d-0000-1000-8000-00805f9b34fb'],
        scanMode: ScanMode.SCAN_MODE_LOW_LATENCY,
      });

To Reproduce
Steps to reproduce the behavior:

  1. Turn on BLE HR monitor
  2. Call requestDevice()
  3. See result

Expected behavior
I expect the pick device dialog to also show the name of the device

Screenshots
Screenshot_20240308_094002_FIT-UP

Bildschirmfoto 2024-03-08 um 09 45 17

Plugin version:

  • @capacitor-community/bluetooth-le: 3.1.2

Smartphone (please complete the following information):

  • Device: Samsung Galaxy A22
  • OS: Android 13
  • Browser: Chrome
@mley mley added the bug Something isn't working label Mar 8, 2024
@pwespi
Copy link
Member

pwespi commented Apr 6, 2024

I'm unable to reproduce this on my test devices. Are you seeing this on multiple Android devices?

@peitschie
Copy link
Collaborator

Worth noting, iOS has 2 mechanisms for reporting BLE name, while Android only uses the advertised name. I wonder if the above is only showing the GAP name in iOS, which is cached after connection?

See https://forums.developer.apple.com/forums/thread/19381

@mley capturing the specific advertising packet using nrf Connect would perhaps make it clearer what's being broadcast.

@mley
Copy link
Author

mley commented Apr 8, 2024

Thanks for the reply.

I tried again today with the same Android device and the same Polar H9 and this time the name of the device came back correctly. It might have just been a hiccup, fixed by a reboot of the Android phone...

Sorry for the inconvenience. I will close the issue then.

@mley mley closed this as completed Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cannot reproduce
Projects
None yet
Development

No branches or pull requests

3 participants