• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

Very slow Device search

Started by mikerabat, February 15, 2018, 07:15:56 am

Previous topic - Next topic

mikerabat

Hi Folks!

We are facing the following problem:
We have a medical devices that supports Bluetooth and allows to communicate a stream of live data
via BT to the user.
The problem is that there may be a bunch (e.g. in the maximum case we assume around 40 recorders) that
may be paired with windows.
So... the thing is how can we detect which of these recorders is powered on and connects with our software in a fast way.

By now we tried to create a thread for each paired device and issued the Active:=True (connect) command on the TnrBT component
in that thread. The thing is that this is veeeeery slow if there is more than one device paired with the computer.

As a first step to speed the process up I removed the search for services (since the device only supports the serial profile...)
by overriding the "RequestDeviceHandle" method in a new class.

Still the connection process is sometimes very slow if there is more than one device paired.

Is there anything I need to be aware of?

By the way the TnrBT class is not fully implemented and the compiler throws a few warnings that the ClearDeviceInput, ClearDeviceOutput and
ClearDevicebuffers methods are only abstract!

Roman Novgorodov

Hello

Can you provide some more details about following things:

1) Windows version
2) BT adapter


Please note that if you use single BT adapter with all 40 devices it is will slow any way.
I do not think that BT driver of your adapter can correctly provide 40 connections.

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

mikerabat

Hi!

I got here Windows 10 Home edition.
The attached Bluetooth USB is from "Conrad" - Model BT-Micro3E2x

Also i don't want to connect to 40 devices at once but just "search" for
the one or two devices that are connectable.
I do that search by trying to connect to each one within a thread.
If that connection cannot be established there the device is marked as disconnected.

Out of curiosity: Is there an upper limit of devices one can pair with windows?

kind regards
  Mike

mikerabat

Hi!

So... actually it is even slow if there are only two devices paired.

1.) Is it a bad idea to have two separate threads to connect to the devices to test if they are avail?
2.) Is there another procedure to check if there is a connectable device (so... it's in the list and it's radio is on)
so I need to issue only a connect to that one device...

kind regards
   Mike