Author Topic: Pairing  (Read 5581 times)

Offline hessuhessu

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Pairing
« on: November 17, 2009, 10:16:18 AM »
I am using widcom stack and i was wondering is it possible to do the pairing so other way than with
Device.Pair( e.Radio, a_PIN ); cause it seems that when i do this my porgrams goes to notresponding stat untill the
pairing is doen.. also how can i check if the device is allredy paired so i don't need to do the pairing again?

Thanks for help!

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Pairing
« Reply #1 on: November 17, 2009, 10:19:45 AM »
Hi,

You can use wclAuthenticator for automaticaly pair devices.

To check is device paired or not use Device.GetPaired function.

Offline hessuhessu

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Pairing
« Reply #2 on: November 17, 2009, 10:24:46 AM »
is there some exmaple that i could check out how the authentificator works?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Pairing
« Reply #3 on: November 17, 2009, 10:27:25 AM »
Authenticator Demo.

P.S. The wclAuthenticator is available in Personal and Developer Licenses only.

Offline hessuhessu

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Pairing
« Reply #4 on: November 17, 2009, 10:30:55 AM »
i checked thaht we did bought the developer license! Thanks for the help!

Offline hessuhessu

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Pairing
« Reply #5 on: November 17, 2009, 10:49:48 AM »
is there alos some how that i could check if the devices has been paired so i could start connection..

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Pairing
« Reply #6 on: November 17, 2009, 11:44:05 AM »
Yes, I wrote before: Device (TwclBluetoothDevice object) has method GetPaired

Offline hessuhessu

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Pairing
« Reply #7 on: November 17, 2009, 11:59:37 AM »
yes.. i think i am doing that but the pairing does not start untill i try to make connection to the devices. i Would like to first check the pairing and pair the devices that are not paired and then connect the devices to my system.
:)

Offline hessuhessu

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Pairing
« Reply #8 on: November 17, 2009, 12:06:33 PM »
I think i mean thaht i would like to first pair all the needed devices with the sytem and form a connection after all the devices are paired. but if i activate the authentificatro and for example check in while loop if the devices thaht i want are paired mys program will never get out of the while loop cause tha pairing doesent seem to start..

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Pairing
« Reply #9 on: November 17, 2009, 12:20:37 PM »
I am sorry, I didn't explaing it all. My fault :)

With wclAuthenticator you do not need to think about pairing and paired devices. Simple activate wclAuthenticator (please, refer to Authentication Demo). The set wclClient.BluetoothParams.Authentication = true. And then simple call wclClient.Connect. If device need pairing then OnPINRequest even fires (from wclAuthenticator) and your application should provide PIN code for device. If pairing will complete success (and connection established) onConnect event fires (from wclClient) with Error = WCL_E_SUCCESS. If pairing will not complete with success or connection will not established then Error parameter will contain error code (for example, WCL_E_ACCESS_DENIED).

The same for wclOPPClient, wclFTPClient, wclServer and wclOPPServer.

So with using this you do not need to check device's paired status and do not need to think how to pair with device.

Offline hessuhessu

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Pairing
« Reply #10 on: November 17, 2009, 12:55:49 PM »
hi again.. i think that the authentificator is not working properly.. or int he pairing with the authentificator seems to be something wrong.. When i doesn't use it and do the paring by hand my system pairs the devices first altought freezes for a while and then forms connections and all seems to be in order. But when i try to do the connection with the authentificator my system can make usually first and second connection but then it freezes and for a while i get error code 43 from the wclClient_OnConnect(object sender, wcl.wclConnectEventArgs e) event.. i am using widcomm so coudl the problem be in this or what..
my connection also uses wclClient_OnData(object sender, wcl.wclDataEventArgs e) event where i read data coming from my sesnor...

Offline hessuhessu

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Pairing
« Reply #11 on: November 17, 2009, 01:03:37 PM »
and hai again.. When do the connection with using my old bleutooth dongle that uses MS stack.. the connection works smooth as silk :D so i think there might be something wrong with the widcomm bluetooth pairing or connection..

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Pairing
« Reply #12 on: November 17, 2009, 01:06:22 PM »
So connection works fine with WD and MS if you use it without wclAuthenticator. And if you use wclAuthenticator then it works good only with MS, am I correct? If so, can you please tell me your widcomm driver version? I will recheck it and fix if there is something wrong with my coding or will try to find workaround if there is something wrong with widcomm.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3053
  • Karma: 1000
    • Soft Service Company
Re: Pairing
« Reply #13 on: November 17, 2009, 01:07:49 PM »
Also, do you use latest WCL version (6.6.7)? Or other?

Offline hessuhessu

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: Pairing
« Reply #14 on: November 17, 2009, 01:13:12 PM »
hi
i havent tried with MS satck without the authentificator should i do that first?

 

Sitemap 1 2 3 4 5 6 7 8 9