Author Topic: Discovery not working  (Read 1956 times)

Offline dimitrog

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Discovery not working
« 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

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: Discovery not working
« Reply #1 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.

Offline dimitrog

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Discovery not working
« Reply #2 on: November 28, 2013, 03:54:30 PM »
Hi again,

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

Dimitris

 

Sitemap 1 2 3 4 5 6 7 8 9