network unreachable

Topics: Bluetooth - Microsoft
Apr 13, 2012 at 6:42 PM

I'm getting a network unreachable socket exception when doing a connect as a bluetooth client to a UUID of my own setting.  The same code works when connecting to one device, but to a different device I get this error.  What does it mean?  Is it a pairing problem?  The device shows up as a bluetooth device on the laptop, but sometimes I get a popup to pair again.  Any suggestions would be appreciated.  Code snippet:

        readonly string WatchUUID = "{4EF89B29-CFC1-40A8-B42F-0761707D57B1}";

            try            {               

client = new BluetoothClient();
                client.Connect(mAddr, WatchUUID);

} catch (SocketException ex) { }

Apr 18, 2012 at 5:55 PM

I looked into that code recently for another user.  (Assuming you're using the Microsoft stack on desktop Windows) According to (via that code means:



Error other than time-out at L2CAP or Bluetooth radio level.

So seems like a catch-all code. :-(  I wondered in the other case whether the dongle was behaving badly. Otherwise, does the device/service need authentication, if so do that first and see if that helps.