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.

CCS/LAUNCHXL-CC1352R1: When calling "ApiMac_mlmeResetReq" after a dissociation due to data failures (repeating multiple times), scanCnf is not called anymore.

Part Number: LAUNCHXL-CC1352R1

Tool/software: Code Composer Studio

Hello, I am facing the following problem.

Problem:

  • Jdllc scanCnf is not called anymore after several successive [association --> scan again due to pollCnf giving too much noAck (I reset the coprocessor manualy)] when I call "ApiMac_mlmeResetReq(false)" before going to scan again.

Setup:

  • Lauchpad cc13x2r1 using a simpler version of the sensor project (attached HERE so you can reproduce).
  • Simplelink v3.10.1.11
  • It uses only non-beacon mode, 132 as phy_id, it will try to associate to a specific PAN_ID = 0x6565.
  • Lauchpad cc13x2r1 with default Coprocessor code controlled via serial using a custom program just to setup the PAN.

To Reproduce the problem:

1 - Flash a sensor with the provided code and press any of his buttons to start scanning (you can check the serial to see it is scanning) and leave as it is.

2 - Using the coprocessor, open a PAN (pan_id = 0x6565) and enable associations,

3 - Wait for the sensor to associate (the sensor will start sending polls).

4 - Reset the coprocessor (or just run the host program again, resetting the coprocessor at the beginning). The sensor will start losing poll acks and after 5, the sensor will call handle_max_poll_failures and it will start scanning again.

5 - Repeat steps [2:4] several times (I can reproduce by usually repeating the process around 20~30 times)

6 - You will see, eventually, that the sensor does not call scanCnf and keep just receiving beacons forever.

One interesting observation, is that you can comment out the line 406 in jdllc.c (undefining the symbol ENALBE_RESET_OF_MAC) and the problem disappears. Here is the code extract:

#define ENALBE_RESET_OF_MAC        //  <---- this is the line 406

static void handle_max_poll_failures(void) {
#ifdef ENALBE_RESET_OF_MAC
    System_printf("resetting @@@@@@@@@@\r\n");
    ApiMac_mlmeResetReq(false);
    Ssf_setScanBackoffClock(500);
#else
    System_printf("just scan in a little @@@@@@@@@@\r\n");
    Ssf_setScanBackoffClock(500);
#endif
    Ssf_setPollClock(0);
}

 

Is there a problem calling ApiMac_mlmeResetReq whenever the sensor will restart scanning again?