Author Topic: Ignore devices whose needs a pass  (Read 8470 times)

jordi120

  • Guest
Ignore devices whose needs a pass
« on: August 04, 2010, 10:36:37 PM »
Hello,

I'm doing a little aplication of proximity marketing and is based in the proximitysender class. I have a little problem, sometimes and suddenly, some devices start to require a pass to pair. There is a way to ignore this petitions? that's because if there is nobody in front of the computer, the program stops sending until the pass has been entered, and that's a big trouble. There is a way to silent pair a device with the proximity sender? I know this is done with the authenticator class, but i'm not sure if it's posible in this kind of situations.

Lot of thanks and sorry about my lack of english.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Ignore devices whose needs a pass
« Reply #1 on: August 04, 2010, 10:37:40 PM »
Hello,

You are right, you have to use wclAuthenticator (it is shown in demo app).

jordi120

  • Guest
Re: Ignore devices whose needs a pass
« Reply #2 on: August 05, 2010, 01:10:14 AM »
But in the demo app, if the proximitySender succesfully starts, then you close the autenticator.

The problem is that the proximity Sender is sending to every devices but some of them may require a pass, I don't know how to distinguish wich ones requires the pass. If I could do something like

        private void wclProximitySender_OnFileSendStarted(object sender, wcl.wclFileSendStartedEventArgs e)
        {
            if(e.Device.REQUIREPASS)
            {
                 wclProximitySender.stop();
                 wclAuthenticator.Open();
                 ...
            }
            else
                lbLog.Items.Add("OnFileSendStarted :: " + e.Device.Address + " :: " +
                    e.FileName);
        }


Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Ignore devices whose needs a pass
« Reply #3 on: August 05, 2010, 08:18:38 AM »
Hello,

No, in demo i do NOT so.

It is impossible to know device needs pairing or not. It is not WCL limitation but it is impossible on bluetooth level.

jordi120

  • Guest
Re: Ignore devices whose needs a pass
« Reply #4 on: August 06, 2010, 01:39:58 AM »
I'm sorry, I just look at the API and found that the error code for a success is 0. I thought that this piece of code was closing the authenticator on the start of the proximity sender.

            wclAuthenticator.Open();
            if (wcl.wclErrors.wclShowError(wclProximitySender.Start()))
                wclAuthenticator.Close();


Then I have no idea why is happening this. Some devices request a password, but the authenticator doesn't work and you got the clasic 'put a password' window on your computer. I'm pretty sure this is not fault of the wcl but the device or computer itselfs, i just wanna know what's happening.

Thank you for your help, and congratulations for this great library, one of the best investments we made.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Ignore devices whose needs a pass
« Reply #5 on: August 06, 2010, 11:44:12 AM »
Does it work with Demo app? And what is BT drivers you use?

 

Sitemap 1 2 3 4 5 6 7