Wireless Communication Library Support Forum
Frameworks => Bluetooth Framework => Topic started by: hessuhessu 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!
-
Hi,
You can use wclAuthenticator for automaticaly pair devices.
To check is device paired or not use Device.GetPaired function.
-
is there some exmaple that i could check out how the authentificator works?
-
Authenticator Demo.
P.S. The wclAuthenticator is available in Personal and Developer Licenses only.
-
i checked thaht we did bought the developer license! Thanks for the help!
-
is there alos some how that i could check if the devices has been paired so i could start connection..
-
Yes, I wrote before: Device (TwclBluetoothDevice object) has method GetPaired
-
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.
:)
-
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..
-
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.
-
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...
-
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..
-
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.
-
Also, do you use latest WCL version (6.6.7)? Or other?
-
hi
i havent tried with MS satck without the authentificator should i do that first?
-
yep. MS works with and without the authentificator and widcomm only without. My library version is 6.6.7.0:
Dvice:
manufacturer broadcom
firmware version 2.2.14.291
HCI version: bluetooth HCI 2.1
HCI revision: 5123
LMP version: bluetooth LMP 2.1
LMp sub version : 420E
widcomm bluetooth software 5.5.0.7400
do you need enything else.. or am i even giving the right stuff :)
-
the device manage ment gives thaht the driver version is 5.5.0.7100...
-
Thanks, That is all I need. I will check it and back to you soon. Will try to do it ASAP.
-
Hi,
I have found the problem and will prepare the fix as soon as possible. I will let you know when it will be done and then we decide what to do :)
-
Hi,
Problem has been fixed. Download this file (http://www.btframework.com/wcl/wcl2wbt.zip) and replace old one from the package. You need WCL 6.6.7.