When executing the following lines in my Windows Store App project
PeerFinder.AlternateIdentities["Bluetooth:Paired"] = "";
PeerFinder.Start();
I get the following error:
The requested allocation size was too large (Exception from HRESULT: 0x80080011 (MEM_E_INVALID_SIZE))
Which is the problem there? How do I solve it?
It appears that it is not possible to connect a Windows Store app to a Bluetooth device the same way it can be done in Windows Phone 8.
While PeerFinder
uses Bluetooth in Windows Phone 8, Wi-Fi Direct is used in Winsdows Store apps for peer discovery. That said, it seems the scenario of connecting a Windows Store app to a Bluetooth device is not currently possible.
If you are developing App to Device, PeerFinder.AlternateIdentities["Bluetooth:Paired"] = "";
is correct. Look at this.
The solution to you receiving this message “The requested allocation size was too large”
is to remove PeerFinder.Start();
. It should work.
I'm also working on Windows Store App for Bluetooth. But so far, it's not working. The method FindAllPeerAsync
kept giving me null - nothing is found. If you managed to get Bluetooth working, please advice me and well.
User contributions licensed under CC BY-SA 3.0