case about NRF9160 High registered network current (test environment, no NB network signal)

Hi,

1. Please solve the problem of high network current registered to nRF9160 (test environment: no network signal)

2. Rf signal: the test current is normal. See Appendix A for the test data

3. No RF signal (shielded room) : the test current is abnormal. See appendix B for the test data

4. Tools for opening test data: see Attachment: C

5. See Attachment D for test example

/*
 * Copyright (c) 2020 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

#include <zephyr.h>
#include <stdio.h>
#include <modem/lte_lc.h>
#include <net/socket.h>

#define UDP_IP_HEADER_SIZE 28
K_SEM_DEFINE(lte_connected, 0, 1);

#if defined(CONFIG_NRF_MODEM_LIB)
static void lte_handler(const struct lte_lc_evt *const evt)
{
	switch (evt->type) {
	case LTE_LC_EVT_NW_REG_STATUS:
		if ((evt->nw_reg_status != LTE_LC_NW_REG_REGISTERED_HOME) &&
		     (evt->nw_reg_status != LTE_LC_NW_REG_REGISTERED_ROAMING)) {
			break;
		}

		printk("Network registration status: %s\n",
			evt->nw_reg_status == LTE_LC_NW_REG_REGISTERED_HOME ?
			"Connected - home network" : "Connected - roaming\n");
		k_sem_give(&lte_connected);
		break;
	case LTE_LC_EVT_PSM_UPDATE:
		printk("PSM parameter update: TAU: %d, Active time: %d\n",
			evt->psm_cfg.tau, evt->psm_cfg.active_time);
		break;
	case LTE_LC_EVT_EDRX_UPDATE: {
		char log_buf[60];
		ssize_t len;

		len = snprintf(log_buf, sizeof(log_buf),
			       "eDRX parameter update: eDRX: %f, PTW: %f\n",
			       evt->edrx_cfg.edrx, evt->edrx_cfg.ptw);
		if (len > 0) {
			printk("%s\n", log_buf);
		}
		break;
	}
	case LTE_LC_EVT_RRC_UPDATE:
		printk("RRC mode: %s\n",
			evt->rrc_mode == LTE_LC_RRC_MODE_CONNECTED ?
			"Connected" : "Idle\n");
		break;
	case LTE_LC_EVT_CELL_UPDATE:
		printk("LTE cell changed: Cell ID: %d, Tracking area: %d\n",
		       evt->cell.id, evt->cell.tac);
		break;
	default:
		break;
	}
}

static int configure_low_power(void)
{
	int err;

#if defined(CONFIG_UDP_PSM_ENABLE)
	/** Power Saving Mode */
	err = lte_lc_psm_req(true);
	if (err) {
		printk("lte_lc_psm_req, error: %d\n", err);
	}
#else
	err = lte_lc_psm_req(false);
	if (err) {
		printk("lte_lc_psm_req, error: %d\n", err);
	}
#endif

#if defined(CONFIG_UDP_EDRX_ENABLE)
	/** enhanced Discontinuous Reception */
	err = lte_lc_edrx_req(true);
	if (err) {
		printk("lte_lc_edrx_req, error: %d\n", err);
	}
#else
	err = lte_lc_edrx_req(false);
	if (err) {
		printk("lte_lc_edrx_req, error: %d\n", err);
	}
#endif

#if defined(CONFIG_UDP_RAI_ENABLE)
	/** Release Assistance Indication  */
	err = lte_lc_rai_req(true);
	if (err) {
		printk("lte_lc_rai_req, error: %d\n", err);
	}
#endif

	return err;
}

static void modem_init(void)
{
	int err;

	if (IS_ENABLED(CONFIG_LTE_AUTO_INIT_AND_CONNECT)) {
		/* Do nothing, modem is already configured and LTE connected. */
	} else {
		err = lte_lc_init();
		if (err) {
			printk("Modem initialization failed, error: %d\n", err);
			return;
		}
	}
}

static void modem_connect(void)
{
	int err;

	if (IS_ENABLED(CONFIG_LTE_AUTO_INIT_AND_CONNECT)) {
		/* Do nothing, modem is already configured and LTE connected. */
	} else {
		err = lte_lc_connect_async(lte_handler);
		if (err) {
			printk("Connecting to LTE network failed, error: %d\n",
			       err);
			return;
		}
	}
}

static void modem_disconnect(void)
{
	int err;

	if (!IS_ENABLED(CONFIG_LTE_AUTO_INIT_AND_CONNECT)) {
		/* Do nothing, modem is already configured and LTE connected. */
	} else {
		err = lte_lc_deinit();
		if (err) {
			printk("Connecting to LTE network failed, error: %d\n",
			       err);
			return;
		}
	}
}

#endif

void main(void)
{
	int err;

	printk("UDP sample has started\n");

	//work_init();

#if defined(CONFIG_NRF_MODEM_LIB)

	/* Initialize the modem before calling configure_low_power(). This is
	 * because the enabling of RAI is dependent on the
	 * configured network mode which is set during modem initialization.
	 */
	//modem_init();

	//err = configure_low_power();
	//if (err) {
	//	printk("Unable to set low power configuration, error: %d\n",
	//	       err);
	//}
        k_sleep( Z_TIMEOUT_MS(5000) );
	//modem_connect();

	//k_sem_take(&lte_connected, K_FOREVER);
#endif

        while(1)
        {
            lte_lc_init();
            lte_lc_connect();
            k_sleep( Z_TIMEOUT_MS(180000) );
            
            lte_lc_offline();
            lte_lc_deinit();
            k_sleep( Z_TIMEOUT_MS(180000) );
        }
}

6. Test DK: PCA10090 0.9.0 2019.21

7. Test SDK: NCS V1.9.1

8.The attachment

Thank you for all your assistance.
Kind regards,
Peter.Min

Parents Reply
  • Modem team commented;

    Log analyzed. I did not have description for test case execution, but I tried to open the situation below. There are three modem activation with AT+CFUN=1, in first two of these cases LTE NW was present and modem was able to attach and register to NW.

    Third modem activation with AT+CFUN=1 was not able to find network. There were no band limitation (AT%XBANDLOCK) set, so modem searches lots of bands and frequencies and it can take time, minutes. Most likely that search pattern is visible in current consumption graph.

    This search time can be optimized for test purposes and also for products by using for example AT%XBANDLOCK and AT%PERIODICSEARCHCONF. There are also other good AT commands for optimizations like AT%XCOUNTRYDATA, AT%MDMEV and AT%XMODEMSLEEP.

    09:45:38.834799 +CFUN=1
    09:45:40.135244 MasterInformationBlock-NB
    09:45:40.135366 earfcn : 3684, physical cell id : 67
    09:45:40.300405 SystemInformationBlockType1-NB
    09:45:41.437521 SystemInformation-NB [ SIB2 ]
    09:45:57.748495 SystemInformation-NB [ SIB3 ]
    09:46:26.853903 RRCConnectionRelease-NB

    09:47:06.295767 +CFUN=4
    09:47:06.296499 NRFLTE/NAS-EPS Detach request (EPS detach / switch-off)
    09:47:12.429373 +CFUN=0

    09:48:13.863973 +CFUN=1
    09:48:15.176046 MasterInformationBlock-NB
    09:48:15.176168 earfcn : 3684, physical_cell_id : 67
    09:48:15.341268 SystemInformationBlockType1-NB
    09:48:15.398367 SystemInformation-NB [ SIB2 ]
    09:48:21.109274 SystemInformation-NB [ SIB3 ]
    09:49:16.273794 RRCConnectionRelease-NB

    09:49:25.938772 +CFUN=4
    09:49:26.851400 NRFLTE/NAS-EPS Detach request (EPS detach / switch-off)
    09:49:57.469106 +CFUN=0

    09:50:57.618643 +CFUN=1
    Search starts here and continues..

Children
No Data
Related