Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: In XE7 BlueChat sample, where is the device bonded? Is it incomplete?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Jun 30, 2016 5:51 PM Last Post By: Jorge Uriarte
Jorge Uriarte

Posts: 41
Registered: 11/28/14
In XE7 BlueChat sample, where is the device bonded? Is it incomplete?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 27, 2016 7:36 PM
Hi There,
The Android BlueChat sample seems to be the right code and simple enough for a beginner to start experimenting with Bluetooth. I compiled with no errors into my phone. I was able to see the paired devices, but never able to send or receive a character. The code consists of two forms, but as I study the code, though I am not an expert, I could not find where the device gets bonded (socketed). Here I post the code of the two forms for you experts to point where my mistake is, or how to make this code work.

Thanks for helping,
Jorge

Note: It was interesting to see that the sample include this commented line:
//pairedDevices:= mBluetoothAdapter.getBondedDevices();

//-------------------------------------------------------------------------------------------------------------------
unit uBlueChat;

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.ListBox, FMX.StdCtrls, FMX.Edit,
FMX.Layouts, FMX.Memo, System.Bluetooth, uChatManager, FMX.Controls.Presentation, uPairDevices;

type
TFrmMainChatForm = class(TForm)
MmReceived: TMemo;
EdNewText: TEdit;
BtSend: TButton;
PnSelectDevice: TPanel;
CbDevices: TComboBox;
BtnUpdate: TButton;
PnSend: TPanel;
BtnFindNew: TButton;
PnMain: TPanel;
BackgroundImage: TImageControl;
procedure FormShow(Sender: TObject);
procedure BtnUpdateClick(Sender: TObject);
procedure BtSendClick(Sender: TObject);
procedure CbDevicesChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure EdNewTextKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);
procedure BtnFindNewClick(Sender: TObject);
procedure FormVirtualKeyboardShown(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
procedure FormVirtualKeyboardHidden(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
private
FChatManager: TChatManager;
FLastName: string;
procedure UpdateKnownDevices;
procedure OnNewText(const Sender: TObject; const AText: string; const aDeviceName: string);
public
{ Public declarations }
end;

var
FrmMainChatForm: TFrmMainChatForm;

implementation

{$R *.fmx}
{$R *.LgXhdpiPh.fmx ANDROID}
{$R *.NmXhdpiPh.fmx ANDROID}

procedure TFrmMainChatForm.BtSendClick(Sender: TObject);
begin
if cbDevices.Selected <> nil then
begin
FChatManager.SendText(EdNewText.Text);
EdNewText.Text := '';
end;
end;

procedure TFrmMainChatForm.BtnFindNewClick(Sender: TObject);
begin //pairedDevices:= mBluetoothAdapter.getBondedDevices();
FrmPairdevices:= TFrmPairdevices.Create(nil);
FrmPairdevices.ChatManager := FChatManager;
FrmPairdevices.Show;
end;

procedure TFrmMainChatForm.CbDevicesChange(Sender: TObject);
begin
FChatManager.SelectedDevice := CbDevices.Selected.Index;
end;

procedure TFrmMainChatForm.EdNewTextKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);
begin
if key = vkReturn then
BtSendClick(BtSend);
end;

procedure TFrmMainChatForm.FormCreate(Sender: TObject);
begin
FChatManager := TChatManager.Create;
if not FChatManager.HasBluetoothDevice then
begin
ShowMessage('You don''t have a bluetooth adapter');
Application.Terminate;
end;
FChatManager.OnTextReceived := OnNewText;
FChatManager.OnTextSent := OnNewText;
end;

procedure TFrmMainChatForm.FormShow(Sender: TObject);
begin
UpdateKnownDevices;
end;

procedure TFrmMainChatForm.FormVirtualKeyboardHidden(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
begin
PnMain.align := TAlignLayout.Client;
end;

procedure TFrmMainChatForm.FormVirtualKeyboardShown(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
begin
PnMain.align := TAlignLayout.Top;
PnMain.Height := ClientHeight - Bounds.height {$IFDEF ANDROID} + 20 {$ENDIF};
MmReceived.GoToTextEnd;
end;

procedure TFrmMainChatForm.OnNewText(const Sender: TObject; const AText, aDeviceName: string);
begin
TThread.Synchronize(nil,
procedure begin
if FLastName <> aDeviceName then
begin
MmReceived.Lines.Add(' ' + aDeviceName + ' :');
FLastName := aDeviceName;
end;
MmReceived.Lines.Add(' ' + AText);
MmReceived.GoToTextEnd;
end);
end;

procedure TFrmMainChatForm.BtnUpdateClick(Sender: TObject);
begin
UpdateKnownDevices;
end;

procedure TFrmMainChatForm.UpdateKnownDevices;
var
I: Integer;
begin
CbDevices.Clear;
if FChatManager.KnownDevices <> nil then
for I := 0 to FChatManager.KnownDevices.Count - 1 do
CbDevices.Items.Add(FChatManager.KnownDevices.Items[I].DeviceName);
end;

end.
//---------------------------------------------------------------------------------------------------------------------------------------------

unit uPairDevices;

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Layouts, FMX.ListBox, uChatManager,
System.Bluetooth;

type
TFrmPairdevices = class(TForm)
LbNewDevices: TListBox;
BtnDiscover: TButton;
BtnPair: TButton;
BtnClose: TButton;
procedure BtnCloseClick(Sender: TObject);
procedure BtnDiscoverClick(Sender: TObject);
procedure BtnPairClick(Sender: TObject);
procedure CreateSocketClick(Sender: TObject);
private
{ Private declarations }
procedure DoDiscoverEnd(const Sender: TObject; const ADeviceList: TBluetoothDeviceList);
public
ChatManager: TChatManager;
{ Public declarations }
end;

var
FrmPairdevices: TFrmPairdevices;

implementation

{$R *.fmx}

procedure TFrmPairdevices.BtnCloseClick(Sender: TObject);
begin
Close;
end;

procedure TFrmPairdevices.BtnDiscoverClick(Sender: TObject);
begin
ChatManager.OnDiscoveryEnd := DoDiscoverEnd;
ChatManager.DiscoverDevices;
end;

procedure TFrmPairdevices.BtnPairClick(Sender: TObject);
begin
if LbNewDevices.Selected <> nil then
ChatManager.PairTo(LbNewDevices.Selected.Text);
end;

procedure TFrmPairdevices.DoDiscoverEnd(const Sender: TObject; const ADeviceList: TBluetoothDeviceList);
var
I: Integer;
begin
LbNewDevices.Items.Clear;
for I := 0 to ADeviceList.Count - 1 do
if AdeviceList[I].IsPaired then
LbNewDevices.Items.Add(AdeviceList[I].DeviceName + '-Paired')
else
LbNewDevices.Items.Add(AdeviceList[I].DeviceName);
end;

end.

Edited by: Jorge Uriarte on Jun 27, 2016 7:37 PM

Edited by: Jorge Uriarte on Jun 27, 2016 7:40 PM

Edited by: Jorge Uriarte on Jun 28, 2016 8:58 AM
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: In XE7 BlueChat sample, where is the device bonded? Is it incomplete? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2016 9:13 AM   in response to: Jorge Uriarte in response to: Jorge Uriarte
Am 28.06.2016 um 17:58 schrieb Jorge Uriarte:
Hi There,
The Android BlueChat sample seems to be the right code and simple enough for a beginner to start experimenting with Bluetooth. I compiled with no errors into my phone. I was able to see the paired devices, but never able to send or receive a character. The code consists of two forms, but as I study the code, though I am not an expert, I could not find where the device gets bonded (socketed). Here I post the code of the two forms for you experts to point where my mistake is, or how to make this code work.

Thanks for helping,
Jorge

Note: It was interesting to see that the sample include this commented line:
//pairedDevices:= mBluetoothAdapter.getBondedDevices();

//-------------------------------------------------------------------------------------------------------------------
unit uBlueChat;

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.ListBox, FMX.StdCtrls, FMX.Edit,
FMX.Layouts, FMX.Memo, System.Bluetooth, uChatManager, FMX.Controls.Presentation, uPairDevices;

type
TFrmMainChatForm = class(TForm)
MmReceived: TMemo;
EdNewText: TEdit;
BtSend: TButton;
PnSelectDevice: TPanel;
CbDevices: TComboBox;
BtnUpdate: TButton;
PnSend: TPanel;
BtnFindNew: TButton;
PnMain: TPanel;
BackgroundImage: TImageControl;
procedure FormShow(Sender: TObject);
procedure BtnUpdateClick(Sender: TObject);
procedure BtSendClick(Sender: TObject);
procedure CbDevicesChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure EdNewTextKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);
procedure BtnFindNewClick(Sender: TObject);
procedure FormVirtualKeyboardShown(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
procedure FormVirtualKeyboardHidden(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
private
FChatManager: TChatManager;
FLastName: string;
procedure UpdateKnownDevices;
procedure OnNewText(const Sender: TObject; const AText: string; const aDeviceName: string);
public
{ Public declarations }
end;

var
FrmMainChatForm: TFrmMainChatForm;

implementation

{$R *.fmx}
{$R *.LgXhdpiPh.fmx ANDROID}
{$R *.NmXhdpiPh.fmx ANDROID}

procedure TFrmMainChatForm.BtSendClick(Sender: TObject);
begin
if cbDevices.Selected <> nil then
begin
FChatManager.SendText(EdNewText.Text);
EdNewText.Text := '';
end;
end;

procedure TFrmMainChatForm.BtnFindNewClick(Sender: TObject);
begin //pairedDevices:= mBluetoothAdapter.getBondedDevices();
FrmPairdevices:= TFrmPairdevices.Create(nil);
FrmPairdevices.ChatManager := FChatManager;
FrmPairdevices.Show;
end;

procedure TFrmMainChatForm.CbDevicesChange(Sender: TObject);
begin
FChatManager.SelectedDevice := CbDevices.Selected.Index;
end;

procedure TFrmMainChatForm.EdNewTextKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);
begin
if key = vkReturn then
BtSendClick(BtSend);
end;

procedure TFrmMainChatForm.FormCreate(Sender: TObject);
begin
FChatManager := TChatManager.Create;
if not FChatManager.HasBluetoothDevice then
begin
ShowMessage('You don''t have a bluetooth adapter');
Application.Terminate;
end;
FChatManager.OnTextReceived := OnNewText;
FChatManager.OnTextSent := OnNewText;
end;

procedure TFrmMainChatForm.FormShow(Sender: TObject);
begin
UpdateKnownDevices;
end;

procedure TFrmMainChatForm.FormVirtualKeyboardHidden(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
begin
PnMain.align := TAlignLayout.Client;
end;

procedure TFrmMainChatForm.FormVirtualKeyboardShown(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
begin
PnMain.align := TAlignLayout.Top;
PnMain.Height := ClientHeight - Bounds.height {$IFDEF ANDROID} + 20 {$ENDIF};
MmReceived.GoToTextEnd;
end;

procedure TFrmMainChatForm.OnNewText(const Sender: TObject; const AText, aDeviceName: string);
begin
TThread.Synchronize(nil,
procedure begin
if FLastName <> aDeviceName then
begin
MmReceived.Lines.Add(' ' + aDeviceName + ' :');
FLastName := aDeviceName;
end;
MmReceived.Lines.Add(' ' + AText);
MmReceived.GoToTextEnd;
end);
end;

procedure TFrmMainChatForm.BtnUpdateClick(Sender: TObject);
begin
UpdateKnownDevices;
end;

procedure TFrmMainChatForm.UpdateKnownDevices;
var
I: Integer;
begin
CbDevices.Clear;
if FChatManager.KnownDevices <> nil then
for I := 0 to FChatManager.KnownDevices.Count - 1 do
CbDevices.Items.Add(FChatManager.KnownDevices.Items[I].DeviceName);
end;

end.
//---------------------------------------------------------------------------------------------------------------------------------------------

unit uPairDevices;

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Layouts, FMX.ListBox, uChatManager,
System.Bluetooth;

type
TFrmPairdevices = class(TForm)
LbNewDevices: TListBox;
BtnDiscover: TButton;
BtnPair: TButton;
BtnClose: TButton;
procedure BtnCloseClick(Sender: TObject);
procedure BtnDiscoverClick(Sender: TObject);
procedure BtnPairClick(Sender: TObject);
procedure CreateSocketClick(Sender: TObject);
private
{ Private declarations }
procedure DoDiscoverEnd(const Sender: TObject; const ADeviceList: TBluetoothDeviceList);
public
ChatManager: TChatManager;
{ Public declarations }
end;

var
FrmPairdevices: TFrmPairdevices;

implementation

{$R *.fmx}

procedure TFrmPairdevices.BtnCloseClick(Sender: TObject);
begin
Close;
end;

procedure TFrmPairdevices.BtnDiscoverClick(Sender: TObject);
begin
ChatManager.OnDiscoveryEnd := DoDiscoverEnd;
ChatManager.DiscoverDevices;
end;

procedure TFrmPairdevices.BtnPairClick(Sender: TObject);
begin
if LbNewDevices.Selected <> nil then
ChatManager.PairTo(LbNewDevices.Selected.Text);
end;

procedure TFrmPairdevices.DoDiscoverEnd(const Sender: TObject; const ADeviceList: TBluetoothDeviceList);
var
I: Integer;
begin
LbNewDevices.Items.Clear;
for I := 0 to ADeviceList.Count - 1 do
if AdeviceList[I].IsPaired then
LbNewDevices.Items.Add(AdeviceList[I].DeviceName + '-Paired')
else
LbNewDevices.Items.Add(AdeviceList[I].DeviceName);
end;

end.

Hello,

what about this line in procedure TFrmPairdevices.BtnPairClick of
unit uPairDevices?

ChatManager.PairTo(LbNewDevices.Selected.Text);

Greetings

Markus
Jorge Uriarte

Posts: 41
Registered: 11/28/14
Re: In XE7 BlueChat sample, where is the device bonded? Is it incomplete? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2016 10:14 AM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:
Am 28.06.2016 um 17:58 schrieb Jorge Uriarte:
Hi There,
The Android BlueChat sample seems to be the right code and simple enough for a beginner to start experimenting with Bluetooth. I compiled with no errors into my phone. I was able to see the paired devices, but never able to send or receive a character. The code consists of two forms, but as I study the code, though I am not an expert, I could not find where the device gets bonded (socketed). Here I post the code of the two forms for you experts to point where my mistake is, or how to make this code work.

Thanks for helping,
Jorge

Note: It was interesting to see that the sample include this commented line:
//pairedDevices:= mBluetoothAdapter.getBondedDevices();

//-------------------------------------------------------------------------------------------------------------------
unit uBlueChat;

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.ListBox, FMX.StdCtrls, FMX.Edit,
FMX.Layouts, FMX.Memo, System.Bluetooth, uChatManager, FMX.Controls.Presentation, uPairDevices;

type
TFrmMainChatForm = class(TForm)
MmReceived: TMemo;
EdNewText: TEdit;
BtSend: TButton;
PnSelectDevice: TPanel;
CbDevices: TComboBox;
BtnUpdate: TButton;
PnSend: TPanel;
BtnFindNew: TButton;
PnMain: TPanel;
BackgroundImage: TImageControl;
procedure FormShow(Sender: TObject);
procedure BtnUpdateClick(Sender: TObject);
procedure BtSendClick(Sender: TObject);
procedure CbDevicesChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure EdNewTextKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);
procedure BtnFindNewClick(Sender: TObject);
procedure FormVirtualKeyboardShown(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
procedure FormVirtualKeyboardHidden(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
private
FChatManager: TChatManager;
FLastName: string;
procedure UpdateKnownDevices;
procedure OnNewText(const Sender: TObject; const AText: string; const aDeviceName: string);
public
{ Public declarations }
end;

var
FrmMainChatForm: TFrmMainChatForm;

implementation

{$R *.fmx}
{$R *.LgXhdpiPh.fmx ANDROID}
{$R *.NmXhdpiPh.fmx ANDROID}

procedure TFrmMainChatForm.BtSendClick(Sender: TObject);
begin
if cbDevices.Selected <> nil then
begin
FChatManager.SendText(EdNewText.Text);
EdNewText.Text := '';
end;
end;

procedure TFrmMainChatForm.BtnFindNewClick(Sender: TObject);
begin //pairedDevices:= mBluetoothAdapter.getBondedDevices();
FrmPairdevices:= TFrmPairdevices.Create(nil);
FrmPairdevices.ChatManager := FChatManager;
FrmPairdevices.Show;
end;

procedure TFrmMainChatForm.CbDevicesChange(Sender: TObject);
begin
FChatManager.SelectedDevice := CbDevices.Selected.Index;
end;

procedure TFrmMainChatForm.EdNewTextKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);
begin
if key = vkReturn then
BtSendClick(BtSend);
end;

procedure TFrmMainChatForm.FormCreate(Sender: TObject);
begin
FChatManager := TChatManager.Create;
if not FChatManager.HasBluetoothDevice then
begin
ShowMessage('You don''t have a bluetooth adapter');
Application.Terminate;
end;
FChatManager.OnTextReceived := OnNewText;
FChatManager.OnTextSent := OnNewText;
end;

procedure TFrmMainChatForm.FormShow(Sender: TObject);
begin
UpdateKnownDevices;
end;

procedure TFrmMainChatForm.FormVirtualKeyboardHidden(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
begin
PnMain.align := TAlignLayout.Client;
end;

procedure TFrmMainChatForm.FormVirtualKeyboardShown(Sender: TObject; KeyboardVisible: Boolean; const Bounds: TRect);
begin
PnMain.align := TAlignLayout.Top;
PnMain.Height := ClientHeight - Bounds.height {$IFDEF ANDROID} + 20 {$ENDIF};
MmReceived.GoToTextEnd;
end;

procedure TFrmMainChatForm.OnNewText(const Sender: TObject; const AText, aDeviceName: string);
begin
TThread.Synchronize(nil,
procedure begin
if FLastName <> aDeviceName then
begin
MmReceived.Lines.Add(' ' + aDeviceName + ' :');
FLastName := aDeviceName;
end;
MmReceived.Lines.Add(' ' + AText);
MmReceived.GoToTextEnd;
end);
end;

procedure TFrmMainChatForm.BtnUpdateClick(Sender: TObject);
begin
UpdateKnownDevices;
end;

procedure TFrmMainChatForm.UpdateKnownDevices;
var
I: Integer;
begin
CbDevices.Clear;
if FChatManager.KnownDevices <> nil then
for I := 0 to FChatManager.KnownDevices.Count - 1 do
CbDevices.Items.Add(FChatManager.KnownDevices.Items[I].DeviceName);
end;

end.
//---------------------------------------------------------------------------------------------------------------------------------------------

unit uPairDevices;

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Layouts, FMX.ListBox, uChatManager,
System.Bluetooth;

type
TFrmPairdevices = class(TForm)
LbNewDevices: TListBox;
BtnDiscover: TButton;
BtnPair: TButton;
BtnClose: TButton;
procedure BtnCloseClick(Sender: TObject);
procedure BtnDiscoverClick(Sender: TObject);
procedure BtnPairClick(Sender: TObject);
procedure CreateSocketClick(Sender: TObject);
private
{ Private declarations }
procedure DoDiscoverEnd(const Sender: TObject; const ADeviceList: TBluetoothDeviceList);
public
ChatManager: TChatManager;
{ Public declarations }
end;

var
FrmPairdevices: TFrmPairdevices;

implementation

{$R *.fmx}

procedure TFrmPairdevices.BtnCloseClick(Sender: TObject);
begin
Close;
end;

procedure TFrmPairdevices.BtnDiscoverClick(Sender: TObject);
begin
ChatManager.OnDiscoveryEnd := DoDiscoverEnd;
ChatManager.DiscoverDevices;
end;

procedure TFrmPairdevices.BtnPairClick(Sender: TObject);
begin
if LbNewDevices.Selected <> nil then
ChatManager.PairTo(LbNewDevices.Selected.Text);
end;

procedure TFrmPairdevices.DoDiscoverEnd(const Sender: TObject; const ADeviceList: TBluetoothDeviceList);
var
I: Integer;
begin
LbNewDevices.Items.Clear;
for I := 0 to ADeviceList.Count - 1 do
if AdeviceList[I].IsPaired then
LbNewDevices.Items.Add(AdeviceList[I].DeviceName + '-Paired')
else
LbNewDevices.Items.Add(AdeviceList[I].DeviceName);
end;

end.

Hello,

what about this line in procedure TFrmPairdevices.BtnPairClick of
unit uPairDevices?

ChatManager.PairTo(LbNewDevices.Selected.Text);

Greetings

Markus

Hi Markus, and thanks for replying. Perhaps a bit of conversation may shed some light into this. The procedure that you pointed FrmPairdevices.BtnPairClick is, as the name implies, it is to pair devices. You may have a list of several paired devices, but data exchange is only possible when "bondage" is established with one device. So, my question still remains, where in this code is device bonding done?. I had contacted Embarcadero Technical Help and they say unless I pay ($300.00 per case) they can not look into this code. This is a code that came with XE7. Maybe I do not know what I am doing and the answer in the code.

Is there anyone else that may shed some light in this dilemma?
Any help will be greatly appreciated,
Jorge
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: In XE7 BlueChat sample, where is the device bonded? Is it incomplete? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2016 9:00 AM   in response to: Jorge Uriarte in response to: Jorge Uriarte
Am 29.06.2016 um 19:14 schrieb Jorge Uriarte:


Hi Markus, and thanks for replying. Perhaps a bit of conversation may shed some light into this. The procedure that you pointed FrmPairdevices.BtnPairClick is, as the name implies, it is to pair devices. You may have a list of several paired devices, but data exchange is only possible when "bondage" is established with one device. So, my question still remains, where in this code is device bonding done?. I had contacted Embarcadero Technical Help and they say unless I pay ($300.00 per case) they can not
look into this code. This is a code that came with XE7. Maybe I do not know what I am doing and the answer in the code.

Is there anyone else that may shed some light in this dilemma?
Any help will be greatly appreciated,
Jorge

Hello Jorge,

sorry for my missunderstanding. I mistook bonding (creating the
connection) and pairing. I currently do not have XE7 installed anywhere
but if I don't forget I might look into that sample in 10.1 Berlin and
check for differences.

Greetings

Markus
Jorge Uriarte

Posts: 41
Registered: 11/28/14
Re: In XE7 BlueChat sample, where is the device bonded? Is it incomplete? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2016 5:51 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:
Am 29.06.2016 um 19:14 schrieb Jorge Uriarte:


Hi Markus, and thanks for replying. Perhaps a bit of conversation may shed some light into this. The procedure that you pointed FrmPairdevices.BtnPairClick is, as the name implies, it is to pair devices. You may have a list of several paired devices, but data exchange is only possible when "bondage" is established with one device. So, my question still remains, where in this code is device bonding done?. I had contacted Embarcadero Technical Help and they say unless I pay ($300.00 per case) they can not
look into this code. This is a code that came with XE7. Maybe I do not know what I am doing and the answer in the code.

Is there anyone else that may shed some light in this dilemma?
Any help will be greatly appreciated,
Jorge

Hello Jorge,

sorry for my misunderstanding. I mistook bonding (creating the
connection) and pairing. I currently do not have XE7 installed anywhere
but if I don't forget I might look into that sample in 10.1 Berlin and
check for differences.

Greetings

Markus

Thanks Markus, may you will find that Berlin has the answer.

Also, it is interesting to note that on the unit uPairDevices, this type has been declared but never been used:

procedure CreateSocketClick(Sender: TObject);

Any help will be appreciated
Jorge
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02