Transmission times of connection event?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

---------------------------------------------------------------------------------

SDK: 2.2.2

Hardware: Tag3(Master) + Our  Custom PCB-BCM20737S(Slave)

Firmware: Modify hello_client + hello_sensor

---------------------------------------------------------------------------------

I would like to know the number of transmissions times in the connection event. So I designed an experiment.

This is my experiment work flow.

1.The Serial monitor software(AccessPort) will send 300 Byte to Master(hello_client).

2.The master will save data to buffer,and send the data(use Writecmd function) in the connection event callback.

   I also put the "bleprofile_SetMaxQueuedWriteRequests(15)" in the APPLICATION_INIT before bleapp_set_cfg.

   I change the lel2cap_sendConnParamUpdateReq(6, 6, 0, 700) in connection_up callback.

3.The slave will receive the data from the master.It will print 1 byte data to PUART in write_handler callback.

4.I use the logic analyzer and oscilloscope to monitor PUART Tx of slave.

The following figure is the result of my test.

A.jpg

The data1 is the first package(0~19) receive from the master.The data2 is the second package(20~39) receive from the master.The time interval between the first package and the second package is about 1.2 ms(1 slot???).

The following figure is the zoom out of the picture.And you can see the third(40~59) and the fourth(60~79) package.The time interval between the second package and the third package is about 6 ms(minimum connection interval 7.5 ms???).

B.jpg

We can see master send two packages in the connection event.As I know the Nordic can send 6 package in the connection event.Is there the way to increase the transmission package in the connection event?

0 Likes
1 Solution
Anonymous
Not applicable

Hi boont,

I found the answer in the article.

=>In short, you can get anywhere from 1 to 6 packets (depends on resource availability, interference and a number of other factors) to the other side in this 7.5mS.

I get 2 packets in my experiment. Thank you.

Now the maximum throughput can be calculated like this:

Max throughput = 6 * 20 Byte * 1/7.5ms *8= 128 kbps

Michelle,

View solution in original post

0 Likes
13 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

What did you set for your min/max connection interval? The max data you can send is 20bytes. Check out the speed_app in the SDK for more details.

0 Likes
Anonymous
Not applicable

Thank for your comment.

I have already read the speed_test before. I set same connection parameter in hello_sensor.My min/max connection interval is 6(6*1.25ms=7.5ms The minimum connection interval in BLE spec).I call the API to change the connection interval in connection_up call back function.

lel2cap_sendConnParamUpdateReq(6, 6, 0, 700) =>This function use in the speed_test,and I porting it to my hello_sensor and hello_client.

The connection events are used to send data packets between the master and slave.The master will send the data package to slave in connection event. In my experiment, the master will send two data packages in connection event. 

connecton event.jpg

If I want to increase the data rate.I can use the short connection interval to increase transmission chance.Another method is to increase the times of transfers within the connection event.Can I increase the times of transfers within the connection event?

The max data you can send is 20bytes=>The master receive 300 Byte from PUART,and store it to the buffer. The master will use the writecmd to send the data of buffer.  Each packet is 20 byte.

0 Likes
Anonymous
Not applicable

Hi boont​,

What is the maximum number of packets that BCM20737S could send per connection event?

Thank you for your attention!

Michelle,

0 Likes

Note that the speed_test was included in the SDK to demonstrate an optimal transfer scenario. I would study that application and experiment with different parameters.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi mwf_mmfae​ and boont​,

I found a strange phenomenon in my experiment.

When I download the firmware,and I got 4 notification packets within connection event.

Before reset:

before reset.jpg

And I press the reset bottom in both side(hello_sensor and hello_client), I got another transmission  pattern.

After reset:

after reset.jpg

I upload my code to the forum. I add puart function and GATT service in the sample code.

Why I got different transmission  pattern?

0 Likes
Anonymous
Not applicable

Hi mwf_mmfae​ and boont​,

I think I found the problem. I use TI Packet Sniffer to analyze the BLE packet. The result is shown in the following figure.

Before reset(After download the firmware) - Packet Sniffer:

剛燒-P.jpg

Before reset(After download the firmware) - Logic Analyzer:

剛燒-L.jpg

After Reset - Packet Sniffer

RESET-P.jpg

After Reset  - Logic Analyzer:

RESET-L.jpg

Before I press the reset switch, I can got 4 packet within connection event. The master will send the data to the slave,and the MD(More Data) bit will set to "1". The MD will set to "0" until the master send 4 packets. So I can got 4 packet because of the MD is set to "1".

But when I press the reset switch, I only got 1 packet within connection event because the MD bit is set to "0". In addition to the  MD isn't set to "1",some of connection event didn't send the packet(Like number 2464~2645 ). How to explain this phenomenon?

Michelle,

0 Likes
Anonymous
Not applicable

Hi Boont,

I still have a issue. Why I got different  throughput within connection event? One is 4 packets within connection(After download firmware), and the other is 1 packet within connection event(After reset).

Throughput1(After download firmware): 4 * 20 Byte * 1/7.5ms *8= 85 kbps

Throughput2(After reset): 1 * 20 Byte * 1/7.5ms *8= 21 kbps

Michelle,

0 Likes

The expert in the reference post above discussed this issue around the concept of a MD (more data) bit. This will cause the client to poll the server immediately after the last bit of the current packet. This therefore can achieve multiple packets in one interval such as 4_packets/interval. Do you have such a condition in your application?

michellehuang

0 Likes
Anonymous
Not applicable

Hi boont,

Thanks for the quick response.

When I download the firmware(hello_client and hello_sensor sample) to the chip, and I can got 4 packets in one connection event. But I rest the chip, and I just got 1 packet in one connection event.

We can use the API to send the notification packet, and the stack will send the packet to the receiver. I think the BRCM BLE stack will set the MD bit. I use hello_client to send the 15 notification packets, and the MD bit MD will be set three times in one connection event. So the hello_sensor will got 4 packets. But I reset the chip, The MD bit didn't set in one connection event. So the hello_sensor just got 1 packet.May I ask what is the reason?

Michelle,

0 Likes
Anonymous
Not applicable

Hi mwf_mmfae ,

Thanks for the quick response. I had previously tested the speed_test. The data rate is about 70~80 kbps in my test.  If I know the maximum number of packets within the connection event, and I can calculate the throughput for a BLE link. The number of packets per interval n and a connection interval T, the maxiumum throughput can be calculated like this:

throughput = N * 20 Byte * 1/T

Thank you for your attention!

Michelle,

0 Likes

This link may clear up the air a little...

what the meaning of "average of 4 connection events"?

But in general we cannot enforce the transmission of a certain number of packets in each connection interval.

0 Likes
Anonymous
Not applicable

Hi boont,

I found the answer in the article.

=>In short, you can get anywhere from 1 to 6 packets (depends on resource availability, interference and a number of other factors) to the other side in this 7.5mS.

I get 2 packets in my experiment. Thank you.

Now the maximum throughput can be calculated like this:

Max throughput = 6 * 20 Byte * 1/7.5ms *8= 128 kbps

Michelle,

0 Likes