Posts: 180
Joined: Wed Sep 01, 2004 3:48 pm

Lost device/service still registered as exist

Fri Jan 01, 2010 9:58 pm


1. in order to debug a PND application (using SPP), I'm using the "SimpleService" on my laptop. The issue is that when I'm publishing the SPP in my laptop and connect to it from the PND - all goes ok. but then I wanted to test a 'lost connection' so I deadvertised the SPP on my laptop. the PND got the exception on the read datastream and my procedure tried to connect again to the laptop (im saving the MAC, DeviceName, ServiceName and SCN). and here is the issue: the netwrok obj in the PND still 'recognize' that it has a device in the devices array and when I run the connect function - I'm getting a Remote Device!!! which is, as i said, was deadvertised. I tried also close the BT in my laptop, same results.
Also the ConnectService from that 'ghost' RemoteDevice returns a service!!

so my question is how can I recognize that the 'server' is not there anymore if the BT objects say it is there?!

2. (less important) when using the Connect function - im getting a RemoteDevice but its name property is empty. why is that?


Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Lost device/service still registered as exist

Mon Jan 04, 2010 1:40 pm

The service is probably cached. Since bluetooth services roam a lot, services are cached frequently even at the core level. That means you might see services that really "are not there".


Return to “BlueTools”