How to use GATT Queue for transmitting and receiving data with NRF5340DK board

Hello,

I am working on the NRF5340 DK board with nRF Connect SDK ncs v1.5.1. I want to transmit data at a fast rate (~ 200bytes at every 10ms ) from central to a peripheral device. For this, I have modified the sample Throughput code to achieve maximum MTU size and tx data from master to slave. Now I am able to transmit data successfully but after every 100ms

Problem:

I want to send data after every 10ms that is why I want to use GATT QUEUE feature. Please help to provide any sample code or steps to use this feature.

Best Regards,

Sanket C

Parents
  • Hi,

    The throughput example demonstrates how you can get high throughput, and you should also be able to exchange packets every 10 ms. Perhaps you can elaborate on what changes you have made to it, and how you tested (using the command line interface to specify things like connection interval, data length etc)?

    Also, what do you mean by GATT QUEUE here? That is a nRF5 SDK library, but not in the nRF Connect SDK.

  • Throughput with uart.zip

    Hello Einar,

    I think I have not given you the full picture. Basically, I am trying to implement two services between central and peripheral devices. One service is throughput and another is NUS service. On both the service I want to send 200+ bytes of data. (for NUS service data rate is very slow but on throughput, service is after every 10ms)

    To achieve this, I have merged throughput service and LE data update-related stuff in Central_uart and Peripheral_uart. 

    With this modification, I could able to send data of size 200+ bytes. I have verified by sending data from UART and then to NUS and throughput service one by one. 

    Later I tried sending the same data to the throughput service by keeping it in while(1) loop (in this situation not sending data over NUS and only sending to throughput). I am receiving data at other end but I can see a latency of 50ms that too changes some time.

    I want to minimize this latency for throughput. Attaching the sample code for your reference. Please let me know if in case I missed any thing.

  • Hi,

    You are missing some key parts of the throughput example. For instance, you never set the connection parameters. Based on what you write I assume you would want the connection interval to be 10 ms, and then you must set it to that. I suggest you search for "conn_param" within ncs//nrf/samples/bluetooth/throughput/ to see the relevant code for that.

Reply Children
No Data
Related