Recent Posts

Pages: [1] 2 3 ... 10
1
Hi,

Yes, you are absolutely correct. Once you discovered (found) your device you have to connect to it to be able to communicate with your device. Please, note that you do not need to execute pairing. Bluetooth Framework provides something known as Auto-Pairing (it is legacy term used in legacy Wireless Communication Library, because WCL provided 2 differen ways to pair with device: manual and auto). In fact Bluetooth Framework uses identical mechanism for both pairing methods.

So let me explaing it first: in terms of Bluetooth Framework manual pairing means that your application calls Pair method to pair with device. Auto pairing means that your application does not call Pair method. Instead of that an application simple tries to connect to device. If device requires pairing (not all devices require pairing) then Bluetooth Framework fires pairing events (the same events used in case you call Pair method) and your application may provide pairing details (PIN, user confimration or other).

So better to leave it with auto pairing without call Pair directly. however, it depends on your application requirements so that was just description of process and recomendation of usage.

Now connection. So once you found your device (or use previously found MAC, because if you know your device's MAC you do not need to rediscvoer it each time it the MAC is fixed) you can connect.

To connect to your device you have to use wclRfCommClient (we are talking about Classic Bluetooth Devices, in case of Bluetooth Low Energy GATT devices plrease refer to this article: https://www.btframework.com/ble.htm). The rfCommClient has few properties that is used to connect to your device:

Address - a remote device MAC;
Service - a Bluetooth Service's UUID you want to connect to. By default (if service not specified) rfCommClient uses Serial Port Profile (SPP) service's UUID.
Channel - RFCOMM channel number (you usualy do not need to set it).

Once all properties are set call Connect method. The method simpel startsconnection. If it returns WCL_E_SUCCESS that doe snot mean that connection has already been established. That just means that connection procedure has been started.

Once connection procedure completed (with or without success) the OnConnect event fires (with real connection result).

After that you can use Write() method to send data to a connected remote device. When data received from a connected device the OnData event fires.

For more information about RfComm communication please take a look on RfCommClient demo application.

Please note that the demo app sends and receives data as text (it was made so to be able to run RfCommClient on one PC and RfCommServer on other and test them by sending simple text messages).

Should yo uhave any question please do not hesitate to conect us: https://www.btframework.com/contacts.htm

By the way: If you are developing console app or Windows service please also take a look on this post: https://forum.btframework.com/index.php/topic,3520.msg9021.html#msg9021

Also take a look on Console demo application from Bluetooth Framework package.
2
Hi Mike
I have successfully discovered my device and paired with it. I then enumerate its services. I have not figured out where to go beyond this. I assume I need to connect to the device somehow and create an event handler to receive data from it. I have looked at the examples, but they seem to stop once they get to the same place as me.

I would appreciate some help to get past this hurdle please.

Thanks
Trevor
3
News And Events / Bluetooth Framework 7.6.7.0 has been released
« Last post by Mike Petrichenko on March 10, 2019, 01:41:13 AM »
What's new

* Minor updates in Bluetooth Pairing code;
* RemotePair() function now checks that device is not paired. If device is paired the function returns error code;
* RemoteUnpair() function now checks that device is paired. If device is not paired the function returns error code.

https://www.btframework.com/bluetoothframework.htm
4
Hello,

This error usualy means that device requires pairing before connecting. Also it may appear when PC has device in paired devices list but device itself was unpaired with PC (PC is not in paired devices list).
5
Bluetooth Framework / Cause of "access denied" when attempting to connect?
« Last post by mdlieder on March 07, 2019, 01:08:04 AM »
Hello! A few of our users are encountering access denied (WCL_E_BLUETOOTH_ACCESS_DENIED) errors when attempting to connect to a wclRfCommClient device, both Windows 7 users and Windows 10 1607 users. Do you happen to know potential causes of that error?

Thanks!
6
News And Events / WiFi Framework 7.6.8.0 has been released
« Last post by Mike Petrichenko on March 05, 2019, 10:53:48 PM »
What's new

* Now WiFi Direct Device does not resets (clears) its MAC addresses (Local and Remote) when disconnected;
* Fixed issue with incorrect OS version detection that appeared in some situations.

https://www.btframework.com/wififramework.htm
7
News And Events / Timeline Framework 7.0.2.0 has been released
« Last post by Mike Petrichenko on March 05, 2019, 10:53:17 PM »
What's new in this release:

* Fixed freezing issue when open Timeline on unsupported OS;
* Fixed issue with incorrect OS version detection that appeared in some situations.

https://www.btframework.com/timelineframework.htm
8
News And Events / Serial Framework 7.4.3.0 has been released
« Last post by Mike Petrichenko on March 05, 2019, 10:52:36 PM »
What's new in this release:

* Fixed issue with incorrect OS version detection that appeared in some situations.

https://www.btframework.com/serialframework.htm
9
News And Events / IrDA Framework 7.5.2.0 has been released
« Last post by Mike Petrichenko on March 05, 2019, 10:52:07 PM »
What's new in this release:

* Fixed issue with incorrect OS version detection that appeared in some situations.

https://www.btframework.com/irdaframework.htm
10
News And Events / Bluetooth Framework 7.6.6.0 has been released
« Last post by Mike Petrichenko on March 05, 2019, 10:51:23 PM »
What's new

* Fixed issue with incorrect OS version detection that appeared in some situations;
* Radio turning on and off code has been reworked to support Windows 8 and Windows 8.1;
* Error codes have been changed and update.

https://www.btframework.com/bluetoothframework.htm
Pages: [1] 2 3 ... 10