Author Topic: wclBluetoothDevice Pair request lock  (Read 56029 times)

ppaquin

  • Guest
wclBluetoothDevice Pair request lock
« on: February 06, 2013, 05:28:53 PM »
Hi,

I'm trying to pair a device with WCL (6.11.2.0). The demo app "BluetoothDiscoveryDemo" works great but it can't pair a device... It locks on the line "Device.Pair(Radio);" and never go after... If i click again on "pair" button, it  says "Authenticator is already in use".

Any idea?...

Many thanks,

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: wclBluetoothDevice Pair request lock
« Reply #1 on: February 06, 2013, 07:00:11 PM »
What bluetooth driver and os do you use?

ppaquin

  • Guest
Re: wclBluetoothDevice Pair request lock
« Reply #2 on: February 13, 2013, 09:46:46 AM »
Hi thanks for answer and sorry for delay...

I'm using a Microsoft BT Dongle ucrently, on Windows 7 64bits Pro.

By the way, i tested the dmo app "BlueToothDiscoveryDemo" on another PC (Windows 7 netbook) with a Toshiba RFCOMM BT, it don't see the radio...

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: wclBluetoothDevice Pair request lock
« Reply #3 on: February 13, 2013, 10:14:05 AM »
Hi,

Its strange. Does it show any dialog box when pairing? If no - dialog box may appear behind the main window so it looks like locked.

I have reproduced the problem. Looks like it locks when device is already paired.

With regards Toshiba: what Toshiba version do you use?

ppaquin

  • Guest
Re: wclBluetoothDevice Pair request lock
« Reply #4 on: February 13, 2013, 12:10:15 PM »
In my case, Device isn't paired (it shows "false" in pair column). But it still locks... If you get some clue on this, many thanks!

On Toshiba, I tried on Toshiba Z930-10T laptop. I don't know where I can find more information... In control Panel, it says "Bluetooth RFCOMM"

Many thanks,

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: wclBluetoothDevice Pair request lock
« Reply #5 on: February 13, 2013, 12:13:37 PM »
Pairing looks fixed (attached). Toshiba: you have to check driver version in its control panel. Unfortunately I don't know what version is installed on each device.

[attachment deleted by admin]

ppaquin

  • Guest
Re: wclBluetoothDevice Pair request lock
« Reply #6 on: February 13, 2013, 12:17:54 PM »
Thanks for you answer, i'll have a look on your code, many thanks again!

For Toshiba, here's what I get from Control Panel :
TOSHIBA
Date : 05/03/2012
Version : 8.0.2505.0
Sign : Microsoft Windows Hardware Compatibility Publisher

Reguards,

ppaquin

  • Guest
Re: wclBluetoothDevice Pair request lock
« Reply #7 on: February 13, 2013, 12:48:13 PM »
Hi, I tried the new Demo, and the fact is that it doesn't lock anymore. But I still can't pair my device with the demo app, i get "authentication error".

I put some debug points in the code, and it seems i don't go through "Device_OnPINRequest", "Device_OnPasskey" or "Device_OnNumericComparison" so I think device can't get the right PIN code...

Do i have anything wrong?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: wclBluetoothDevice Pair request lock
« Reply #8 on: February 13, 2013, 12:53:45 PM »
It looks like your device rejects authentication request or something wrong with drivers. If no one event fires then MS driver doesn't actually call pairing function and BluetoothAuthenticateDeviceEx returns Error without actualy trying to pair with device. It may appear if device is already paired or if something wrong with dongle/driver. Make sure that MS driver can pair itself (through MS BT Add device dialog).

With regards to Toshiba: I could't find exactly the same version of driver but I found 9.10.00 (T) and tested it: all works as expected. However, Toshiba SDK doesn't like if you run application from debugger. Try to reboot your laptop and run application without debugger. Also, make sure that Toshiba works itself (by running its Add device dialog).

ppaquin

  • Guest
Re: wclBluetoothDevice Pair request lock
« Reply #9 on: February 13, 2013, 02:05:22 PM »
I tried to pair the device with the Window BT Dialog, all went ok. Then the device appeared as paired in the demo app, and i even can unpair it with the demo app. But i can't pair it again... You're right, seems that pairing function isn't called...

If you have idea for that, i would be glad...

Let's forget Toshiba for the moment, that's not my main problem.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: wclBluetoothDevice Pair request lock
« Reply #10 on: February 13, 2013, 02:06:16 PM »
Device needs PIN or numeric comparison?

ppaquin

  • Guest
Re: wclBluetoothDevice Pair request lock
« Reply #11 on: February 13, 2013, 02:54:34 PM »
Device need PIN.

Well, I got some news :
- For toshiba, i'm realy sorry... BT was disabled! Now it works better than my Microsoft dongle: All is good (i can pair my device...etc.)
- For my desktop PC (with Microsoft dongle) : I can pair device in a particular case :
* I select "enum"
* I select my radio
* I click "Discover"
* While discover is running (laStatus has "Waiting for names") : i select my device and clic "pair"
=> I go through Device_OnPINRequest and get my PIN, then i have a message "select device" that has no consequences
* On next "Discover", my device is paired!

But if I wait the discover to finish, then i can't pair my device the same way... It only works when "waiting for name" is written...

I go on searching.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: wclBluetoothDevice Pair request lock
« Reply #12 on: February 13, 2013, 03:03:58 PM »
Try to:

1. find method wclBluetoothDiscovery_OnDiscoveryComplete

2. comment out those lines:
Timer.Enabled = true;
laStatus.Text = "Waiting for names";

3. Add the following lines after laStatus.Text = "Waiting for names";

Item.Selected = true;
lvDevices.Select();
RefreshDevice();
Item.Selected = false;
lvDevices.Select();

With that changes WCL will not wait on timer for names and you can try to pair immediately after discovering. I guess its something with timeout in your device. Does your device have limited discovering/connectiong mode?

ppaquin

  • Guest
Re: wclBluetoothDevice Pair request lock
« Reply #13 on: February 13, 2013, 03:07:18 PM »
I was taping this while you answer, we got the same solution. Just wonder why i can't pair a second time without launching discover again.

Thanks,

-----


I'm on the right way...

I commented all Timer_Tick method, that is called after "waiting for name" message. That seems to conflict with my actions.

Now i can pair my device without problem. Once Paired, i can unpair it but i can't pair it again unless I go on discover again.

If you have some explanation on that, i would be glad, but i think i can begin to work with such method, without pairing multiple time the same device :).

Thanks!

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: wclBluetoothDevice Pair request lock
« Reply #14 on: February 13, 2013, 03:13:13 PM »
I'm absolutely not sure why it can be but we will keep working on this. Also I was noticed that if you call Pair twice without delay it will fail. If you call pair (success or not) and then wait for about few seconds (2-3) then call pair again - it works. Probably, MS stack is not released yet and needs sometime to re-init for next pair.

P.S. Have never seen such problem on XP.

 

Sitemap 1 2 3 4 5 6 7