Closed tufeixp closed 2 years ago
I think yes but I didn't try. See https://github.com/adabru/BleWinrtDll/issues/7#issuecomment-771600983:
I guess each bluetooth device normally has a unique device id. In that case you should be able to just call the functions with different device-ids. Each received data-package contains information about the device it was sent from. Likewise, in each data-package you send you can specify the device-id it should go to.
Yes, I tried and it works~ thanks~
Hi @tufeixp , can you share your code/project how you read the data when connect to more than 1 device?
So based on my understanding we need to SubscribeCharacteristic() for both devices id , services and char id, and all buffer will still pull from the function as in picture above?
Hi @mnajib76, you are right. You pull from the function and determine which device it was sent from by inspecting res.deviceId
. https://github.com/adabru/BleWinrtDll/blob/31fcc9fd733e16a80d712ece893caf0c678f9111/BleWinrtDll/BleWinrtDll.h#L22-L28
Thank you very much! Manage to do it!
Does this lib support a multiple devices running?