This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sdk 15.0 advertising module

setup

nrf52840 with 4 peripherals and 3 centrals

Is the following png shot valid where it states that in sdk15.0 that the advertising module only supports 1 peripheral.  I am having trouble with 4 adding peripherals to the whitelist

When adding peripheral (iOS apps)  2, 3, or 4 it seems that the 840 trashes and wdt kicks in.

When I say it trashes I get some exception that leaves function call artifacts on the debug screen that do not even have a NRF_LOG_XXX call for them.  Any help and/or links would be of help.  Thank you

Here is where I am having problems.  And I have looked at many pm_device_identities_list_set devzone ticket and tried several.. Alos when I add enough debug the problem disappears.

        case PM_EVT_PEER_DATA_UPDATE_SUCCEEDED :
        {
            bool found = false;

            NRF_LOG_INFO("%s: PM_EVT_PEER_DATA_UPDATE_SUCCEEDED: peer_id=%d data_id=0x%x action=0x%x",
                    nrf_log_push (roles_str[role]), p_evt->peer_id, p_evt->params.peer_data_update_succeeded.data_id,
                    p_evt->params.peer_data_update_succeeded.action);


            if (BLE_GAP_ROLE_PERIPH == role)
            {
                if ((p_evt->params.peer_data_update_succeeded.flash_changed)
                        && (p_evt->params.peer_data_update_succeeded.data_id == PM_PEER_DATA_ID_BONDING))
                {
                    int32_t max_phone_count = js_get_max_phone_connections();
                    //NRF_LOG_WARNING("WC %d PC %d", m_whitelist_peer_cnt, max_phone_count);
                    //if (m_whitelist_peer_cnt < max_phone_count)
                    {
                        bool already_added = false;

                        for (int32_t loop_counter = 0; loop_counter < m_whitelist_peer_cnt; loop_counter++)
                        {
                            if (m_whitelist_peers[loop_counter] == p_evt->peer_id)
                            {
                                already_added = true;
                                break;
                            }
                        }

                        if (false == already_added)
                        {

                            // Bonded to a new peer, add it to the whitelist.
                            m_whitelist_peers[m_whitelist_peer_cnt++] = p_evt->peer_id;

                            NRF_LOG_WARNING("\r\n\n\n", __func__,__LINE__);

                            err_code = pm_device_identities_list_set(m_whitelist_peers, m_whitelist_peer_cnt);   // this is where it always seems to crash
                            if ((err_code != NRF_SUCCESS)
                                    && (err_code != NRF_ERROR_NOT_SUPPORTED))
                            {
                                SW_ERROR_LOG(FILE_MAIN, __LINE__, err_code, false);
                            }

Related