This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Modbus RTU protocol over "BLE UART"

I used the Nordic EVAL model nRF52-DK which uses the "nRF52832" chip.
The EVAL has been programmed as "Pheripheral" with the application "BLE over UART" made available by Nordic itself.
The "BLE over UART" profile contains the SoftDevice inside: "s132_nrf52_6.1.0_softdevice.hex".
The RX / TX signals of the UART have been connected to the serial port of an external device.
The BLE client is a PC application interfaced with the VCP of the "nRF51-Dongle" dongle.
The data frames to be exchanged have a maximum size of 512 bytes (stardard modbus RTU). The ATT_MTU = 20.
What is the reliability of BLE communication in the case of buffer fragmentation in packets of 20 bytes each ?
Is there a guarantee that the packets are always sent sequentially without the loss of packets ?
Which recommended solution to use for data exchange with such large buffers with modbus RTU ?

Best regards.
Thank you.

Demetrio Magrin

Parents
  • Hi,

    The link layer of BLE will ensure all packets are successfully received by peer and in the correct order. It's only a link loss that may interfere with this.

    To transmit large buffers it may be a good idea to use data length extension (include gatt_init in your project to handle this), this allow the two peers to exchange the maximum data packet size on-air, which overall will increase throughput and reduce latency.

    You can in the application have a large UART buffer, e.g. 1kByte, and in addition use hardware flow control on UART. This should ensure that the application can buffer the next packet while the current is transmitted. Enabling flow control will ensure that the peer don't overrun the buffer.

    Best regards,
    Kenneth

Reply
  • Hi,

    The link layer of BLE will ensure all packets are successfully received by peer and in the correct order. It's only a link loss that may interfere with this.

    To transmit large buffers it may be a good idea to use data length extension (include gatt_init in your project to handle this), this allow the two peers to exchange the maximum data packet size on-air, which overall will increase throughput and reduce latency.

    You can in the application have a large UART buffer, e.g. 1kByte, and in addition use hardware flow control on UART. This should ensure that the application can buffer the next packet while the current is transmitted. Enabling flow control will ensure that the peer don't overrun the buffer.

    Best regards,
    Kenneth

Children
Related