This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sending multiple notify packets per connection interval

Hi,

Device: NRF53

I'm trying to send 3 notify packets in a 15ms connection internal but I can send 2.

I'm using Nrf connect and Zephyr.  is there a limit or a define to set this.

Thank you for any guidance and help

Regards

  • Sorry for the delay on this, I'm currently looking into it

    Best regards,

    Simon

  • Hi Simon,

    Did you find anything after looking into this?

    Thanks

  • I did some testing and was able to send 3 packets in a connection interval.

    I modifed the peripheral_uart sample from NCS v1.6.0 such that a 15 ms connection interval would be used:

    diff --git a/samples/bluetooth/peripheral_uart/prj.conf b/samples/bluetooth/peripheral_uart/prj.conf
    index cd6df0664..2decfd725 100644
    --- a/samples/bluetooth/peripheral_uart/prj.conf
    +++ b/samples/bluetooth/peripheral_uart/prj.conf
    @@ -48,3 +48,12 @@ CONFIG_LOG_BACKEND_RTT=y
     CONFIG_LOG_BACKEND_UART=n
     
     CONFIG_ASSERT=y
    +
    +CONFIG_DEBUG_OPTIMIZATIONS=y
    +
    +
    +
    +CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=y
    +CONFIG_BT_PERIPHERAL_PREF_MIN_INT=12
    +CONFIG_BT_PERIPHERAL_PREF_MAX_INT=12
    +CONFIG_BT_PERIPHERAL_PREF_SLAVE_LATENCY=0
    diff --git a/samples/bluetooth/peripheral_uart/src/main.c b/samples/bluetooth/peripheral_uart/src/main.c
    index cf51a899f..0e9bbc03d 100644
    --- a/samples/bluetooth/peripheral_uart/src/main.c
    +++ b/samples/bluetooth/peripheral_uart/src/main.c
    @@ -288,9 +288,34 @@ static void security_changed(struct bt_conn *conn, bt_security_t level,
     }
     #endif
     
    +//struct bt_conn *conn, uint16_t interval, uint16_t latency, uint16_t timeout
    +static void le_param_updated(struct bt_conn *conn, uint16_t interval, uint16_t latency, uint16_t timeout)
    +{
    +	struct bt_conn_info info; 
    +	char addr[BT_ADDR_LE_STR_LEN];
    +	
    +	if(bt_conn_get_info(conn, &info))
    +	{
    +		printk("Could not parse connection info\n");
    +	}
    +	else
    +	{
    +		bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));
    +		
    +		printk("Connection parameters updated!	\n\
    +		Connected to: %s						\n\
    +		New Connection Interval: %u				\n\
    +		New Slave Latency: %u					\n\
    +		New Connection Supervisory Timeout: %u	\n"
    +		, addr, info.le.interval, info.le.latency, info.le.timeout);
    +	}
    +}
    +
    +
     static struct bt_conn_cb conn_callbacks = {
     	.connected    = connected,
     	.disconnected = disconnected,
    +	.le_param_updated = le_param_updated,
     #ifdef CONFIG_BT_NUS_SECURITY_ENABLED
     	.security_changed = security_changed,
     #endif
    @@ -479,6 +504,8 @@ static void configure_gpio(void)
     	}
     }
     
    +
    +
     void main(void)
     {
     	int blink_status = 0;
    

    Then I programmed the peripheral_uart on an nRF52 DK and the central_uart on an nRF53 DK and sniffed the data using a third nordic device and the nRF Sniffer software.

    I sent a long string from the peripheral_uart sample to the central_uart

    Which resulted in the following output in the nRF Sniffer:

    As you can see, three packets are sent within a single connection event

    Best regards,

    Simon

  • Thanks for doing this testing.  My peripheral is an nrf53,  would it be possible to swap the roles of your test and make the peripheral a nrf53 please?

    I have two nrf53 so I'll try that this end.

    Thanks

  • Hi Simon,

    I've tested with the nrf53 uart peripheral example and a phone and I'm also able to send 3 packets.  I now need to see why my project can't.

    Thanks for your help.

    Neil

Related