Skip to content

Commit 0ec845d

Browse files
sigvartmhhakonfam
authored andcommitted
samples: nrf9160: aws_fota: Add AT Notify initialization
AT Notify which was added in 16ae282 was not updated for the samples. `at_notif_init()` needs to be called before lte connect is called. Signed-off-by: Sigvart Hovland <[email protected]>
1 parent 1fc2c7c commit 0ec845d

File tree

1 file changed

+4
-3
lines changed
  • samples/nrf9160/aws_fota/src

1 file changed

+4
-3
lines changed

samples/nrf9160/aws_fota/src/main.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
*/
66

77
#include <zephyr.h>
8-
#include <uart.h>
98
#include <stdio.h>
10-
#include <at_cmd.h>
119
#include <bsd.h>
1210
#include <lte_lc.h>
11+
#include <at_cmd.h>
12+
#include <at_notif.h>
1313
#include <net/mqtt.h>
1414
#include <net/socket.h>
1515
#include <net/bsdlib.h>
1616
#include <net/aws_fota.h>
17-
1817
#include <dfu/mcuboot.h>
1918
#include <misc/reboot.h>
2019

@@ -441,6 +440,8 @@ static void modem_configure(void)
441440
"This sample does not support auto init and connect");
442441
int err;
443442

443+
err = at_notif_init();
444+
__ASSERT(err == 0, "AT Notify could not be initialized.");
444445
err = at_cmd_init();
445446
__ASSERT(err == 0, "AT CMD could not be established.");
446447
printk("LTE Link Connecting ...\n");

0 commit comments

Comments
 (0)