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

Can't connect to nRF cloud when UI Module disabled (Asset Tracker, Thingy 91)

Hello,

I want to measure current consumption of nRF9160 of the Thingy 91 with the Asset Tracker application in PSM mode without GPS. For that, I added to the function modem_configure in main.c the lines

int err = 0;

#if defined(CONFIG_LTE_POWER_SAVING_MODE)
		err = lte_lc_psm_req(true);
		if (err) {
			LOG_ERR("PSM request failed, error: %d", err);
			return err;
		}

		LOG_INF("PSM mode requested");
#endif

I also changed data sending interval to 300 s and disabled LEDs, buzzer and NMOS in prj_thingy91_nrf9160ns.conf:

CONFIG_ENVIRONMENT_DATA_SEND_INTERVAL=300
CONFIG_LIGHT_SENSOR_DATA_SEND_INTERVAL=300
CONFIG_HOLD_TIME_RSRP=300

CONFIG_UI_LED_USE_PWM=n
CONFIG_UI_BUZZER=n
CONFIG_UI_NMOS=n

I tested it in LTE Link Monitor and PSM was successfully activated with my desired TAU (00100001 = 1 hour). I did not enable eDRX.

After that I disabled logging by editing the prj_thingy91_nrf9160ns.conf:

CONFIG_LOG=n
CONFIG_SERIAL=n
CONFIG_LOG_IMMEDIATE=n
CONFIG_USE_AT_HOST=n

And I added to the spm.conf:

CONFIG_SERIAL=n

I tested the application and it worked fine. The Thingy 91 was sending sensor data to the nRF Cloud every 300 s (5 minutes).

Then I measured the current consumption with an advanced digital multimeter (Keysight 34465A) and got an average current consumption of 6.5 mA, which is way more than I expected.

I decided to turn off the UI module in prj_thingy91_nrf9160ns.conf:

CONFIG_USE_UI_MODULE=n

After this, I can't connect to the nRF Cloud. Nothing happens when I turn on the Thingy 91 and wait for 15 minutes. I tried it several times and reopened the nRF Cloud.

Any ideas why the application doesn't work with disabled UI module? And what can I do to reduce power consumption of the asset tracker application?

I use ncs version 1.4.0 and modem firmware version 1.2.2.

Parents
  • Hello,

    you can try removing the entire src/ui folder from asset tracker, and rebuild.

  • Thank you for the advice! I removed src/ui folder and commented out following symbols in prj_thingy91_nrf9160ns.conf:

    #CONFIG_UI_LED_USE_PWM=n
    #CONFIG_UI_BUZZER=n
    #CONFIG_UI_NMOS=n
    #CONFIG_USE_UI_MODULE=n
    #CONFIG_NRF_CLOUD_LOG_LEVEL_DBG=y
    #CONFIG_NRF9160_GPS_LOG_LEVEL_DBG=n
    #CONFIG_CONSOLE_GETCHAR=y
    #CONFIG_AWS_FOTA_LOG_LEVEL_DBG=y
    #CONFIG_AWS_JOBS_LOG_LEVEL_DBG=y

    and changed:

    CONFIG_CONSOLE_SUBSYS=n
    CONFIG_CONSOLE_HANDLER=n

    In Kconfig, I commented out

    #rsource "src/ui/Kconfig"

    In CMakeLists.txt I commented out

    ...
    #  src/ui
    ...
    #add_subdirectory(src/ui)

    Then I commented out every '# include "ui.h" ' and 'ui_led_set_color(...)' and 'ui_led_set_pattern' call in main.c and gps_controller.c

    I tested the application and it connects! 

    Then I added 'set_gps_enable(true);' in the end of the main() function, because the Asset Tracker application does not react to button presses when UI module is disabled. Unfortunately, GPS still doesn't work. What can I do to make GPS work with UI module disabled?

    Then I measured the current consumption (without 'set_gps_enable(true);'), and it is about the same as before, too high. How can I lower the current consumption of the Asset Tracker application? It has peaks of 40 mA every 180 ms. Could you measure the current consumption of the Asset Tracker application, to see what I mean, and to compare? Here is the link to my project: https://yadi.sk/d/WooH3vjoHxBHuA .

Reply
  • Thank you for the advice! I removed src/ui folder and commented out following symbols in prj_thingy91_nrf9160ns.conf:

    #CONFIG_UI_LED_USE_PWM=n
    #CONFIG_UI_BUZZER=n
    #CONFIG_UI_NMOS=n
    #CONFIG_USE_UI_MODULE=n
    #CONFIG_NRF_CLOUD_LOG_LEVEL_DBG=y
    #CONFIG_NRF9160_GPS_LOG_LEVEL_DBG=n
    #CONFIG_CONSOLE_GETCHAR=y
    #CONFIG_AWS_FOTA_LOG_LEVEL_DBG=y
    #CONFIG_AWS_JOBS_LOG_LEVEL_DBG=y

    and changed:

    CONFIG_CONSOLE_SUBSYS=n
    CONFIG_CONSOLE_HANDLER=n

    In Kconfig, I commented out

    #rsource "src/ui/Kconfig"

    In CMakeLists.txt I commented out

    ...
    #  src/ui
    ...
    #add_subdirectory(src/ui)

    Then I commented out every '# include "ui.h" ' and 'ui_led_set_color(...)' and 'ui_led_set_pattern' call in main.c and gps_controller.c

    I tested the application and it connects! 

    Then I added 'set_gps_enable(true);' in the end of the main() function, because the Asset Tracker application does not react to button presses when UI module is disabled. Unfortunately, GPS still doesn't work. What can I do to make GPS work with UI module disabled?

    Then I measured the current consumption (without 'set_gps_enable(true);'), and it is about the same as before, too high. How can I lower the current consumption of the Asset Tracker application? It has peaks of 40 mA every 180 ms. Could you measure the current consumption of the Asset Tracker application, to see what I mean, and to compare? Here is the link to my project: https://yadi.sk/d/WooH3vjoHxBHuA .

Children
Related