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

NRF_ERROR_NO_MEM Ble mesh

Hi! We got the mesh working with our custom model. however if we try to send a package multiple times it throws NRF_ERROR_NO_MEM error. Any ideas why this might happen or if there is any workaround?

Thank you!

Parents
  • Do you know where in the code this error occurs? Which Mesh SDK version are you using? It might be that the ACCESS_MODEL_COUNT number of models is already allocated, as this link specifies.

  • Hi, we have been modifying the light_switch example in sdk 2.0.1, where we send a message 20 times when we press a button. The problem is that access_model_publish returns NRF_ERROR_NO_MEM 16 times out of 20 messages sent. In order to send the message we use a for loop where we send the message, as seen in the code:

    for (int i = 0; i <= 19; i++) {
         status = send_command_client(&m_clients[0]);
          
          if (status == NRF_ERROR_INVALID_STATE ||
              status == NRF_ERROR_NO_MEM ||
              status == NRF_ERROR_BUSY) {
            __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Cannot send. Device is busy: 0x%08lX \r\n",status);
          } else {
            ERROR_CHECK(status);
          }
          nrf_delay_ms(50);
        }

    We have tried to increase the delay and remove the delay, but nothing helps. The messages are sent unreliable

    Any ideas why all messages can't be sent and just some of them?

Reply
  • Hi, we have been modifying the light_switch example in sdk 2.0.1, where we send a message 20 times when we press a button. The problem is that access_model_publish returns NRF_ERROR_NO_MEM 16 times out of 20 messages sent. In order to send the message we use a for loop where we send the message, as seen in the code:

    for (int i = 0; i <= 19; i++) {
         status = send_command_client(&m_clients[0]);
          
          if (status == NRF_ERROR_INVALID_STATE ||
              status == NRF_ERROR_NO_MEM ||
              status == NRF_ERROR_BUSY) {
            __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Cannot send. Device is busy: 0x%08lX \r\n",status);
          } else {
            ERROR_CHECK(status);
          }
          nrf_delay_ms(50);
        }

    We have tried to increase the delay and remove the delay, but nothing helps. The messages are sent unreliable

    Any ideas why all messages can't be sent and just some of them?

Children
Related