Hi Erel,
I have created a Galaxy S8 Central controlling 2 BLE Devices, using the BLE2 V1.35 Library.
Schematic :
S8 CENTRAL PERIPHERALS
Manager1 Buttons Set ------> Device1
Manager2 Buttons Set ------> Device2
My problem is about the multiple connection :
- When connect with success the manager1 to Device1, I can't connect the manager2 to Device2
- Inversely, when connect with success the manager1 to Device2, I can't connect the manager2 to Device1
- I can connect both manager1 and manager2 to a same device (either Device1 or Device2)
The log of a multiple connection is below :
My program works as below:
- I use 2 managers.
- My program starts by launching manager1.Scan(Null), sleep(4000) then manager2.Scan(Null).
- For each scanning, the DeviceName and MacAddress of the found devices are stored in m1FoundDevices as List or m2FoundDevices as List.
- The main Activity has 2 buttons CONNECT1 and CONNECT2.
When CONNECTx is pressed, managerX.Connect2(MacAddress,False) is launched to connect to a device having the MacAddress (one of the mXFoundDevices List).
Attached is the source of my Starter Module.
I have created a Galaxy S8 Central controlling 2 BLE Devices, using the BLE2 V1.35 Library.
Schematic :
S8 CENTRAL PERIPHERALS
Manager1 Buttons Set ------> Device1
Manager2 Buttons Set ------> Device2
My problem is about the multiple connection :
- When connect with success the manager1 to Device1, I can't connect the manager2 to Device2
- Inversely, when connect with success the manager1 to Device2, I can't connect the manager2 to Device1
- I can connect both manager1 and manager2 to a same device (either Device1 or Device2)
The log of a multiple connection is below :
Manager1 - Connecting to FE4:CC:A51:02
Discovering services.
Manager1 Connected
Manager2 - Connecting to D7:6F:F9:2B:0C:73
Discovering services.
Service discovery failed.
Discovering services.
Manager1 Connected
Manager2 - Connecting to D7:6F:F9:2B:0C:73
Discovering services.
Service discovery failed.
My program works as below:
- I use 2 managers.
- My program starts by launching manager1.Scan(Null), sleep(4000) then manager2.Scan(Null).
- For each scanning, the DeviceName and MacAddress of the found devices are stored in m1FoundDevices as List or m2FoundDevices as List.
- The main Activity has 2 buttons CONNECT1 and CONNECT2.
When CONNECTx is pressed, managerX.Connect2(MacAddress,False) is launched to connect to a device having the MacAddress (one of the mXFoundDevices List).
Attached is the source of my Starter Module.