nrf9160 lte_handler() functuion not working properly

Hi,

I have using  lte_handler(const struct lte_lc_evt *const evt)  function to get the connection details.

I'm facing a problem when i remove the antenna its still show LTE connected  and pushing data to AWS but in AWS we are not getting any data after that i tried to reset the device then its showing LTE not available may i know why lte_handler not giving LTE not available after remove the antenna

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))
        {
            printk("Network registration status: %d\n", evt->nw_reg_status);
            if (!lte_connected)
            {
                break;
            }

            lte_connected = false;
            /* Notify main function that LTE is disconnected */
            lte_cb(LTE_CONNECTION_DISCONNECTED);
            if (k_delayed_work_remaining_get(&lte_reconnect_work) > 0)
            {
                printk("LTE Reconnect work already scheduled\n");
            }
            else
            {
                scheduleLTEReconnect(lte_reconnection_delay_s[atomic_get(
                    &lte_reconnection_attempts)]);
            }
            break;
        }

        printk("Network registration status: %s\n",
               evt->nw_reg_status == LTE_LC_NW_REG_REGISTERED_HOME
                   ? "Connected - home network"
                   : "Connected - roaming");
        /* Notify main function that LTE is connected */
        lte_cb(LTE_CONNECTION_CONNECTED);

        k_sem_give(&lte_connected_sem);
        k_delayed_work_cancel(&lte_reconnect_work);
        atomic_set(&lte_reconnection_attempts, 0);
        lte_connected = true;
        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_RRC_UPDATE:
        printk("RRC mode: %s\n", evt->rrc_mode == LTE_LC_RRC_MODE_CONNECTED
                                     ? "Connected"
                                     : "Idle");
        break;

    case LTE_LC_EVT_CELL_UPDATE:
        printk("LTE cell changed: Cell ID: %d, Tracking area: %d\n",
               evt->cell.id, evt->cell.tac);
        last_cellID = evt->cell.id;
        last_tac    = evt->cell.tac;
        break;

    case LTE_LC_EVT_EDRX_UPDATE:
    default:
        break;
    }
}

 if ((err = lte_lc_connect_async(lte_handler)) != NBIOT_ERROR_OK)
    {
        printk("Modem could not be configured, error: %d\n", err);
        errorHandler_process(err);
    }

Thanks 

Parents
  • Hi Bhanu,

    If you repeat my experiment, would you be able to see any Network registration status change after removing the antenna?

    Could you also check the signal strength change before and after removing the antenna? Run AT+CEREG? command from AT client or SLM sample can help to check it.

    Best regards,

    Charlie

  • hi,

    we are using e-sim card in that we have 3 neworks.

    +COPS: (2,"","","26201",7),(1,"","","26203",7),(1,"","","26202",7)

    when its connected to "26201" we are not facing any issue but when its connect to the "26203" then only we are facing this issue. our e-sim have network fallback automatically.  we have tried to change the network manually  by using command AT+COPS=0,2,"26203",7 but its not happening let us know if that is correct to change the network or not.

Reply
  • hi,

    we are using e-sim card in that we have 3 neworks.

    +COPS: (2,"","","26201",7),(1,"","","26203",7),(1,"","","26202",7)

    when its connected to "26201" we are not facing any issue but when its connect to the "26203" then only we are facing this issue. our e-sim have network fallback automatically.  we have tried to change the network manually  by using command AT+COPS=0,2,"26203",7 but its not happening let us know if that is correct to change the network or not.

Children
No Data
Related