don / BluetoothSerial

Cordova (PhoneGap) Plugin for Serial Communication over Bluetooth
Other
1.07k stars 670 forks source link

Not working at all #432

Open LeoMH opened 4 years ago

LeoMH commented 4 years ago

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.

philcom1 commented 4 years ago

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

LeoMH commented 4 years ago

Android

WaldiirNeto commented 4 years ago

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

LeoMH commented 4 years ago

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

philcom1 commented 4 years ago

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

LeoMH commented 4 years ago

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.

WaldiirNeto commented 4 years ago

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 commented 4 years ago

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

aavelyn commented 3 years ago

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?

inlacou commented 3 years ago

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.

Lucas-Wanat commented 2 years ago

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.