Author Topic: wclClientConnectionConnectEvent event is not getting called from wclThread  (Read 16545 times)

Offline MrPaulCarpenter

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
I have moved all of my logic to interact with WCL library into a singleton object that inherits from wclThread.  I did that to insure that all bluetooth calls are on the same thread.  Data is passed in using an observable collection.

However, my wclClientConnectionConnectEvent event is not getting called.  Using debugger I have confirm that:
1)   new wclRfCommClient() is successful,
2)   OnConnect is assigned,
3)   When btClient.Connect(radio) gets called, OnConnect is still assigned
4)   Events OnDiscoveringStarted, OnDeviceFound, OnDiscoveringCompleted, OnStatusChanged all are getting called
5)   In applications where I am not using wclThread, this works



Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Can you please send me your project so I can test it and fix (if needed) on my side.

Thank you.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: wclClientConnectionConnectEvent event is not getting called from wclThread
« Reply #2 on: November 01, 2018, 09:39:57 AM »
Ok, here is very simple demo that shows how to use wclRfCommClient in thread (wclThread).

It discovers for devices, looks for first with SPP service (enumerate services of all found devices) and connects to it. Then is simple waits for any key to disconnect. While waiting it receives data from device.

P.S. Add correct reference to Bluetooth Framework DLLs before build the project.

 

Sitemap 1 2 3 4 5 6 7