2016-10-11 8 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을 추가하기 만하면됩니다. 그래서 나는 반복성을 인용함으로써 야기 된 오류를 생각하고, 아래의 단계를 따라 Bluetooth를 추가하고 모든 Bluetooth 서비스를 추가 할 수 있다고 생각합니다. 뒤에 코드에서 enter image description here

, 당신은 var rfcommDeviceService = Windows.Devices.Bluetooth.Rfcomm.RfcommDeviceService; 에 의해 RfcommDeviceService을 추가하고 var gattDeviceService = Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService;에 의해 gattDeviceService을 추가 할 수 있습니다.