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

nrf52832 mesh uart often no response

Hi,

     I have three nRF52 DKs,instance is “ nrf5_SDK_for_Mesh_v4.2.0_serial”。When I send commands from PC (UART) to DKs ,DKs running well,but often no response from DK (UART) to  PC。

response ok: 

(often)no response from DKs to PC,but DKs running well:

                                                                                 Thanks !

Parents
  • Hi,

    The serial events sent in the situation where you get responses, doesn't look right. It is "Cmd Rsp" packets ("command response"), and the format should be:

    Length (one byte, value "3")
    "Cmd Rsp" opcode (one byte, value "0x84")
    Opcode for the command being respnded to (one byte)
    Status code (0x00 for "OK", or one of the Serial status codes

    From the screenshot you can see that the commands sent from the PC side are commands 0x10 and 0x11, but the response commands from the device are not responses to commands 0x10 or 0x11. They seem to be off by one byte, in one or the other direction.

    What application are you using for sending and receiving UART? Is it sending only the bytes shown in the screenshot, or is it sending for instance "newline" and/or additional "carriage return" bytes at end-of-line as well?

    My point is: The first screenshot is not correct either, and the responses indicate that there is something wrong with the bytes sent from the PC side.

    Regards,
    Terje

Reply
  • Hi,

    The serial events sent in the situation where you get responses, doesn't look right. It is "Cmd Rsp" packets ("command response"), and the format should be:

    Length (one byte, value "3")
    "Cmd Rsp" opcode (one byte, value "0x84")
    Opcode for the command being respnded to (one byte)
    Status code (0x00 for "OK", or one of the Serial status codes

    From the screenshot you can see that the commands sent from the PC side are commands 0x10 and 0x11, but the response commands from the device are not responses to commands 0x10 or 0x11. They seem to be off by one byte, in one or the other direction.

    What application are you using for sending and receiving UART? Is it sending only the bytes shown in the screenshot, or is it sending for instance "newline" and/or additional "carriage return" bytes at end-of-line as well?

    My point is: The first screenshot is not correct either, and the responses indicate that there is something wrong with the bytes sent from the PC side.

    Regards,
    Terje

Children
  • Hi,Terje:

        A moment ago,I fund it's wrong with the use of "Flow Control"。I connect the DK's RTS/CTS# to PC's RTS/CTS#,didn't exchange it。There were two solutions for it:

        One is exchange the RTS/CTS# between DK an PC;

       The other is disable the function of FC by change the function serial_uart_init(serial_uart_rx_cb_t rx_cb, serial_uart_tx_cb_t tx_cb)。

                                                            Thanks,

                                                             Zhougang

  • Hi,

    Thank you for sharing. Erroneous flow control could explain why the data is interpreted wrongly, yes. I am happy to see that you found a solution.

    Regards,
    Terje

Related