Start a new topic

error at serial port

after uploading the arduino code to MCU, when opening serial port, it shows an error as, "recvRetCommandFinished err "

please guide me


Okay, so where in your code is this line "recvRetCommandFinished err " told to print.  Looking at that segment of code yields clues as to the whys

I have checked the Hardware.cpp from NextionLib and there is some kind of instructions pasted as below;


bool ret = false;

    uint8_t temp[4] = {0};

   

    nexSerial.setTimeout(timeout);

    if (sizeof(temp) != nexSerial.readBytes((char *)temp, sizeof(temp)))

    {

        ret = false;

    }

 

    if (temp[0] == NEX_RET_CMD_FINISHED

        && temp[1] == 0xFF

        && temp[2] == 0xFF

        && temp[3] == 0xFF

        )

    {

        ret = true;

    }

 

    if (ret)

    {

        dbSerialPrintln("recvRetCommandFinished ok");

    }

    else

    {

        dbSerialPrintln("recvRetCommandFinished err");

    }

   

    return ret;


When i open serial port from arduino IDE then it shows, "recvRetCommandFinished err"

could you please guide me what is the problem

In NexHardware.cpp, this would be your Debug option to follow what is going on.

So when your command was sent to nextion, there was no return, or not received properly.


The NexHardware routines are not meant to be copied into a main loop.

- So now you must understand debug is for your information so that you can test and follow.

- It does not necessarily mean a failure occurred.

- This result would also appear if you are not sending results from Nextion bkcmd


You seem like you can benefit from the Arduino tutorials to understand better your MCU

- these will be on Arduino boards and the Arduino site tutorials and documentation.



Login or Signup to post a comment