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

LPN publish unack message without friend connection.

I'm using SDK 15.3 and Mesh 3.20 on a system, that works fine with LPN and nodes with friend-features.

The LPN can initiates (establish) friend connection, request status from a group in order to get a unicast address for one of the member in the group.

Everything worksfine, except for the delay until the LPN is up running with a known unicast-address. Sometimes it is fast and other times it takes way to long time (1-2 seconds) wihich is not acceptable. 

Because of that, I'm trying to publish to an address stored from an earlier session and then later on establish a friend connection and request status from a group etc 


As far as i understand, it is okay to send (publish) an unacknowledged unsegmented message WTHOUT having an established connection to a friend node !  Correct ? 

But when I try this, I get a NRF_ERROR_FORBIDDEN returend from access_model_publish() . originated from 

uint32_t net_state_seqnum_alloc(uint32_t * p_seqnum)
{
    if (m_net_state.seqnum < m_net_state.seqnum_max_available)
    {
  ...
        return NRF_SUCCESS;
    }
    else
    {
        seqnum_block_allocate();
        return NRF_ERROR_FORBIDDEN;
    }
}

 

update ... Have just tried to resend this message more than once... I seem like it is only the very first time the error NRF_ERROR_FORBIDDEN is returned. Herafter everything works fine.

So the answer above is YES,. it is okay to send without having an established friend connection, as I expected :-) 


BUT how do i prevent the NRF_ERROR_FORBIDDEN ? Can I check some kind of status of the mesh ? 

Parents Reply Children
  • Hi,
    Yes, I have seen that thread.

    I'm using the flash to store some user settings too .. so the PERSISTENT_STORAGE is 1 in my application.

    To prevent the NRF_ERROR_FORBIDDEN  i have tried to check the flash status by calling flash_manager_is_stable(void) before calling access_model_publish(). I still got the NRF_ERROR_FORBIDDEN  status back, the very first time trying to send (publish). Everything works fine after this first call of  access_model_publish() where I can send as much as i like without any failure. 

    Any other suggestions ?

  • 14 days and not a single answer from nordics support !!! .. maybe it is time to look at DA14531.

  • Really sorry for the late reply. 

    Our developer have taken a look at the case and tried to reproduce this issue but haven't been able to.

    He tried the following on his side and I could not reproduce this:
    - Flashed LPN example from SDK v3.2.0
    - Provisioned the example from nRF Mesh Android app.
    - Bound application key to the Generic OnOff client model and configured the publish address.
    - Started pressing Button1/0. 
    Everything worked as it should be. 

    Can you provide exact steps to reproduce this issue?

Related