react-native-bluetooth-serial icon indicating copy to clipboard operation
react-native-bluetooth-serial copied to clipboard

How to connect two BT devices, looks like no!

Open liyatang opened this issue 7 years ago • 7 comments

liyatang avatar Mar 07 '17 02:03 liyatang

Even I am having problems connecting 2 bluetooth devices?

Any alternatives for this issue ?

prashant45 avatar Sep 18 '17 10:09 prashant45

react-native-bluetooth-serial is singleton,you can fork it then modify。

eg: https://github.com/gmfe/react-native-gm-bluetooth https://github.com/gmfe/gmrnbt

liyatang avatar Sep 18 '17 11:09 liyatang

Actually can. You just need write more code.

alanyong91 avatar Mar 25 '18 12:03 alanyong91

Any idea how to implement this? I'm trying to implement this but it keeps disconnecting from the first device after I try connecting to the second device. @liyatang @alanyong91

arevaldez avatar Sep 23 '19 01:09 arevaldez

The way I did is connect the first device and disconnect, then connect the other one. I used this package to connect bluetooth printer. So might be different approach.

alanyong91 avatar Sep 23 '19 11:09 alanyong91

@alanyong91 were you able to connect to two devices at once? Or just one device? I am tying to connect the phone to two devices at once. Thanks for your help!

alex-valdez avatar Sep 23 '19 17:09 alex-valdez

I can connect two devices at once but only one will use if call both devices. I create a class (eg: BluetoothConnect) to call bluetoothSerial and use new BluetoothConnect() for each device.

alanyong91 avatar Sep 24 '19 00:09 alanyong91