Wireless Communication Library Support Forum

Frameworks => Bluetooth Framework => Topic started by: TrevorDrawbridge on November 23, 2018, 08:13:00 PM

Title: Discovery events not firing
Post by: TrevorDrawbridge on November 23, 2018, 08:13:00 PM
I am developing a simple vb.net console project, but am unable to get the DiscoveryStarted, DeviceFound or DiscoveryCompleted events to fire. The AfterOpen event does fire after which I start discovery. The Bluetooth Manager example works correctly. The code is attached together with the output produced on the console when run. What am I doing wrong?
Title: Re: Discovery events not firing
Post by: Mike Petrichenko on November 23, 2018, 09:13:46 PM
Hello,

Bluetooth Framework includes Console demo application that shows how to use it in console. In fact there are 2 ways. The simple one (shown in demo) is to switch to "synchronouse" mode.

So you have to add this line

wclMessageBroadcaster.SetSyncMethod(wclMessageSynchronizationKind.skNone)

as first code line of your Main() function.

More information about Events in Bluetooth Framework (https://forum.btframework.com/index.php/topic,3520.msg9021.html#msg9021).
Title: Re: Discovery events not firing
Post by: TrevorDrawbridge on November 24, 2018, 01:46:11 AM
Thanks Mike.