cancel
Showing results for 
Search instead for 
Did you mean: 

Why bluenrg disconnect when we send more than 50 Bytes in second?

Saeed Dayari
Associate

Hi, I'm Saeed

Recently I designed my own PCB for Bluenrg IC for my project. It's OK when I want to connect to it and send data in small length i.e. 10 Bytes per second.

But when i want to send data in 48Kbps, it disconnects from my cell phone when only about 100 of datas are sent.

Any idea why it happens?

3 REPLIES 3
Winfred LU
ST Employee

Hi Saeed,

Did you really mean BlueNRG? Or maybe is it BlueNRG-MS, BlueNRG-1, or BlueNRG-2?

For devices that do not support Data Length Extension, the maximum length of data payload would be 31 bytes (or 27 without MIC).

If you try to send larger packet with ATT commands, you may see fragments (several packets for 1 data transmission).

Otherwise you probably see some errors. Either case it shouldn't terminate the connection.

When you said "disconnects from my cell phone", did you mean

  • the cell phone terminated the connection

or

  • BlueNRG-xx terminated the connection

Could you please provide the packet transmitted in the air?

Best Regards,

Winfred

Hi Winfred

By BlueNRG I meant BlueNRG-132

We want to send 6000 bytes per second. We divided it in 300 packets to send. If our connection interval time is 10ms, it would be 3 packets of connection events. based on my calculations, it's correct and there shouldn't be any problem, because in current ST consumption software, it's said if you have 20 times of payload and your connection interval is 10 ms, you will be able to send 13 packets in connection event, and I want to send only 3 packets in every connection event.

my question is how to set these parameters? is it in cellphone application? or we should set it in BlueNRG code in IDE?

And there is another problem...

The blueNRG-1 isn't discoverable in all phones, even on ST applications like blueNRG application. i.e. in xiaomi redmi note 1 it's discoverable but in samsung galaxy s9 and huawei honor 7x , the phone couldn't find BlueNRG-1.

And about who terminates the connection... We don't know how to find out who it is. but in our log, the output of "aci_gatt_update_chat_value_ext", is "Tx buffer full".

thanks

Hi Saeed,

It is found for most mobile phone, there are constrains for both connection interval and maximum packets in one interval.

So if you're testing with a mobile phone, please check the limit accordingly.

In BlueNRG-1, no such limit exists. Which means with a pair of BlueNRG-1 devices, they can have a connection interval down to 7.5 ms (minimum per Bluetooth Spec), and as many as possible the number of packets in an interval.

Please refer to Throughput project that comes with SDK. In my tests, a pair of BlueNRG-1 can have around 285 kbps throughput.

If your device is a master, it may specify the connection parameters when creating the connecting, with hci_le_create_connection().

Otherwise, use aci_l2cap_connection_parameter_update_req() to send (from slave to master) an L2CAP connection parameter update request for specific connection parameters (including connection intervals), and check aci_l2cap_connection_parameter_update_resp_api() if the master accepts.

Regarding to the discovering IOP issue, i would suggest to request for your local FAE to support.

I have Samsung and Oppo phones, but do no found any of them having such issue.

Thank you.

Best Regards,

Winfred