Wireless Communication Library Support Forum

Frameworks => Bluetooth Framework => Topic started by: pawelu on June 09, 2021, 08:33:23 AM

Title: VCL discover timeout
Post by: pawelu 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 (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 (https://www.dropbox.com/s/kz5zfcke2sdpni6/bt_old.png)
Title: Re: VCL discover timeout
Post by: Mike Petrichenko 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.
Title: Re: VCL discover timeout
Post by: Mike Petrichenko 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).
Title: Re: VCL discover timeout
Post by: pawelu on June 09, 2021, 11:00:45 AM
Is it possible to skip those checks for paired device to speed up discovery process?
Title: Re: VCL discover timeout
Post by: Mike Petrichenko 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.
Title: Re: VCL discover timeout
Post by: pawelu 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?
Title: Re: VCL discover timeout
Post by: Mike Petrichenko 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.
Title: Re: VCL discover timeout
Post by: Mike Petrichenko 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.
Title: Re: VCL discover timeout
Post by: pawelu on June 11, 2021, 08:17:57 AM
It works great. Thanks for adding this option.
Title: Re: VCL discover timeout
Post by: Mike Petrichenko on June 11, 2021, 08:19:33 AM
You are very welcome.