Search code examples
embeddedcanopen

CanFestival readNetworkDict() fails


I'm trying to bring up CAN bus client application based on CanFestival.

When I try to read from the CAN server readNetworkDict() fails in the following code

    offset = d->firstIndex->SDO_CLT;
    lastIndex = d->lastIndex->SDO_CLT;
    if (offset == 0) {
        MSG_ERR(0x1AC6, "No SDO client index found for nodeId ", nodeId);
        return 0xFF;
    }

and this is SDO_CLT in my dictionary.

const quick_index GoldTwitter_firstIndex = {
  3, /* SDO_SVR */
  0, /* SDO_CLT */
  4, /* PDO_RCV */
  5, /* PDO_RCV_MAP */
  6, /* PDO_TRS */
  7 /* PDO_TRS_MAP */
};

Having only a couple of days of CAN bus experience I have some basic questions.

What is SDO_CLT?

Is it being zero indicates the problem in dictionary generation or I have to initialize it during runtime?


Solution

  • You must define the SDO parameters in the dictionary, something like this: enter image description here