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

application: serial_lte_modem: Allow auto-connect for NIDD #10840

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

junqingzou
Copy link
Contributor

@junqingzou junqingzou commented Apr 14, 2023

For the use case of FOTA over NIDD with lwm2m_carrier,
.Enable auto-connect NIDD after FOTA image is applied.
.Enable auto-connect NIDD on all kinds of reset.
.Add AT#XCARRIER="auto-connect","read|write"[,<auto-connect-flag>] to control YES/NO of auto-connect.

Dependence: libmodem v2.4.2

UPDATE: the solution has been expanded to support both U-bind and N-bind for LwM2M_Carrier.

@junqingzou junqingzou added the DNM label Apr 14, 2023
@github-actions github-actions bot added changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. doc-required PR must not be merged without tech writer approval. labels Apr 14, 2023
@junqingzou
Copy link
Contributor Author

This PR is created for the required behavior in verifying FOTA over LwM2M with NIDD binding in SoftBank network.
DNM for work in progress.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Apr 14, 2023

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
test-fw-nrfconnect-nrf-iot_serial_lte_modem X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

@junqingzou junqingzou requested a review from mgolu April 14, 2023 08:46
@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

@junqingzou
Copy link
Contributor Author

Hi @mgolu, is auto-connect to NIDD network acceptable to your customers?
We need it to complete FOTA over NIDD sequence in time.

@mgolu
Copy link
Contributor

mgolu commented Apr 18, 2023

Hi @mgolu, is auto-connect to NIDD network acceptable to your customers? We need it to complete FOTA over NIDD sequence in time.

Overall this will work, since the auto-connect to NIDD is configurable via the new XCARRIER command.

@junqingzou
Copy link
Contributor Author

Hi @mgolu, is auto-connect to NIDD network acceptable to your customers? We need it to complete FOTA over NIDD sequence in time.

Overall this will work, since the auto-connect to NIDD is configurable via the new XCARRIER command.

The point is by default auto-connect is eanbled in the setting page, which is behavior change of SLM with NIDD.

@wiba-nordic
Copy link
Contributor

This seems like something that deserves a changelog entry, so remember to add one after this is no longer work in progress.

@VTPeltoketo
Copy link
Contributor

acronym NIDD, which words it comes from?

@junqingzou
Copy link
Contributor Author

acronym NIDD, which words it comes from?

Non-IP Data Delivery (3GPP R13~)

Copy link
Contributor

@wiba-nordic wiba-nordic left a comment

Choose a reason for hiding this comment

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

I believe this needs a changelog entry for the added AT command.

applications/serial_lte_modem/doc/CARRIER_AT_commands.rst Outdated Show resolved Hide resolved
applications/serial_lte_modem/src/main.c Outdated Show resolved Hide resolved
applications/serial_lte_modem/src/main.c Outdated Show resolved Hide resolved
applications/serial_lte_modem/src/main.c Outdated Show resolved Hide resolved
@junqingzou junqingzou changed the title application: serial_lte_modem: Allow reboot and re-connect for NIDD application: serial_lte_modem: Allow auto-connect for NIDD Jul 11, 2023
@github-actions github-actions bot removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jul 18, 2023
@kacperradoszewski
Copy link
Contributor

How about extending this functionality to IP context as well? I don't see why this should be restricted to NIDD only, because the binding does not really affect the FOTA sequence and it would be quite convenient to reconnect automatically over UDP as well.

Ther reason that we don't want to support IP network is due to: (1) PDP Context activation normals needs network-specific configuration and use authentication (2) Don't want to change behavior when SLM is built withour LwM2M_Carrier

If there is need to configure the PDP context, the user can always disable auto-connect and use AT commands to do so as they would do until now. I don't see why SLM would have specific handling for Non-IP binding, which in the LwM2M Carrier library's case is definitely the less common choice. If it's more convenient to set up the context in the code for NIDD, I would simply restrict that section of code to be conditional on CONFIG_LWM2M_CARRIER_SERVER_BINDING_N, but I do find it slightly odd for the SLM to have what seems like application-specific implementation. Setting the functional mode of the modem to 1 (CFUN=1) can apply regardless of the binding, and that can be made dependent on CONFIG_SLM_CARRIER, so this wouldn't affect the behaviour when SLM is built without carrierlib.

@junqingzou
Copy link
Contributor Author

junqingzou commented Jul 19, 2023

How about extending this functionality to IP context as well? I don't see why this should be restricted to NIDD only, because the binding does not really affect the FOTA sequence and it would be quite convenient to reconnect automatically over UDP as well.

Ther reason that we don't want to support IP network is due to: (1) PDP Context activation normals needs network-specific configuration and use authentication (2) Don't want to change behavior when SLM is built withour LwM2M_Carrier

If there is need to configure the PDP context, the user can always disable auto-connect and use AT commands to do so as they would do until now. I don't see why SLM would have specific handling for Non-IP binding, which in the LwM2M Carrier library's case is definitely the less common choice. If it's more convenient to set up the context in the code for NIDD, I would simply restrict that section of code to be conditional on CONFIG_LWM2M_CARRIER_SERVER_BINDING_N, but I do find it slightly odd for the SLM to have what seems like application-specific implementation. Setting the functional mode of the modem to 1 (CFUN=1) can apply regardless of the binding, and that can be made dependent on CONFIG_SLM_CARRIER, so this wouldn't affect the behaviour when SLM is built without carrierlib.

I get your point. Something special with LwM2M_Carrier integration is that you enabled the PDN library in the overlay. This means that customer can add extra CONFIG defined by the library to configure LTE connection, upon libmodem is initialized by SLM main(). Then I'll use CONFIG_SLM_CARRIER to enclose the auto connection logic, which will contain CFUN=1 only.

New solution tested good with Leshan (U-binding) and SoftBank IoTPF (N-binding) with two different overlays.

Copy link
Contributor

@kacperradoszewski kacperradoszewski left a comment

Choose a reason for hiding this comment

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

Nice and useful improvement, thanks 👍

@junqingzou junqingzou removed the request for review from melwee01 July 20, 2023 00:18
@junqingzou junqingzou force-pushed the pr_lwm2m_nidd branch 2 times, most recently from d7e4cf2 to 1276b9b Compare July 26, 2023 04:55
}

LOG_INF("auto connect");
#if defined(CONFIG_LWM2M_CARRIER_SERVER_BINDING_N)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the SYSTEMMODE setting has to be under CONFIG_LWM2M_CARRIER_SERVER_BINDING_N?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why the SYSTEMMODE setting has to be under CONFIG_LWM2M_CARRIER_SERVER_BINDING_N?

Because modem only support NB-IoT for NIDD connection.

@junqingzou junqingzou added the DNM label Aug 1, 2023
For the use case of FOTA with lwm2m_carrier,
.Enable auto-connect after FOTA image is applied.
.Enable auto-connect on all kinds of reset.
.Add AT#XCARRIER="auto-connect","read|write"[,<auto-connect-flag>]
 to control YES/NO of auto-connect.

Dependence: libmodem v2.4.2

Signed-off-by: Jun Qing Zou <jun.qing.zou@nordicsemi.no>
@nordicjm nordicjm merged commit ccf158e into nrfconnect:main Aug 14, 2023
12 checks passed
@junqingzou junqingzou deleted the pr_lwm2m_nidd branch August 15, 2023 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants