Page 1 of 1

Problem discovering twice

Posted: Wed Dec 28, 2005 8:09 pm
by MarkW
Hello,

I modified the BlueTools FindAndConnect sample which came with the download. I am testing it on an iPAQ using the Widcomm stack. I changed the MainForm to be called modally from another startup form when I press a button. This works fine the first time the form is loaded. If I press the button again a second time, the discovery does not return any devices. Also, I had to move the Manager.Dispose call into the startup form otherwise I got an exception the second time into MainForm. Is there something special I have to do to make the code run twice without having to exit the entire application and restart it?

Thank you

RE: Problem discovering twice

Posted: Thu Dec 29, 2005 6:49 pm
by zelander
1. Don´t move dispose.
2, Check boolean variable if bluetools is in "searchmode". Don´t remember the name right now.
3. If not in search. Call search...

(Not sure of this, but as I can remember it was how i solved it 3 mounth ago)

/Bjoern

RE: Problem discovering twice

Posted: Tue Jan 03, 2006 1:19 pm
by johan
Manager.Dispose() should only be called when the application exits.

The Network.DeviceDiscovered event will only be called for new devices.

Network.DiscoverDevices() will always return all devices on the network. After first doing a new device discovery.

And Network.Devices will return all devices know on the network the last discovery.

Regards,
Johan

Franson Support

RE: Problem discovering twice

Posted: Fri Apr 14, 2006 3:18 am
by balloonatic
So this means there's no way of turning BT off and back on again until you exit the application and start it up again?

I must be missing something?

See Yah

RE: Problem discovering twice

Posted: Fri Apr 14, 2006 4:18 pm
by johan
Yes, that is true in BlueTools 1.10

Regards,
Johan

Franson Support