MarkW
Posts: 2
Joined: Wed Dec 28, 2005 8:04 pm

Problem discovering twice

Wed Dec 28, 2005 8:09 pm

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

zelander
Posts: 15
Joined: Thu Oct 13, 2005 1:05 pm

RE: Problem discovering twice

Thu Dec 29, 2005 6:49 pm

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

User avatar
johan
GpsGate
Posts: 15407
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Problem discovering twice

Tue Jan 03, 2006 1:19 pm

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

balloonatic
Posts: 18
Joined: Mon Aug 16, 2004 7:17 pm
Location: Canada

RE: Problem discovering twice

Fri Apr 14, 2006 3:18 am

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

User avatar
johan
GpsGate
Posts: 15407
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Problem discovering twice

Fri Apr 14, 2006 4:18 pm

Yes, that is true in BlueTools 1.10

Regards,
Johan

Franson Support

Return to “BlueTools”