<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125785/higher-connection-interval-with-lower-throughput</link><description>Hi 
 I am using NCS 2.8 and running one pair of peripheral and central devices using nRF52832. 
 At first, the default interval is 50 ms, and I can get the throughput around 200 kbps, which is correct. 
 After updating the connection interval to 625 units</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Nov 2025 10:09:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125785/higher-connection-interval-with-lower-throughput" /><item><title>RE: Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/thread/555479?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2025 10:09:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:157ed08b-61f3-4837-9377-9aa0d97318b0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please test and do the debugging on your side we can&amp;#39;t just look into your code without you do any debugging, sniffer trace etc.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/thread/555469?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2025 09:27:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04a40b41-1c08-4b5d-a1b2-b13be25d7dbf</guid><dc:creator>Ziyao Zhou</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;My current code is&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2022 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;zephyr/types.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;
#include &amp;lt;zephyr/usb/usb_device.h&amp;gt;
#include &amp;lt;zephyr/bluetooth/bluetooth.h&amp;gt;
#include &amp;lt;zephyr/bluetooth/uuid.h&amp;gt;
#include &amp;lt;zephyr/bluetooth/gatt.h&amp;gt;
#include &amp;lt;zephyr/bluetooth/hci.h&amp;gt;

#include &amp;lt;zephyr/shell/shell.h&amp;gt;

#include &amp;lt;bluetooth/services/nus.h&amp;gt;

#include &amp;lt;dk_buttons_and_leds.h&amp;gt;
#include &amp;lt;zephyr/bluetooth/conn.h&amp;gt;


#include &amp;lt;nrfx_gpiote.h&amp;gt;
#if defined(DPPI_PRESENT)
#include &amp;lt;nrfx_dppi.h&amp;gt;
#else
#include &amp;lt;nrfx_ppi.h&amp;gt;
#endif

#include &amp;lt;zephyr/settings/settings.h&amp;gt;

#include &amp;lt;stdio.h&amp;gt;

#include &amp;lt;zephyr/logging/log.h&amp;gt;

#include &amp;quot;time_sync.h&amp;quot;

#define LOG_MODULE_NAME peripheral_uart
LOG_MODULE_REGISTER(LOG_MODULE_NAME);

#define STACKSIZE CONFIG_BT_NUS_THREAD_STACK_SIZE
#define PRIORITY 7

#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
#define DEVICE_NAME_LEN	(sizeof(DEVICE_NAME) - 1)

#define UART_BUF_SIZE CONFIG_BT_NUS_UART_BUFFER_SIZE
#define UART_WAIT_FOR_BUF_DELAY K_MSEC(50)
#define UART_WAIT_FOR_RX CONFIG_BT_NUS_UART_RX_WAIT_TIME

static K_SEM_DEFINE(ble_init_ok, 0, 1);

static struct bt_conn *current_conn;
static struct bt_conn *auth_conn;

static bool m_gpio_trigger_enabled;
static bool m_send_sync_pkt;

static const struct bt_data ad[] = {
	BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
	BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN),
};

static const struct bt_data sd[] = {
	BT_DATA_BYTES(BT_DATA_UUID128_ALL, BT_UUID_NUS_VAL),
};

static const char cmd_str[] = &amp;quot;Things base and vile, holding no quantity,  Love can transpose to form and dignity.  Love looks not with the eyes,  but with the mind. Things base and vile, holding no quantity,  Love can transpose to form and dignity. Love looks not with thezz&amp;quot;;

static const nrfx_gpiote_t gpiote_inst = NRFX_GPIOTE_INSTANCE(NRF_DT_GPIOTE_INST(DT_ALIAS(syncpin), gpios));
static const struct gpio_dt_spec syncpin = GPIO_DT_SPEC_GET(DT_ALIAS(syncpin), gpios);
static const struct gpio_dt_spec txpin = GPIO_DT_SPEC_GET(DT_ALIAS(txpin), gpios);

static nrfx_gpiote_pin_t syncpin_absval;

#if defined(DPPI_PRESENT)
static uint8_t dppi_channel_syncpin;
#endif

static void button_changed(uint32_t button_state, uint32_t has_changed);

static void connected(struct bt_conn *conn, uint8_t err)
{
	char addr[BT_ADDR_LE_STR_LEN];

	if (err) {
		LOG_ERR(&amp;quot;Connection failed (err %u)&amp;quot;, err);
		return;
	}

	bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));
	LOG_INF(&amp;quot;Connected %s&amp;quot;, addr);

	current_conn = bt_conn_ref(conn);

	 const struct bt_le_conn_param param = {
        .interval_min = 3200,   /* 6 * 1.25ms = 7.5ms */
        .interval_max = 3200,
        .latency      = 0,
        .timeout      = 3200   /* 42 * 10ms = 420ms */
    };

    int rc = bt_conn_le_param_update(conn, &amp;amp;param);
    if (rc) {
        LOG_WRN(&amp;quot;bt_conn_le_param_update failed (err %d)&amp;quot;, rc);
    } else {
        LOG_INF(&amp;quot;Conn param update requested!&amp;quot;);
    }
}

static void disconnected(struct bt_conn *conn, uint8_t reason)
{
	char addr[BT_ADDR_LE_STR_LEN];

	bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));

	LOG_INF(&amp;quot;Disconnected: %s (reason %u)&amp;quot;, addr, reason);

	if (auth_conn) {
		bt_conn_unref(auth_conn);
		auth_conn = NULL;
	}

	if (current_conn) {
		bt_conn_unref(current_conn);
		current_conn = NULL;
	}
}

static void conn_param_updated(struct bt_conn *conn,
                               uint16_t interval,
                               uint16_t latency,
                               uint16_t timeout)
{
    /* interval 单位 1.25ms，timeout 单位 10ms */
    printk(&amp;quot;Conn params updated: interval=%u.%02u ms, latency=%u, timeout=%u ms\n&amp;quot;,
           (interval * 125) / 100,           /* 整数部分 */
           (interval * 125) % 100,           /* 小数部分，保留两位 */
           latency,
           timeout * 10);
}

BT_CONN_CB_DEFINE(conn_callbacks) = {
	.connected    = connected,
	.disconnected = disconnected,
	.le_param_updated = conn_param_updated,

};

static void bt_receive_cb(struct bt_conn *conn, const uint8_t *const data,
			  uint16_t len)
{
	char addr[BT_ADDR_LE_STR_LEN] = {0};

	bt_addr_le_to_str(bt_conn_get_dst(conn), addr, ARRAY_SIZE(addr));

	LOG_INF(&amp;quot;Received %d bytes from: %s&amp;quot;, len, addr);
}

static struct bt_nus_cb nus_cb = {
	.received = bt_receive_cb,
};

void error(void)
{
	dk_set_leds_state(DK_ALL_LEDS_MSK, DK_NO_LEDS_MSK);

	while (true) {
		/* Spin for ever */
		k_sleep(K_MSEC(1000));
	}
}

static void configure_gpio(void)
{
	int err;

	err = dk_buttons_init(button_changed);
	if (err) {
		LOG_ERR(&amp;quot;Cannot init buttons (err: %d)&amp;quot;, err);
	}

	err = dk_leds_init();
	if (err) {
		LOG_ERR(&amp;quot;Cannot init LEDs (err: %d)&amp;quot;, err);
	}
}

static void ts_gpio_trigger_enable(void)
{
	uint64_t time_now_ticks;
	uint32_t time_now_msec;
	uint32_t time_target;
	int err;

	if (m_gpio_trigger_enabled) {
		return;
	}

	// Round up to nearest second to next 1000 ms to start toggling.
	// If the receiver has received a valid sync packet within this time, the GPIO toggling polarity will be the same.

	time_now_ticks = ts_timestamp_get_ticks_u64();
	time_now_msec = TIME_SYNC_TIMESTAMP_TO_USEC(time_now_ticks) / 1000;

	time_target = TIME_SYNC_MSEC_TO_TICK(time_now_msec) + (1000 * 2);
	time_target = (time_target / 1000) * 1000;

#if defined(DPPI_PRESENT)
	err = ts_set_trigger(time_target, dppi_channel_syncpin);
	__ASSERT_NO_MSG(err == 0);
#else
	err = ts_set_trigger(time_target, nrfx_gpiote_out_task_address_get(&amp;amp;gpiote_inst, syncpin_absval));
	__ASSERT_NO_MSG(err == 0);
#endif

	nrfx_gpiote_set_task_trigger(&amp;amp;gpiote_inst, syncpin_absval);

	m_gpio_trigger_enabled = true;
}

static void ts_gpio_trigger_disable(void)
{
	m_gpio_trigger_enabled = false;
}

static void ts_event_handler(const ts_evt_t* evt)
{
	switch (evt-&amp;gt;type)
	{
		case TS_EVT_SYNCHRONIZED:
			ts_gpio_trigger_enable();
			LOG_INF(&amp;quot;TS_EVT_SYNCHRONIZED&amp;quot;);
			break;
		case TS_EVT_DESYNCHRONIZED:
			ts_gpio_trigger_disable();
			LOG_INF(&amp;quot;TS_EVT_DESYNCHRONIZED&amp;quot;);
			break;
		case TS_EVT_TRIGGERED:
			if (m_gpio_trigger_enabled)
			{
				uint32_t tick_target;
				int err;

				/* Small increments here are more sensitive to drift.
				 * That is, an update from the timing transmitter that causes a jump larger than the
				 * chosen increment, risk having a trigger target_tick that is in the past.
				 */
				tick_target = evt-&amp;gt;params.triggered.tick_target + 2;

#if defined(DPPI_PRESENT)
				err = ts_set_trigger(tick_target, dppi_channel_syncpin);
				__ASSERT_NO_MSG(err == 0);
#else
				err = ts_set_trigger(tick_target, nrfx_gpiote_out_task_address_get(&amp;amp;gpiote_inst, syncpin_absval));
				__ASSERT_NO_MSG(err == 0);
#endif

			}
			else
			{
				// Ensure pin is low when triggering is stopped
				nrfx_gpiote_clr_task_trigger(&amp;amp;gpiote_inst, syncpin_absval);
			}
			break;
		default:
			__ASSERT_NO_MSG(false);
			break;
	}
}


static void button_changed(uint32_t button_state, uint32_t has_changed)
{
	uint32_t buttons = button_state &amp;amp; has_changed;
	int err;

	if (buttons &amp;amp; DK_BTN1_MSK) {
		if (m_send_sync_pkt) 		{
			m_send_sync_pkt = false;
			m_gpio_trigger_enabled = false;

			err = ts_tx_stop();
			__ASSERT_NO_MSG(err == 0);

			dk_set_led_off(DK_LED1);

			LOG_INF(&amp;quot;Stopping sync beacon transmission!&amp;quot;);
		}
		else {
			m_send_sync_pkt = true;

			err = ts_tx_start(TIME_SYNC_FREQ_AUTO);
			__ASSERT_NO_MSG(err == 0);

			dk_set_led_on(DK_LED1);

			ts_gpio_trigger_enable();

			LOG_INF(&amp;quot;Starting sync beacon transmission!&amp;quot;);
		}
	}
}

static void configure_sync_timer(void)
{
	int err;

	err = ts_init(ts_event_handler);
	__ASSERT_NO_MSG(err == 0);

	ts_rf_config_t rf_config = {
		.rf_chn = 80,
		.rf_addr = { 0xDE, 0xAD, 0xBE, 0xEF, 0x19 }
	};

	err = ts_enable(&amp;amp;rf_config);
	__ASSERT_NO_MSG(err == 0);
}

static nrfx_gpiote_pin_t pin_absval_get(const struct gpio_dt_spec *gpio_spec)
{
	if (gpio_spec-&amp;gt;port == DEVICE_DT_GET(DT_NODELABEL(gpio0))) {
		return NRF_GPIO_PIN_MAP(0, gpio_spec-&amp;gt;pin);
	}
#if DT_NODE_EXISTS(DT_NODELABEL(gpio1))
	if (gpio_spec-&amp;gt;port == DEVICE_DT_GET(DT_NODELABEL(gpio1))) {
		return NRF_GPIO_PIN_MAP(1, gpio_spec-&amp;gt;pin);
	}
#endif

	__ASSERT(false, &amp;quot;Port could not be determined&amp;quot;);
	return 0;
}

static void configure_debug_gpio(void)
{
	nrfx_err_t nrfx_err;
	int err;


	nrfx_gpiote_output_config_t gpiote_cfg = {
		.drive = NRF_GPIO_PIN_S0S1,
		.input_connect = NRF_GPIO_PIN_INPUT_DISCONNECT,
		.pull = NRF_GPIO_PIN_NOPULL,
	};

	nrfx_gpiote_task_config_t task_cfg = {
		.polarity = NRF_GPIOTE_POLARITY_TOGGLE,
		.init_val = NRF_GPIOTE_INITIAL_VALUE_LOW,
	};

	syncpin_absval = pin_absval_get(&amp;amp;syncpin);

	err = gpio_pin_configure_dt(&amp;amp;syncpin, GPIO_OUTPUT_LOW | syncpin.dt_flags);
	__ASSERT_NO_MSG(err == 0);

	if (!nrfx_gpiote_init_check(&amp;amp;gpiote_inst)) {
		nrfx_err = nrfx_gpiote_init(&amp;amp;gpiote_inst, 5);
		__ASSERT_NO_MSG(nrfx_err == NRFX_SUCCESS);
	}

	nrfx_err = nrfx_gpiote_channel_alloc(&amp;amp;gpiote_inst, &amp;amp;task_cfg.task_ch);
	__ASSERT_NO_MSG(nrfx_err == NRFX_SUCCESS);

	nrfx_err = nrfx_gpiote_output_configure(&amp;amp;gpiote_inst, syncpin_absval, &amp;amp;gpiote_cfg, &amp;amp;task_cfg);
	__ASSERT_NO_MSG(nrfx_err == NRFX_SUCCESS);

	nrfx_gpiote_out_task_enable(&amp;amp;gpiote_inst, syncpin_absval);

#if defined(DPPI_PRESENT)
	nrfx_err = nrfx_dppi_channel_alloc(&amp;amp;dppi_channel_syncpin);
	__ASSERT_NO_MSG(nrfx_err == NRFX_SUCCESS);

	nrf_gpiote_subscribe_set(
		NRF_GPIOTE, nrfx_gpiote_out_task_get(syncpin_absval), dppi_channel_syncpin);

	nrf_dppi_channels_enable(NRF_DPPIC_NS, BIT(dppi_channel_syncpin));
#endif
}

static void configure_tx_gpio(void)
{
    int err;

    if (!device_is_ready(txpin.port)) {
        LOG_ERR(&amp;quot;TX pin device not ready&amp;quot;);
        return;
    }

    err = gpio_pin_configure_dt(&amp;amp;txpin, GPIO_OUTPUT_INACTIVE | txpin.dt_flags);
    if (err) {
        LOG_ERR(&amp;quot;Failed to configure TX pin (err %d)&amp;quot;, err);
        return;
    }

    LOG_INF(&amp;quot;TX pin configured&amp;quot;);
}


int main(void)
{
	int err = 0;

	configure_gpio();
	configure_debug_gpio();
    configure_tx_gpio();   // ★ 一定要加这个

	
	configure_sync_timer();

	err = bt_enable(NULL);
	if (err) {
		error();
	}

	LOG_INF(&amp;quot;Bluetooth initialized&amp;quot;);

	k_sem_give(&amp;amp;ble_init_ok);

	if (IS_ENABLED(CONFIG_SETTINGS)) {
		settings_load();
	}

	err = bt_nus_init(&amp;amp;nus_cb);
	if (err) {
		LOG_ERR(&amp;quot;Failed to initialize UART service (err: %d)&amp;quot;, err);
		return 0;
	}

	err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd,
				  ARRAY_SIZE(sd));
	if (err) {
		LOG_ERR(&amp;quot;Advertising failed to start (err %d)&amp;quot;, err);
		return 0;
	}


	while (1) {
    /* 每秒打印 TimeSync 当前时间 */
    // uint64_t t = ts_timestamp_get_ticks_u64();
    // uint32_t ms = TIME_SYNC_TIMESTAMP_TO_USEC(t) / 1000;
    // printk(&amp;quot;Sync time: %u ms\n&amp;quot;, ms);

    /* 每秒通过 NUS 向已连接 central 发送字符串 */
    if (current_conn) {
        int err = bt_nus_send(current_conn, cmd_str, strlen(cmd_str));
        if (err) {
            LOG_WRN(&amp;quot;bt_nus_send failed (err %d)&amp;quot;, err);
        } else {
            // LOG_INF(&amp;quot;NUS sent\n&amp;quot;);
			// gpio_pin_set_dt(&amp;amp;txpin, 1);
			// k_sleep(K_MSEC(100));
			// gpio_pin_set_dt(&amp;amp;txpin, 0);

        }
    }
 
	// k_sleep(K_MSEC(3000));	
}

}

#if CONFIG_SHELL

static int cmd_tx_toggle(const struct shell *sh, size_t argc, char **argv)
{
	int err;

	if (m_send_sync_pkt) {
		m_send_sync_pkt = false;
		m_gpio_trigger_enabled = false;

		err = ts_tx_stop();
		__ASSERT_NO_MSG(err == 0);

		dk_set_led_off(DK_LED1);

		shell_print(sh, &amp;quot;Stopping sync beacon transmission!&amp;quot;);
	}
	else {
		m_send_sync_pkt = true;

		err = ts_tx_start(TIME_SYNC_FREQ_AUTO);
		__ASSERT_NO_MSG(err == 0);

		dk_set_led_on(DK_LED1);

		ts_gpio_trigger_enable();

		shell_print(sh, &amp;quot;Starting sync beacon transmission!&amp;quot;);
	}

	return 0;
}

static int cmd_time_get(const struct shell *sh, size_t argc, char **argv)
{
	uint64_t timestamp_ticks;
	uint32_t timestamp_msec;

	timestamp_ticks = ts_timestamp_get_ticks_u64();
	timestamp_msec = TIME_SYNC_TIMESTAMP_TO_USEC(timestamp_ticks) / 1000;

	shell_print(sh, &amp;quot;%d msec&amp;quot;, timestamp_msec);

	return 0;
}

SHELL_CMD_ARG_REGISTER(tx_toggle, NULL, &amp;quot;Time sync TX toggle&amp;quot;,
			   cmd_tx_toggle, 0, 0);

SHELL_CMD_ARG_REGISTER(time_get, NULL, &amp;quot;Time sync time get&amp;quot;,
			   cmd_time_get, 0, 0);
#endif /* CONFIG_SHELL*/
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I make it send&amp;nbsp;&lt;span&gt;continuously an the trace file is here:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3200-continiously.pcapng"&gt;devzone.nordicsemi.com/.../3200-continiously.pcapng&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How could I&amp;nbsp;control how much&amp;nbsp;I send by counting what&amp;nbsp;my queue? I want to do this because I want to check the synchronization effect at different connection interval. (with certain througput)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/thread/555454?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2025 08:20:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e1908a9-591b-48a4-b0e2-9460b00bd54b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;Please capture a sniffer trace.&amp;nbsp;&lt;br /&gt;You can see in my screenshot, the only modification I made was change the delay to 1ms and I can see 19 packets in a 50ms interval. So there must be something wrong.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can control how much you send by counting what you queue.&amp;nbsp;&lt;br /&gt;What is your application and why you want to keep the throughput at 200kbps ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/thread/555414?ContentTypeID=1</link><pubDate>Tue, 25 Nov 2025 15:34:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87533810-1d52-47d1-a25c-f2e44b290596</guid><dc:creator>Ziyao Zhou</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Thank you for your advice!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;By the way, may I ask if I don not use&lt;span&gt;&amp;nbsp;&amp;quot;queue a packet every 9ms&amp;quot;, is there any way to control the throughput around 200kbps? The TX ans RX is close to each other so I can not reduce the TXP or increase distance.&amp;nbsp;&lt;/span&gt;I have to test the pair at a certain throughput level.&lt;/p&gt;
&lt;p&gt;I have tried that delete the ksleep to ask the peripheral sending continuously, however,&amp;nbsp; I still can only get low througput around 10 kbps. (I have added&amp;nbsp;&lt;span&gt;CONFIG_BT_CTLR_SDC_TX/RX&lt;/span&gt;&lt;span&gt;_PACKET_COUNT&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/thread/555413?ContentTypeID=1</link><pubDate>Tue, 25 Nov 2025 15:22:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d886a79-f867-474b-a439-228738052ee7</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Zhou Ziyao,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I think I know what could be wrong here.&amp;nbsp;&lt;br /&gt;So you&amp;nbsp;queue a packet every 9ms.&amp;nbsp;&lt;br /&gt;The problem is that the BLE stack send all the packets buffered really quickly about 1.4ms each packet.&amp;nbsp;&lt;br /&gt;So by the first 10ms for example already up to 7 packets can be sent. This can empty out all the buffered packets that you queue.&amp;nbsp;&lt;br /&gt;When the buffer is empty the connection event will be completed. No more packet will be sent after that.&amp;nbsp;&lt;br /&gt;You need to queue faster than sending or you need to have larger buffer.&amp;nbsp;&lt;br /&gt;For example when you queue every 1 sec you can send 19 packets in a 50ms interval:&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1764079862607v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;To have larger buffer, you will need to increase&amp;nbsp;CONFIG_BT_CTLR_SDC_RX_PACKET_COUNT and&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;CONFIG_BT_CTLR_SDC_TX_PACKET_COUNT .&lt;br /&gt;Try to set&amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BT_CTLR_SDC_TX_PACKET_COUNT=10 on the peripheral&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;and&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;CONFIG_BT_CTLR_SDC_RX_PACKET_COUNT=10 on the central.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;You will see 9-10 packets queued for each connection event:&amp;nbsp;&lt;br /&gt;Before (3):&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1764084066460v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;After (9):&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1764084089347v2.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note that if you still keep the sending rate at 9ms each, you will still run out of buffer and result in what you see above, after 9 packets sent, it just stopped and wait for the next connection event.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/thread/555361?ContentTypeID=1</link><pubDate>Tue, 25 Nov 2025 10:43:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6b4559e-da15-4ebb-a143-64c042a163c0</guid><dc:creator>Ziyao Zhou</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Conection-interval-3200.pcapng"&gt;devzone.nordicsemi.com/.../Conection-interval-3200.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here you are, thank you for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/thread/555324?ContentTypeID=1</link><pubDate>Tue, 25 Nov 2025 08:11:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f9b7ccc-ede0-4014-ba75-677f44fd55ec</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I know the problem is with the number of packet per connection interval but&amp;nbsp;you need to send the sniffer trace file.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/thread/555256?ContentTypeID=1</link><pubDate>Mon, 24 Nov 2025 15:24:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a65f1ada-6c44-4204-b6af-f75bb8457386</guid><dc:creator>Ziyao Zhou</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;1. I am using&amp;nbsp;&lt;span&gt;bt_nus_send with 9 ms delay so that I can acheive 200 kbps througput. You can check my code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Nope. I only calculate througput every second.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. Sure!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I am using 7.5 ms interval, the wireshark looks like:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1763997423973v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I am using the 4s interval, the wireshark is:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1763997694363v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think it clearly show that in one 4s intertal only&amp;nbsp;send two packet. Could you kindly check my code in the attached file. I really really have no idea on this. Thank you so much!!!!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/thread/555233?ContentTypeID=1</link><pubDate>Mon, 24 Nov 2025 13:40:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85a9e2fb-75e7-42c5-ada2-1221b8e3657c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Zhou,&amp;nbsp;&lt;br /&gt;I agree that we need to see why it only send a few packets per connection interval.&amp;nbsp;&lt;br /&gt;I suspect it may have something to do with the connection event length, but I already see that you have set&amp;nbsp;&lt;br /&gt;CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=4000000&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;So it could be something else.&amp;nbsp;&lt;br /&gt;We need to look at how you send data from the peripheral to the central. Are you just looping infinitely and calling&amp;nbsp;bt_nus_send() without any delay ?&lt;br /&gt;&lt;br /&gt;Anything in your central application that can slow down the receiving of those package ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;If you can provide the sniffer we can check if it&amp;#39;s the peripheral didn&amp;#39;t send or if the central couldn&amp;#39;t receive.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/thread/555227?ContentTypeID=1</link><pubDate>Mon, 24 Nov 2025 13:27:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f970c9f4-7d11-4ad0-86cf-1d62e61da9f8</guid><dc:creator>Ziyao Zhou</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yes, for the througput sample I can get around 1400 kbps.&lt;/p&gt;
&lt;p&gt;I will try the sniffer, but I think the thing is clear now, the interval only send a few packets rather than send it all the time. And I think I have corretly include all nessesary config.&lt;/p&gt;
&lt;p&gt;I am doing the time sychronization along with the data transfer, but I have checked close the sychronization, the throughput will still be quite low after changing the interval.&lt;/p&gt;
&lt;p&gt;Could you kindly check my code in the attached file? Thank you so much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Higher connection interval with lower throughput</title><link>https://devzone.nordicsemi.com/thread/555213?ContentTypeID=1</link><pubDate>Mon, 24 Nov 2025 12:56:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20e5a47a-173d-473c-a431-302da66105e0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Zhou,&amp;nbsp;&lt;br /&gt;I assume you already tested with the throughput sample in the SDK ?&amp;nbsp;&lt;br /&gt;What&amp;#39;s the throughput you achieve with the sample ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I would suggest to try capturing a&lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-6-bluetooth-le-sniffer/"&gt; sniffer trace&lt;/a&gt;.&amp;nbsp; This way we can check if there is any bottle neck causing the issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have the central or peripheral doing any any other activity when they are exchanging data (like scanning or advertising) ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>