adabru / BleWinrtDll

BLE for Unity 3d in Windows without UWP.
Do What The F*ck You Want To Public License
168 stars 52 forks source link

Using dll in the Unity but can't subscribe #44

Closed July0508 closed 1 year ago

July0508 commented 1 year ago

Hello. I met a situation with SubscribeCharacteristic() when I try it in the Unity in PC. I had got the deviceId, serviceId and characteristicId, and try to subcribe it. But it return false when I used BleApi.SubscribeCharacteristic(selectedDeviceId, selectedServiceId, selectedCharacteristicId, false); And in the while loop:BleApi.PollData(out res, false) never gets true.

I used the dll in the form C# program, which is good running. is there some important things I lost?

July0508 commented 1 year ago

Now I am updating this question: when the code is running in the unity if you have the same questions like can't subscribe the characteristic, the while loop can't break, don't be worried and try to use write() something then you may see a good result.

This project is so excellent! Thanks a lot!