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

bug in retrieveConnected #559

Closed
chegewara opened this issue Nov 16, 2019 · 7 comments · Fixed by #683
Closed

bug in retrieveConnected #559

chegewara opened this issue Nov 16, 2019 · 7 comments · Fixed by #683

Comments

@chegewara
Copy link

chegewara commented Nov 16, 2019

When i print data from retrieve connected i am getting only 2 devices, but i know i have 3 devices bonded (confirmed with nRF connect), also isBonded returns true with my TV address, which is not included in retrieveConnected:

[console.log]: [{"address":"7A:68:61:3F:C8:D1","name":"Galaxy S5"},{"address":"2C:BA:BA:2F:91:3B","name":"Gear VR Controller(913B)"}]

ionic + angular on Samsung S9+, android 9.

Thanks for great plugin, even with few bugs/glitches is really awesome.

@asoap
Copy link

asoap commented Nov 22, 2019

I am having a similar issue on Android. I bought a smart watch to interface with the heart rate monitor. The watch is connected to the phone but when I call retrieveConnected() I only get devices that my specific app has connected to. It doesn't retrieve the watch.

Edit:

I found my issue. getBondedDevices() is returning my watch, but the plugin is filtering out on:

if (device.getType() != BluetoothDevice.DEVICE_TYPE_LE) {

My watch is returning as BluetoothDevice.DEVICE_TYPE_DUAL

@randdusing
Copy link
Owner

@asoap Thanks for taking a closer look. This should be fairly simple to fix, so I'll try to raise a PR in the next week or so. But PRs are always welcome :)

@asoap
Copy link

asoap commented Dec 16, 2019

I can make a pull request and do the change. I'm just not sure if it should be changed? Like I don't know enough about BLE to know if DEVICE_TYPE_DUAL should be talking also? Or if there is some limit that is added because of it?

@randdusing
Copy link
Owner

I don't think there's any issue updating it to DEVICE_TYPE_DUAL.

https://stackoverflow.com/questions/54922664/android-bluetoothdevice-type-dual

@ragcsalo
Copy link

bluetoothle.retrieveConnected doesn't return any paired devices on iOS 14 (iPhone X)

@czzplnm
Copy link

czzplnm commented Dec 23, 2020

bluetoothle.retrieveConnected is returning a blank array to me for the success callback.

@MojioMS
Copy link
Contributor

MojioMS commented Apr 6, 2021

I confirm obtaining an empty array in the retrieveConnected success response, although being bonded with a device. Tested on three Android devices.
Another bond() attempt on the already bonded address returns a correct Device already bonded error message and isBonded with the address of the bonded device returns true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants