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

lte_lc_system_mode_set(); not sticking

I want to change between LTE-M and NB-IOT, however lte_lc_system_mode_set(); is not actually changing the mode.

I am doing something like this

//lte_lc_system_mode_set(LTE_LC_SYSTEM_MODE_LTEM);
lte_lc_init();
//lte_lc_system_mode_set(LTE_LC_SYSTEM_MODE_LTEM);
lte_lc_connect();
	if (err)
	{
        //lte_lc_system_mode_set(LTE_LC_SYSTEM_MODE_LTEM);
	}
lte_lc_offline();

I can't rely on PSM/eDRX hence I am switching the modem on/off when I have to send something.

The Kconfig is set to NB-IOT with fallback disabled.

When lte_lc_connect() is called it ignores the mode setting and uses NB-IOT.

What do I have to do?

Parents Reply Children
  • Please use our samples as reference, that implementation will not work. 
    e.g. lte_lc_init() should only be needed to be done once.

    Applications usually have it's own "modem_configure" function where this is set.

    You need to wait a bit after you have set the modem in offline mode. (it needs to de-attach from the network)

  • I got it to work with the 1.3.99 SDK - was a bug in 1.3.0 (I messed up and checked out the wrong repo when installing manually).

    I should add some funny things:

    With 1.3.99 I can shutdown the BSDlib (can't remember the command now) and poweroff the modem, which gives a connection timeout when trying to re-init/connect. However, if I just ignore the timeout error, I can still send data to my server thus not needing to power cycle the whole board.

    Isn't it funny that a connection is actually established even though a timeout error is returned?

    Anywho, I am not doing it like that now, just found it interesting Slight smile

    And I should add that my implementation actually does work - even though it is perhaps not intended to?

  • Hi Daniel,
    note: the name "1.3.99" just indicates the master branch which is constantly updated. 
    (E.g. whats in the master branch today will be available in the tagged v1.4.0 release).

    I am glad that you got it working.

    Could you explain more in detail what you are seeing and what you are doing so that I could possibly replicate this on my side.
    To check if this is intended behavior or if this could be something that we need to investigate and fix in NCS.

    Best regards,
    martin L.

Related