how to set mode of Serial LTE Modem

Im currently using a nRF9160 with SLM application as a modem on a nRF52840.

How can I configure the modem for NB-IOT or LTE by using the nrf52840?

My project is working, I just need a way to set it to NB-IOT only for example.

I found CONFIG_LTE_NETWORK_MODE, but this gives some errors.

kind regards,

Jonas

Parents Reply
  • Hi Jonas,

    Sorry for misunderstanding. Do you mean by which application? I thought your nRF52840 as modem controlling chip already run applications like following, so you can send the commands from nRF52840 to nRF9160 through UART.

    Cellular: SLM Shell (nordicsemi.com)

    nRF91 Series as a Zephyr-compatible modem (nordicsemi.com)(Using Zephyr Cellular modem sample)

    If the application means nRF9160 SLM, you can add an overlay-linkcontrol.conf with following configurations:

    CONFIG_LTE_LINK_CONTROL=y
    CONFIG_LTE_NETWORK_MODE_NBIOT=y

    Then add lte_lc_connect function after nrf_modem_lib_init.

    	const int ret = nrf_modem_lib_init();
    
    	if (ret) {
    		LOG_ERR("Modem library init failed, err: %d", ret);
    		if (ret != -EAGAIN && ret != -EIO) {
    			return ret;
    		} else if (ret == -EIO) {
    			LOG_ERR("Please program full modem firmware with the bootloader or "
    				"external tools");
    		}
    	}
    
            lte_lc_connect();

    The SLM will connect with NB-IoT network automatically after reboot. The connection may take some time according to my test:

    Ready
    > AT%XSYSTEMMODE?
    
    %XSYSTEMMODE: 0,1,0,0
    
    OK
    > AT+CFUN?
    
    +CFUN: 1
    
    OK
    > AT+CEREG?
    
    +CEREG: 5,1,"A8B3","03238D6E",9,,,"11100000","11100000"
    
    OK
    
    +CSCON: 0
    
    +CEREG: 1,"A8B3","03238D69",9,,,"11100000","11100000"

    Best regards,

    Charlie

Children
No Data
Related