zephyr/samples/bluetooth
Rubin Gerritsen 9cb339166e Samples: iso_connected_benchmark: Fix invalid latency
The default transport latency was not valid.
Set it to a value that is large enough.
The minimum possible transport latency is 16580 us,
but this assumes the controller ignores the RTN=2.
If the controller uses the RTN=2, the transport latency will
be slightly larger than 30 ms depending on
how the controller chooses to setup the ISO link.

Therefore, we set it to 40 ms to ensure the default
configuration is valid.

How these numbers were found:

For unframed PDUs this is defined in Core_v5.4, Vol 6,
Part G, Section 3.2.2:
  Transport_Latency =
    CIG_Sync_Delay + FT * ISO_Interval - SDU_Interval

Because unframed PDUs are being used, the ISO interval needs
to be a multiple of SDU interval.
If MaxPDU = MaxSDU and the PHY is 2M, this results in that
the maximum subevent size is:
2120 * 2 + 2 * 150 = 4540.
For 2 CISes this is 9080 us > 7500
Therefore, the controller has to set the ISO interval to a
minimum of 15000 us in order to fit the packets.

Based upon this info, the controller has the freedom to ignore
or use the requested RTN=2.
1. Ignore -> NSE is 2: Minimum ISO interval is 15000 us
2. RTN = 2, Increase NSE: 4 * 4540 = 18160 -> ISO_Interval = 22500 us
3. RTN = 2, Increase the FT to 2, NSE = 2 -> ISO_Interval = 15000 us

For (1):
  Transport_Latency = CIG_Sync_Delay + 15000 - 7500
                    = CIG_Sync_Delay + 7500
For (2):
  Transport_Latency = CIG_Sync_Delay + 22500 - 7500
                    = CIG_Sync_Delay + 15000
For (3):
  Transport_Latency = CIG_Sync_Delay + 2 * 15000 - 7500
                    = CIG_Sync_Delay + 22500

As shown in Core_v5.4, Vol 6, Part B, Section 4.5.14,
CIG_Sync_Delay needs to be larger than or equal to the length of
all ISO events. That is, the sum of the subevents:

For (1): CIG_Sync_Delay = 2 * 4540 = 9080
For (2): CIG_Sync_Delay = 4 * 4540 = 18160
For (3): CIG_Sync_Delay = 2 * 4540 = 9080

This results in the following transport latencies:

For (1): Transport_Latency = 9080 + 7500 = 16580
For (2): Transport_Latency = 18160 + 15000 = 33160
For (3): Transport_Latency = 9080 + 22500 = 31580

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2023-06-09 14:16:34 -04:00
..
beacon Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
broadcast_audio_sink Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
broadcast_audio_source Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
broadcaster samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
broadcaster_multiple Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
bthome_sensor_template samples, tests: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
central samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
central_gatt_write Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
central_hr Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
central_ht Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
central_iso Bluetooth: samples: central_iso: Unref if send fails 2023-06-07 15:17:36 -04:00
central_multilink samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
central_otc samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
central_past Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
direct_adv Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
direction_finding_central Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
direction_finding_connectionless_rx doc: samples: update OVERLAY_CONFIG to EXTRA_CONF_FILE 2023-05-23 16:40:21 +02:00
direction_finding_connectionless_tx doc: samples: update OVERLAY_CONFIG to EXTRA_CONF_FILE 2023-05-23 16:40:21 +02:00
direction_finding_peripheral Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
eddystone Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
encrypted_advertising apps: misc void main -> int main fixes 2023-04-18 05:45:36 -07:00
handsfree samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
hap_ha Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
hci_pwr_ctrl Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
hci_rpmsg samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
hci_spi samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
hci_uart Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
hci_usb samples: Bluetooth: hci_usb: Disable USB_CDC_ACM 2023-06-09 11:44:02 -04:00
hci_usb_h4 samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
ibeacon Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
ipsp Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
iso_broadcast Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
iso_broadcast_benchmark samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
iso_connected_benchmark Samples: iso_connected_benchmark: Fix invalid latency 2023-06-09 14:16:34 -04:00
iso_receive Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
mesh samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
mesh_demo samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
mesh_provisioner samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
mtu_update samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
observer samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
periodic_adv Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
periodic_adv_conn tests: samples: Resolve duplicates in names. 2023-05-16 06:21:25 -04:00
periodic_adv_rsp tests: samples: Resolve duplicates in names. 2023-05-16 06:21:25 -04:00
periodic_sync Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
periodic_sync_conn tests: samples: Resolve duplicates in names. 2023-05-16 06:21:25 -04:00
periodic_sync_rsp tests: samples: Resolve duplicates in names. 2023-05-16 06:21:25 -04:00
peripheral Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
peripheral_accept_list Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
peripheral_csc samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
peripheral_dis samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
peripheral_esp samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
peripheral_gatt_write Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
peripheral_hids Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
peripheral_hr Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
peripheral_ht Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
peripheral_identity samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
peripheral_iso Bluetooth: samples: ISO: Check validity of incoming data 2023-06-07 15:17:36 -04:00
peripheral_ots samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
peripheral_past Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
peripheral_sc_only Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
scan_adv Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
st_ble_sensor Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
tmap_central Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
tmap_peripheral Bluetooth: Samples: Remove usage of BT_DEBUG_LOG 2023-06-07 13:56:55 -04:00
unicast_audio_client samples: Bluetooth: Fix Tx ISO Data packet sequence number 2023-06-08 06:47:25 -04:00
unicast_audio_server samples: Bluetooth: Fix Tx ISO Data packet sequence number 2023-06-08 06:47:25 -04:00
bluetooth.rst