2015-10-12 72 views
2

我正在開發Windows 8.1的通用應用程序。我的應用程序使用的藍牙設備,手機完美的作品,但在平板電腦上我有錯誤,同時連接到設備:Winrt藍牙錯誤

請求的地址不在其上下文(0x80072741)

這裏我的代碼有效:

 await 
      streamSocket.ConnectAsync(
       new HostName(info.Id), 
       "{00001101-0000-1000-8000-00805F9B34FB}"); 
     dataReader = new DataReader(streamSocket.InputStream); 
     dataWriter = new DataWriter(streamSocket.OutputStream); 

能力:

<DeviceCapability Name="proximity" /> 
    <m2:DeviceCapability Name="bluetooth.rfcomm"> 
     <m2:Device Id="any"> 
     <m2:Function Type="name:serialPort" /> 
     </m2:Device> 
    </m2:DeviceCapability> 

回答

0

因爲它是RT,你並不孤單!

請轉到帖子#357:https://forums.getpebble.com/discussion/8077/windows-phone-8-pebble-app/p5 ..我認爲這會有所幫助!

+0

如果我理解正確,建議使用RfcommDeviceService。但是在這個服務中有一些錯誤。這就是我使用StreamSockets的原因。在我使用它之後,WIndowsPhone上的所有錯誤都已修復。 – Vitaliy

+0

如果它對您有用,此代碼在Windows 10上完美運行。這就是爲什麼我們決定停止支持Windows 8.1平板電腦 – Vitaliy