im trying to make a multi-threading app that connect to unknown devices using OBEXObjectPush. This app is sending info every x seconds. The problem occurrs sometimes for a long period of time, the DiscoverServices message throws a "Service lookup Timeout" exception, maybe six times, once or always.
question number 2, its possible to change the timeout for ServiceDiscovery?
This is a piece of the code (The service discover code):
services = device.DiscoverServices(ServiceType.OBEXObjectPush);
if (services.Length > 0)
service = (RemoteService)services;
fileStream = new FileStream(...);
newPush = new ObexObjectPush(-1);
newPush.PushFile(fileStream, fileName, service.Stream);
catch (Exception e)
if( service != null )
using: Using Windows Vista, Widcomm bluetooth device and my target is a cellphone