win10 IoT開發 Serial?Device 返回 null

來源:互聯網
上載者:User

標籤:over   devices   dev   for   nbsp   mmu   library   com   creat   

樹莓派3,win10 Iot,串口開發,抄例子,串口擷取返回老是null,例子卻可以,代碼一樣,上網查詢結果如下:

https://stackoverflow.com/questions/34160376/windows-universal-app-serial-ports-wont-open-serialdevice-fromidasync-always-n

 

So Microsoft do not mention that you need to add something to the app manifest for serial communication nor is there a tick box in the app manifest GUI for serial communication.

The following needs to be added to your app manifest (create the <Capabilities> section if it doesn‘t exist):

<Capabilities>  <DeviceCapability Name="serialcommunication">    <Device Id="any">      <Function Type="name:serialPort" />    </Device>  </DeviceCapability></Capabilities>

UPDATE 10/2016

Microsoft have updated their documentation to reflect this requirement.

https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.serialcommunication.aspx

 

記錄並轉載

win10 IoT開發 Serial?Device 返回 null

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.