Wireless Communication Library Support Forum
Frameworks => Bluetooth Framework => Topic started by: eeybye on June 08, 2015, 02:32:33 PM
-
Hello,
Often, the wclBluetoothDiscovery doesn't detect our device before going into Windows's 'Add a device' dialog. Is there a specific reason for this??
We're using the MS stack, on windows.
-
Hello,
Sorry but I am not sure I understood what you mean. Can you explaing?
-
Okay,
In my code, I call wclBluetoothDiscovery.Discovery(.., 5, true)
and in the event method OnDiscoveryComplete, I list the devices found and then calls wclBluetoothDiscovery.Discovery(.., 2, false) again. This runs in a loop.
Often, the devices returned in the OnDiscoveryComplete dosn't contain my BT device. When I enter the 'Add a device' dialog in windows, this dialog will display found BT devices. After a few seconds, my BT device appear in the 'Add a device' dialog, and then it's also returned in the OnDiscoveryComplete method of wcl. It might not have anything to do with wcl, but is Windows doing something perhaps?
Best regards,
Erling
-
You use very short timeout for discovering. Use 20-30 seconds and all devices will be found.
Also, you use Fast Discovery = true (in first attempt). It returns only paired/remembered devices .
-
Thanks for your reply.
Increasing the timeout value fixed the issue - thank you.
-
You are welcome.
If your device is closer to PC and you use it in not so busy area it is not bad idea to use 5-15 seconds interval. If it is far and you have lot of devices around use something like 30-40 seconds. That recomendation is based on our experience.