BluetoothSerial icon indicating copy to clipboard operation
BluetoothSerial copied to clipboard

Not working at all

Open LeoMH opened this issue 5 years ago • 11 comments

I try to connect to an ESP32 using your plugin. But every time I use a function of the plugin, the code seems to stop working and neither of the callbacks gets called. One example would be this: bluetoothSerial.connect("24:6F:28:7B:D8:76",success, failure). The app stops there and no callback gets called. I can't figure out what my mistake is.

LeoMH avatar Oct 08 '20 13:10 LeoMH

Are you using an Android or iOS device for scanning and connecting?

philcom1 avatar Oct 08 '20 13:10 philcom1

Android

LeoMH avatar Oct 08 '20 13:10 LeoMH

are you using android 10? this plugin is having problems in this version of android

WaldiirNeto avatar Oct 10 '20 17:10 WaldiirNeto

Thanks for responding. I got it working. I had to remove android and add it again.

LeoMH avatar Oct 10 '20 18:10 LeoMH

Nice! Which @ionic-native/bluetooth-serial version are you using? Maybe it could also be this problem ;)

philcom1 avatar Oct 10 '20 18:10 philcom1

It probably did not get added to the platform when I installed it. I used the bash command to add it, so I guess it was the most recent release.

LeoMH avatar Oct 10 '20 18:10 LeoMH

whoever has this problem, it could probably be that you have disabled the option to not allow access to the location just in the use of the app, let it always use the location.

WaldiirNeto avatar Oct 12 '20 00:10 WaldiirNeto

I don't think there's a problem with a plugin, but with the mobile settings

WaldiirNeto avatar Oct 12 '20 00:10 WaldiirNeto

Hi, we have the same issue with Galaxy Tab A7 and Android 10. Location Permission is granted. But neither does discoverUnpaired nor setDeviceDiscoveredListener emit any values, while another tablet with android 8 or 9 work fine.

Does anyone has a fix or workaround?

aavelyn avatar Dec 03 '20 13:12 aavelyn

Created a pull request that should solve this issue.

are you using android 10? this plugin is having problems in this version of android

The issue on Android 10 and above is that ACCESS_FINE_LOCATION is needed instead of ACCESS_COARSE_LOCATION.

inlacou avatar Jan 11 '21 17:01 inlacou

whoever has this problem, it could probably be that you have disabled the option to not allow access to the location just in the use of the app, let it always use the location.

@WaldiirNeto How could I do this? I still don't quite understand. And my problem is only in the connect() method that does absolutely nothing, and I use android 8.1, I already tried to connect with ESP32, other android and windows 10.

Lucas-Wanat avatar Aug 30 '22 11:08 Lucas-Wanat