rusel1989 / react-native-bluetooth-serial

Port of https://github.com/don/BluetoothSerial for react native
476 stars 291 forks source link

How to connect two BT devices, looks like no! #28

Open liyatang opened 7 years ago

prashant45 commented 7 years ago

Even I am having problems connecting 2 bluetooth devices?

Any alternatives for this issue ?

liyatang commented 7 years ago

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

alanyong91 commented 6 years ago

Actually can. You just need write more code.

arevaldez commented 5 years ago

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

alanyong91 commented 5 years ago

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.

alex-valdez commented 5 years ago

@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!

alanyong91 commented 5 years ago

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.