Wireless Communication Library Support Forum

Frameworks => Bluetooth Framework => Topic started by: dimitrog on November 27, 2013, 06:21:57 PM

Title: Discovery not working
Post by: dimitrog on November 27, 2013, 06:21:57 PM
Hello,

I am evaluating the wcl software.
The examples that come with the installer work just fine.
But when trying to use the dll for discovery purposes it does not work.
The code seems identical with the discovery example.
The differences are the following:
1.The discovery class is static (tried also non static with no luck)
2.The discovery routine is called from inside a thread(we need the thread, but checked without the thread also - no luck)
So these differences do not seem to matter.
What I cannot understand is that the discovery seems to start (using wclBluetoothDiscovery.Discovery), but the OnDiscoveryStarted is never raised and of course the discovery never completes.
Any ideas?

Also is there any way to initialize a discovery synchronously?

thank you for your time
all the best

Dimitris
Title: Re: Discovery not working
Post by: Mike Petrichenko on November 27, 2013, 07:09:00 PM
Hello,

WCL requires message loop to handle events so if your thread does not have messag eloop WCL will not work.
Title: Re: Discovery not working
Post by: dimitrog on November 28, 2013, 03:54:30 PM
Hi again,

thank you for your help.
Application.DoEvents() solved the problem

Dimitris