2016-10-11 6 views
0

シリアルとBLEの両方を含む複数のデバイスをサポートする必要があります。 Package.appxmanifestファイルに次のコードを追加すると、エラーが発生します。Windows 8.1のPackage.appxmanifestにrfcommおよびgenericAttributeProfileデバイス機能を追加する方法。

Windowsストアアプリ「blah.blah_blah!App」をアクティブ化できません。アクティベーション要求がエラー 'E_INVALIDARG'で失敗しました。

<m2:DeviceCapability Name="bluetooth.genericAttributeProfile"> 
    <m2:Device Id="any"> 
    <m2:Function Type="name:heartRate"/> 
    </m2:Device> 
</m2:DeviceCapability> 

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

答えて

1

あなたのプロジェクトのエラーが再現しました。 Bluetooth.genericAttributeProfileまたはBluetooth.rfcomを追加するだけでOKです。だから私は再現性を引用してエラーが発生したと思うし、あなたはBluetoothを追加し、すべてのBluetoothのサービスを追加するために、以下の手順に従うことができます。背後にあるコードで enter image description here

、あなたはvar rfcommDeviceService = Windows.Devices.Bluetooth.Rfcomm.RfcommDeviceService; でRfcommDeviceServiceを追加し、var gattDeviceService = Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService;でgattDeviceServiceを追加することができます。

関連する問題