Does anyone have a clue why WindowsBluetoothListener.Start() fails on Windows 8.1?
Below are a stack trace and the value of serverEP variable.
Thanks in advance for your guidance.
Gyle
This is the stack trace:
System.Net.Sockets.SocketException was unhandled
HResult=-2147467259
Message=An invalid argument was supplied
Source=System
ErrorCode=10022
NativeErrorCode=10022
StackTrace:
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at InTheHand.Net.Bluetooth.Msft.WindowsBluetoothListener.Start(Int32 backlog)
at InTheHand.Net.Bluetooth.Msft.WindowsBluetoothListener.Start()
at InTheHand.Net.Sockets.BluetoothListener.Start()
at MagicKeyService.Connector.Bluetooth.BluetoothAcceptThread.Run()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: This is the value of the serverEP:
- serverEP {000000000000:2cb7d2f7582311e19ef31cc1deb5b4db} InTheHand.Net.BluetoothEndPoint
- base {000000000000:2cb7d2f7582311e19ef31cc1deb5b4db} System.Net.EndPoint {InTheHand.Net.BluetoothEndPoint}
-
Address {000000000000} InTheHand.Net.BluetoothAddress
AddressFamily 0x00000020 System.Net.Sockets.AddressFamily HasPort false bool
-
m_id {000000000000} InTheHand.Net.BluetoothAddress
m_port 0xffffffff int
-
m_service {2cb7d2f7-5823-11e1-9ef3-1cc1deb5b4db} System.Guid
Port 0xffffffff int
- Service {2cb7d2f7-5823-11e1-9ef3-1cc1deb5b4db} System.Guid
-
Static members
_addrFamily 0x00000020 System.Net.Sockets.AddressFamily _isBlueZ false bool defaultPort 0xffffffff int MaxPort 0x0000ffff int MaxScn 0x0000001e int MinPort 0x00000001 int MinScn 0x00000001 int