I'm trying to make my Own 'proximitySender' with a couple of new features I needed, but when I try to discover remote devices the application don't respond for a long time period. Maybe some remote device takes a lot of time to respond to a discover petition? or I am doing something wrong?
The code is something like this:
t1 = new Thread(deviceInquirerThread);
t1.Start();
private void deviceInquirerThread()
{
while (!this.inquiryShutdown)
{
if (this.device != null)
{
if (!this.inquiryActive)
{
MessageBox.Show("Buscando dispositivos remotos");
wcl.wclErrors.wclShowError(bluetoothDiscovery.Discovery(this.device));
}
}
else
MessageBox.Show("No hay dispositivo USB");
Thread.Sleep(10000);
}
}