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

better documentation for nrfutil serial option

I found some information in Case ID: 251716   , however, when I went to look for these options in the  nrfutil manual there is not a single mention of what the options are for. It would be nice to know what -prn means.

We are using serial dfu uploads with very unreliable results (need to retry often) so a full accounting of options along with full descriptions of what they do and why they might be important would be handy.

  • Hi,

    The -prn option (long form --packet-receipt-notification) sets the packet receipt notification to use for the DFU process.

    This parameter is documented in the SDK documentation, both for the specific use case of serial transport, and in general for the DFU protocol.

    The short explanation:
    PRN is disabled if set to 0. Otherwise, for every PRN number of packets transferred, the DFU target sends back a CRC for the controller to check that the firmware (thus far) is correctly transferred. Use it for unreliable transport layers (such as BLE or serial without flow control.) The higher the number, the more packets sent between each check. The lower the number, the more overhead due to checking.

    Regards,
    Terje

  • That explains it but I do believe it should be documented at the level of the nrfutil.

    I suppose a follow up question would be, "why would serial without flow control be less reliable?"

  • Hi,

    I guess there could be some pointers to the SDK documentation, if anything.

    Reliability of serial communication: If the transmitting end sends data faster than the receiving end can handle it, then some data will get discarded. With hardware flow control, the receiver signals when it is ready for more data, ensuring that this does not happen. One reason for the receiver not being ready, in the context of DFU, is that flash writing can be a bottleneck, leading to full RX buffers.

    Regards,
    Terje

Related