Android BLE MTU Size

Ask, and ye shall receive.
Ehsan4859
Posts: 3
Joined: 08:24, 06 Mar 2016

Android BLE MTU Size

Postby Ehsan4859 » 08:40, 06 Mar 2016

Hi.
I am using Evothings to make an ble App. and I need to transfer 100 bytes using BLE. How can I change "MTU Size" in my JavaScript code.
Tha

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: Android BLE MTU Size

Postby Fredrik » 16:05, 06 Mar 2016

The Maximum Transmission Unit in BLE/GATT is 20 bytes. This is determined by the official Bluetooth specification and cannot be changed.

To transfer 100 bytes, you will have to make 5 sequential transfers of 20 bytes each.

Ehsan4859
Posts: 3
Joined: 08:24, 06 Mar 2016

Re: Android BLE MTU Size

Postby Ehsan4859 » 06:46, 07 Mar 2016

yes I know. but if you change the MTU size of Central(for example Phone), you can send several packets on each "Connection Event".
I need to know how can I change MTU size of Android BLE in "Evothings". thanks.

Fredrik
Site Admin
Posts: 196
Joined: 15:00, 18 Nov 2013

Re: Android BLE MTU Size

Postby Fredrik » 07:52, 07 Mar 2016

I see, you're talking about the function BluetoothGatt.requestMtu(). It is not exposed by the Evothings BLE plugin, so changing MTU size will not be possible.


Return to “Questions and answers”

Who is online

Users browsing this forum: No registered users and 6 guests