Author Topic: VCL discover timeout  (Read 19331 times)

Offline pawelu

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
VCL discover timeout
« on: June 09, 2021, 08:33:23 AM »
Hello,

I have a problem with discovering BT (classic) devices. When I run demo app RfCommClient and click on Discover button the process of discovering take very long time and timeout value is ignored.

Radio.Discover(5, dkClassic); // 5 second timeout

https://www.dropbox.com/s/magd3crcl18bth8/bt_new.png

I checked it on old version of WCL (6.12.9) which is using wclBluetoothDiscovery and whole process ends after timeout is reached and all available devices are shown on the list.

wclBluetoothDiscovery.Discovery(Radio, 5); // 5 second timeout

https://www.dropbox.com/s/kz5zfcke2sdpni6/bt_old.png

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: VCL discover timeout
« Reply #1 on: June 09, 2021, 09:44:48 AM »
Hello,

Thank you for the information. We will check it and fix as soon as possible. I will back to you shortly.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: VCL discover timeout
« Reply #2 on: June 09, 2021, 09:52:31 AM »
Ok, I just forgot why it appers. So it appears because you have lot of paired devices.

In new version discovering returns aonly available devices if they are not paired. After discovering completed the discovering procedure checks each paired device is the device available or not. And if it is available it also reported as found. This process takes time if there is lot ot paired devices (especially if device is not available).

Offline pawelu

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: VCL discover timeout
« Reply #3 on: June 09, 2021, 11:00:45 AM »
Is it possible to skip those checks for paired device to speed up discovery process?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: VCL discover timeout
« Reply #4 on: June 09, 2021, 11:02:47 AM »
Yes (by modify the code) but it will always return all paired devices even the device is not available. If you would like to do that and have Bluetooth Framework source code e-mail us at support@btframework.com and we will provide an information how to change the source code to avoid such check.

Offline pawelu

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: VCL discover timeout
« Reply #5 on: June 09, 2021, 03:02:17 PM »
I don't have source codes. So currently is not possible to achieve similar functionality like in older WCL version? If not, can you add this option in some future version of WCL?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: VCL discover timeout
« Reply #6 on: June 09, 2021, 03:15:04 PM »
Unfortunately no. We changed that because got lot of reports about discovered paired devices that are not really available. The only way to do what you need is to change source code on your side to get what you need.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: VCL discover timeout
« Reply #7 on: June 10, 2021, 08:34:23 PM »
In the latest release (7.10.19.0) we have added ClassicDiscoveringCheckPaired property for the wclBluetoothRadio object that allows to control how paired devices should be processed.

Offline pawelu

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: VCL discover timeout
« Reply #8 on: June 11, 2021, 08:17:57 AM »
It works great. Thanks for adding this option.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: VCL discover timeout
« Reply #9 on: June 11, 2021, 08:19:33 AM »
You are very welcome.

 

Sitemap 1 2 3 4 5 6 7