-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
controller: timing error and processing time consideration in ble_ll_conn_can_send_next_pdu()
#1808
Comments
there's |
Oh, |
value assigned to
|
I still believe the start of the connection event of another connection can interrupt the current recepition. Assume because of the timing error, the |
Hi ~
The function
ble_ll_conn_can_send_next_pdu()
inble_ll_conn.c
is used by the Central to decide wether to reply the Peripheral so that the Peripheral can send more data packets.Since the Central does not know how many data needs to be transmitted, it always assume the Peripheral to send a maximum length data.
I am using a older version of NimBLE and the time of the maximum length is
connsm->eff_max_rx_time
is 2120 us.Since we do not use the MIC field, we modified it to 2088 us to fully utilize the connection event.
It seems that
connsm->ota_max_rx_time
in the lastest version already remove the MIC field.However, because of the timing error and the processing time, the Central may miss the reply packet from the Peripheral.
Specifically, if the end transmission time of the Peripheral reply is very close to the start time of the connection event, the reply packet will not be processed even it has been received.
For example, in our experiment, the
ticks
inble_ll_conn.c
Line 1698 is150
(i.e., 4577 us).usec
is 2468 us, including an empty PDU, a full PDU without MIC (2088us), IFS, and MSS.The
added_usec
is 2106 us.Therefore, the next event start is only 3 us after the reply packet transmission.
Because of the timing error and the processing time, the reply can not be fully processed before the start of the next event.
The Peripheral has to retransmit the reply in the next connection event.
The most straigeforward way is adding a redundancy time considering the timing error and processing time.
If we still set the
connsm->eff_max_rx_time
to 2120 us, the Centeral choose not to transmit an extra empty packet since the Peripheral does not uses the MIC field, it acutall brings 32 us redundancy time.The text was updated successfully, but these errors were encountered: