Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: lwm2m: Add support for Connection Manager #65464

Merged
merged 1 commit into from Nov 27, 2023

Conversation

juhaylinen
Copy link
Contributor

Using Connection Manager, it's easy to run lwm2m sample on devices supporting different connectivity technologies (for example, Wi-Fi and LTE).

}
}

static int connect(void)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename the function, not to be confused with POSIX connect().

LOG_INF("Connecting to network");

ret = conn_mgr_if_connect(net_if_get_default());
if (ret) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we deal with an interface, that does not require connectivity? There will be no binding defined, and the function will fail. IMO, if we want to support manual connection in the sample, errors should be silently ignored.

Using Connection Manager, it's easy to run lwm2m sample on
devices supporting different connectivity technologies
(for example, Wi-Fi and LTE).

Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
@juhaylinen
Copy link
Contributor Author

@rlubos I made the requested changes. Please re-check

@fabiobaltieri fabiobaltieri merged commit 637b4b6 into zephyrproject-rtos:main Nov 27, 2023
13 checks passed
@juhaylinen juhaylinen deleted the lwm2m_conn_mngr branch November 27, 2023 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants