This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[CC2562P] INVALID_PARAMETER status in AF_DATA_REQUEST_SRSP.

Hi,

I would like to know more about INVALID_PARAMETER value and its meaning.

My code basically polls the serial port until the dongle is inserted into the socket.

Once inserted the thread get notified and start the restore network procedure. (Procedure that sees AF_REGISTER and BDB Commissioning)

I wait for 10 seconds, just to be sure that the restore is completed.

And then start polling my end-devices, to check which one is online, by reading the 'local temperature' attribute of each one.

Now, the end-devices are both connected to a router so when I restore the network and the router still hasn't fully connected to the dongle I get a NWK_NO_ROUTE status error, until the connection is made, which makes sense.

The problem is that sometimes when I repeat the steps and send the AF_DATA_REQUEST I get an INVALID_PARAMETER status (0x02) and I don't really know why and to be honest I don't even know the meaning of it.

Hardware: 

  1. CC2562P Sonoff dongle 
  2. Thermostat
  3. Temperature Sensor

Software:

  1. ZigBee 3.0.X

(If you find any information confusing, I would be more than glad to resolve the doubt)

Best Regards,

Luca Vetri.

  • Hi Luca,

    You can search for afStatus_INVALID_PARAMETER in the mt_af.c and af.c files to discover the multiple reasons why invalid parameter can be returned.  These include a missing endpoint, duplicate endpoint, incorrect address, incorrect address mode, or delivering another AF data request command before the prior one has been processed.  You can further debug the ZNP to determine the exact source.

    Regards,
    Ryan

  • Can you elaborate what parameter you use for AF_DATA_REQUEST when you see INVALID_PARAMETER?