How to decrease NUS size in peripheral_uart example available in NCS 1.9.1

Hey! I am starting my studies in the BLE protocol and I would like to send the ZE03 sensor data through the Nordic UART Service (NUS).

The sensor continuously sends 9 bytes every second.

The problem is that by default BT_NUS_UART_BUFFER_SIZE is set to 40.

If I reduce the BT_NUS_UART_BUFFER_SIZE to 9 bytes or any value smaller than 40 bytes, my device crashes and a blue led on the RF52840 dongle lights up. With this error I can't even locate the bluetooth device.

I am able to increase the value of the NUS buffer as per the answer available at devzone.nordicsemi.com/.../ncs-1-6-1-peripheral_uart-example---increasing-nude size.

But I can't lower this buffer. With this I can only send 45 bytes from my sensor at a time (45 = 9*5 > 40). But what I want is to only send 9 bytes every second.

Can someone help me?

Related