How to increase MTU size b/w qn9080 and Android

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to increase MTU size b/w qn9080 and Android

ソリューションへジャンプ
7,766件の閲覧回数
mohamedaslam_m
Contributor II

Hello,

   I am connecting qn9080 with Android using Web Bluetooth, and I am not able to send more than 20 Byte at a single packet. while if I connect using a Desktop browser I can send more than 20 Bytes.

I searched regarding this MTU exchange and I found "GattClient_ExchangeMtu()" API is there which will initiate MTU exchange. I called this GattClient_ExchangeMtu() from BleApp_ConnectionCallback() , But the  GattClient_ExchangeMtu() is returning an error.

Can anybody help me on this to change the MTU size?

ラベル(1)
タグ(2)
1 解決策
6,841件の閲覧回数
xing_chang
NXP Employee
NXP Employee

Hi @Aslan,

ExchangeMtu is best initiated by the Master (mobile phone or PC). If it must be initiated by the slave(QN9080), you can use the GattClient_ExchangeMtu() function, but the library needs to be modified.

lib_ble_5-0_host_peripheral_cm4.a -> lib_ble_5-0_host_cm4.a

pastedImage_1.png

元の投稿で解決策を見る

11 返答(返信)
1,847件の閲覧回数
mjkimbravo
Contributor III

Hello,

I try similar things to communicate with QN9080 and PC through QPP service. In your post, you succeed to connect using a Desktop browser and can send more than 20 Bytes.

I'm now using Connectivity QTool (PC) or loT toolbox (phone) for communication. However, both are hard to use (limited data transmission Bytes length, hard to extract data through .xlsx, etc...). Is there any other way in PC to communicate with QN9080 through QPP (other BLE browser)?

 

Thanks, 

タグ(3)
0 件の賞賛
返信
1,780件の閲覧回数
xing_chang
NXP Employee
NXP Employee

Hi @mjkimbravo 

Could you capture a sniffer log for this issue?

0 件の賞賛
返信
1,770件の閲覧回数
mjkimbravo
Contributor III

I'm really sorry that I don't know what is exactly sniffer log and how to capture it...

Instead, I attach the NXP Community question link which can show my situation in more detail. I hope this will be helpful for your understanding. I'm really needs your kind help.

QN9080 BLE private profile service or others

QN9080 cannot send more than 20 bytes through QPP service. Is there any way to increase it?

 

Thanks,

 

0 件の賞賛
返信
6,839件の閲覧回数
mohamedaslam_m
Contributor II

Hi Xing,

     Thanks for your replay, it works. Now I am able to send packet more than 20 bytes.

Thankyou  Estephania for your quick support.

Regards

Aslam

0 件の賞賛
返信
6,839件の閲覧回数
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

If you are able to send and receive more than 20 bytes form the computer , it is most likely that the limitation it's in the android device, you will need to extend the MTU in the mobile phone code in case you are doing your own application

Regards,

Estephania

0 件の賞賛
返信
6,839件の閲覧回数
mohamedaslam_m
Contributor II

Hello,

     We are not sending data through an android mobile application, we are relying on web Bluetooth using a browser.

our observations are :

1) qn9080 to the mobile browser using web Bluetooth we could send and receive only 20 bytes.

2) Android Mobile application to the mobile browser using web Bluetooth we could send and receive more than 20 bytes. That means the mobile browser is able to receive more than 20 bytes when we requested MTU change (Gatt.requestMtu(512)) from the mobile application.

From the above observation, I think from qn9080 we can initiate to increase the MTU size to receive more than 20 Bytes.

How to initiate the MTU size is more than 20 bytes in qn9080?

0 件の賞賛
返信
6,839件の閲覧回数
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

Please check the file ble_constants.h

/*! Default value of the ATT_MTU */
#define gAttDefaultMtu_c                (23) 

/*! Maximum possible value of the ATT_MTU for this device. This is used during the MTU Exchange. */
#define gAttMaxMtu_c                    (247)

Regards,

Estephania

0 件の賞賛
返信
6,839件の閲覧回数
mohamedaslam_m
Contributor II

Hello,

     The gAttDefaultMtu_c  and  gAttMaxMtu_c values are same as you mentioned on the previous post.

 

I used GattClient_ExchangeMtu() to initiate the mtu request but it's returning an error number 4 which states's The requested feature is not supported by this stack version.

Do I in the right direction ?

Regards

Aslam

0 件の賞賛
返信
6,839件の閲覧回数
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

Just to confirm, are you sure that you have your characteristic with the maximum size available?

Regards,

Estephania

0 件の賞賛
返信
6,839件の閲覧回数
mohamedaslam_m
Contributor II

Hello,

   The characteristic size is set as 256.

CHARACTERISTIC(char_url_get, gBleSig_CustomeUrl_d, (gGattCharPropRead_c | gGattCharPropNotify_c | gGattCharPropIndicate_c))
VALUE_VARLEN(value_url_get, gBleSig_CustomeUrl_d, (gPermissionFlagReadable_c), 256, 2, 0x00, 0xB4)

Regards

Aslam

0 件の賞賛
返信
6,842件の閲覧回数
xing_chang
NXP Employee
NXP Employee

Hi @Aslan,

ExchangeMtu is best initiated by the Master (mobile phone or PC). If it must be initiated by the slave(QN9080), you can use the GattClient_ExchangeMtu() function, but the library needs to be modified.

lib_ble_5-0_host_peripheral_cm4.a -> lib_ble_5-0_host_cm4.a

pastedImage_1.png