The scenario is: 1. Turn on my Nokia Bluetooth BH-214. 2. Wait for connection eastablished with my Lumia 822. 3. run the code.
The exception is thrown from
await socket.ConnectAsync(selectedDevice.HostName, "1");
Message = "Only one usage of each socket address (protocol/network address/port) is normally permitted. (Exception from HRESULT: 0x80072740)"
Code: PeerFinder.AlternateIdentities["Bluetooth:Paired"] = ""; var pairedDevices = await PeerFinder.FindAllPeersAsync();
if (pairedDevices.Count == 0)
{
Debug.WriteLine("No paired devices were found.");
}
else
{
// Select a paired device. In this example, just pick the first one.
PeerInformation selectedDevice = pairedDevices[0];
StreamSocket socket = new StreamSocket();
try
{
await socket.ConnectAsync(selectedDevice.HostName, "1");
}
catch (Exception ee)
{
}
}
Does that mean, if audio BT headset has been connected with native app, I can't connect with it? I have my own musicplayer and I want listen comments sent from BT headset for play/pause/FF/FW, that's all. Thanks!