Welcome, Guest
Guest Settings
Help

Thread: BluetoothLE component missing function to change MTU size


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


Permlink Replies: 2 - Last Post: Mar 23, 2017 7:35 AM Last Post By: aidan levy Threads: [ Previous | Next ]
aidan levy

Posts: 22
Registered: 7/6/16
BluetoothLE component missing function to change MTU size  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 10, 2016 5:20 AM
I want to use BluetoothLE component for work with BLE device.
I found that in this component missing function to change MTU size.
This function exist in c:\Program Files (x86)\Embarcadero\Studio\18.0\source\rtl\android\Androidapi.JNI.Bluetooth.pas :
function requestMtu(mtu: Integer): Boolean; cdecl;
procedure onMtuChanged(gatt: JBluetoothGatt; mtu: Integer; status: Integer); cdecl;

This function can change length of data I will send from 20 byte to 512 byte ! It`s very important function and must be included to BluetoothLE component.
How access to this function from Builder ?
bernard roussely

Posts: 92
Registered: 2/8/05
Re: BluetoothLE component missing function to change MTU size  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 16, 2017 1:39 PM   in response to: aidan levy in response to: aidan levy
This function exist in c:\Program Files (x86)\Embarcadero\Studio\18.0\source\rtl\android\Androidapi.JNI.Bluetooth.pas :
function requestMtu(mtu: Integer): Boolean; cdecl;
procedure onMtuChanged(gatt: JBluetoothGatt; mtu: Integer; status: Integer); cdecl;

Hi,

Not sure if you are talking Delphi or C++, because de C++ functions are in ...\Androidapi.JNI.Bluetooth.cpp

You need a TJBluetoothGatt (not JBluetoothGatt) object then a call to requestMtu(int mtu).

Regards,

bernard
aidan levy

Posts: 22
Registered: 7/6/16
Re: BluetoothLE component missing function to change MTU size  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 23, 2017 7:35 AM   in response to: bernard roussely in response to: bernard roussely
bernard roussely wrote:
This function exist in c:\Program Files (x86)\Embarcadero\Studio\18.0\source\rtl\android\Androidapi.JNI.Bluetooth.pas :
function requestMtu(mtu: Integer): Boolean; cdecl;
procedure onMtuChanged(gatt: JBluetoothGatt; mtu: Integer; status: Integer); cdecl;

Hi,

Not sure if you are talking Delphi or C++, because de C++ functions are in ...\Androidapi.JNI.Bluetooth.cpp

You need a TJBluetoothGatt (not JBluetoothGatt) object then a call to requestMtu(int mtu).

Regards,

bernard

I talking about BluetoothLE component missing this function. Check list of functions.
BTW Androidapi.JNI.Bluetooth.cpp is not exist because all components is only Delphi code ( .pas). Can you provide place you found it ?
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02