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

Lowering the power consumption of nRF9160 mqtt_example

Hi,

I've been trying to lower the power consumption of the MQTT example and followed the guide in here

1. I compiled the low power UDP example and do exactly all the things provided here. However, the minimum current for me is 50uA at 5V supply. The supply is external and everything is set properly but I do not know why I produce the results reported( My DK version is 0.8.2). I want to know why I am not getting the same results.

2. I tried to lower the power consumption of the MQTT example by modifying it to be like the low power UDP example(here) and lowered the minimum current to 50uA which is again like the UDP example. But when the LTE link is established, the average current increases to 500uA . In the UDP example, I do not see any spikes on the current unless when it transfers data. But at the MQTT example, there are some spikes that are related to the LTE connection( I activated PSM but there are not any sensible difference). Is there any way that I can reduce the power consumption in the MQTT example? Why PSM is not helping?

This is the main.c of my code:

 modem_configure();

        err = lte_lc_psm_req(true);
        if (err) {
                printk("ERROR: set edrx %d\n", err);
                return;
        }


	client_init(&client);

	err = mqtt_connect(&client);
	if (err != 0) {
		printk("ERROR: mqtt_connect %d\n", err);
		return;
	}

	err = fds_init(&client);
	if (err != 0) {
		printk("ERROR: fds_init %d\n", err);
		return;
	}

3. The thing that is strange to me is that in the MQTT example there is a "modem_configure" function that calls the "lte_lc_init_and_connect" function for establishing the LTE connection. However, in the UDP example, this function is not used and only "lte_lc_psm_req" is used. However, if I delete the "lte_lc_init_and_connect" function from MQTT example, it cannot get connected to the server because there is not an LTE connection. Can anyone clear this up for me?

Related