Hello Guys, i have met a problem.I want use Rfcomm the bluetooth protocol in unity that deploy to UWP,so i use WinRT.api to do so.the questions are followed :i made
the same work in visual studion 's UWP application ,which use Rfcomm protocol(
RfcommDeviceService.FromIdAsync(dev.Id)
) ,it worked well ,i could read any thing the bluetooth send to ,however,i made the program in unity ,when it deploy to the UWP(hololens ),it doesn't work ,i have
the problem was at _service = await Windows.Devices.Bluetooth.Rfcomm.RfcommDeviceService.FromIdAsync(dev.Id);it throw an exception Exception
thrown: 'System.InvalidOperationException' in System.Private.CoreLib.ni.dll
InitializeRfcommDeviceService: A method was called at an unexpected time. (Exception from HRESULT: 0x8000000E).so why ?can anyone help me ???