alexkendall / react-native-bluetooth-cross-platform

Cross-Platform Bluetooth & WiFi React Native Module. Powered by underdark http://underdark.io/.
179 stars 35 forks source link

BT advertise and browse not working, WIFI only works. #22

Open vimalathiyagu opened 6 years ago

vimalathiyagu commented 6 years ago

I am using this library to exchange data when wifi is not available and only bluetooth is available. But when wifi is off and only bluetooth is on. the devices are not discovering each other and connecting. It works only when wifi is on.

I am using BluetoothCP.advertise("BT") BluetoothCP.browse("BT")

Kindly let me know if some configuration is required to make it work only with bluetooth.

virl commented 6 years ago

@vimalathiyagu Hello. If you're using iOS 11, it have problems with Bluetooth connectivity. I filed bugreport with Apple and hopefully it will be fixed in next update of either library or iOS 11.

vimalathiyagu commented 6 years ago

@virl Hello. I am testing between IOS 10.2 and android 6 on Nexus. I have tested with BluetoothCP.advertise("BT"), BluetoothCP.browse("BT") with Bluetooth OFF and WIFI ON, it works fine. But with Bluetooth ON and WIFI OFF it does not discover.

virl commented 6 years ago

@vimalathiyagu Bluetooth communication between iOS and Android is not supported due to mobile OS limitations.

vimalathiyagu commented 6 years ago

@virl Thank you for the response. Do you plan to provide support between IOS and android in the future.

virl commented 6 years ago

@vimalathiyagu Yes, when such support will be possible due to Android / iOS Bluetooth restrictions.

vimalathiyagu commented 6 years ago

@virl Hello. I have a quick question. I am testing between iphone 5s - iOS 11 + and iphone 4s - ios 9.3.5 The Wifi is Off and Bluetooth is on. But the devices are not getting detected. Is there an issue with the library. It work only when Wifi is on. Only Bluetooth between iphones are not working. Kindly let me know if this is a known issue. Is this fixed or is it apple issue. Thanks.

virl commented 6 years ago

@vimalathiyagu Hello. Currently Bluetooth with iOS 11 devices doesn't work due to iOS 11 bugs. I'm currently implementing workaround.

More on that here: https://github.com/udark/underdark-cocoa/issues/10