TwclGattClientConnection.Connect(Int64,Boolean,Boolean) Method

Connects to a remote device.

Namespace: wclBluetooth
public
 function Connect(const Address: Int64; const ConnectOnRead: Boolean;
 const ForceNotifications: Boolean): Integer;

Parameters

Address
Type: Int64

A remote device MAC address.

ConnectOnRead
Type: Boolean

A Boolean indicates whether a connection should made during Connect call or on first services read. True indicates that the connection should be executed on first services read on when OS decided to do that.

ForceNotifications
Type: Boolean

A Boolean indicates that the notifications (and/or indications) should be forced. This should be set to True for some boards (such as Bluno, Bluno Mega and some others) that do not have Characteristic Client Configuration Descriptor.

Return Value

Type: Integer

If the function succeed the return value is wclErrors.WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.

The method starts a connection operation to a remote device. If the method success that does not mean that the connection was established. That just means that the connection operation was started. The real connection result will be passed to the OnConnect event handler.