Skip to content

Commit

Permalink
applications: samples: add handling for LWM2M_CARRIER_ERROR_CONNECT
Browse files Browse the repository at this point in the history
This new error type was introduced in the latest release of the LwM2M
Carrier library but not all the existing integrations have been updated
to handle it.

Signed-off-by: Kacper Radoszewski <[email protected]>
  • Loading branch information
kacperradoszewski authored and anangl committed Jun 7, 2024
1 parent 9559431 commit eddabba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions applications/asset_tracker_v2/src/modules/modem_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ static void print_carrier_error(const lwm2m_carrier_event_t *evt)
"Initialization failure",
[LWM2M_CARRIER_ERROR_RUN] =
"Configuration failure",
[LWM2M_CARRIER_ERROR_CONNECT] =
"Connection failure",
};

__ASSERT(PART_OF_ARRAY(strerr, &strerr[err->type]), "Unhandled carrier library error");
Expand Down
2 changes: 2 additions & 0 deletions samples/cellular/http_update/application_update/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ static void print_err(const lwm2m_carrier_event_t *evt)
"Initialization failure",
[LWM2M_CARRIER_ERROR_RUN] =
"Configuration failure",
[LWM2M_CARRIER_ERROR_CONNECT] =
"Connection failure",
};

printk("%s, reason %d\n", strerr[err->type], err->value);
Expand Down
2 changes: 2 additions & 0 deletions samples/cellular/lwm2m_carrier/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ void print_err(const lwm2m_carrier_event_t *evt)
"Initialization failure",
[LWM2M_CARRIER_ERROR_RUN] =
"Configuration failure",
[LWM2M_CARRIER_ERROR_CONNECT] =
"Connection failure",
};

__ASSERT(PART_OF_ARRAY(strerr[err->type]),
Expand Down
2 changes: 2 additions & 0 deletions samples/cellular/modem_shell/src/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ void lwm2m_handle_error(const lwm2m_carrier_event_t *evt)
"Initialization failure",
[LWM2M_CARRIER_ERROR_RUN] =
"Configuration failure",
[LWM2M_CARRIER_ERROR_CONNECT] =
"Connection failure",
};

mosh_error("%s, reason %d\n", strerr[err->type], err->value);
Expand Down

0 comments on commit eddabba

Please sign in to comment.