Wireless Communication Library Support Forum
Frameworks => Bluetooth Framework => Topic started 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)
-
Hello,
Thank you for the information. We will check it and fix as soon as possible. I will back to you shortly.
-
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).
-
Is it possible to skip those checks for paired device to speed up discovery process?
-
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.
-
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?
-
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.
-
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.
-
It works great. Thanks for adding this option.
-
You are very welcome.