-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
applications: serial_lte_modem: Fix socket options. #12527
applications: serial_lte_modem: Fix socket options. #12527
Conversation
Test specificationCI/Jenkins/NRF
CI/Jenkins/integration
Detailed information of selected test modules Note: This message is automatically posted and updated by the CI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Using hard-coded numbers is really fragile. I hope users use the macros. Maybe we should even remove such numbers from the documentation... (Doesn't change the current state of tests though.)
The numbers are how the options are currently selected. To remove them from documentation, would complicate the life of the user quite a bit (user of SLM is not necessary a coder). However, we should consider using the names instead of numbers. |
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. |
Yeah, removing the numbers would force using or needing to look up the macros, which could be annoying if not doing it via (C) code. Using the name would be the one way to make this better. |
97053bb
to
e5e378f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the numbering changed?
This is a breaking API change and should probably be mentioned in migration guide as well.
@SeppoTakalo: Numbering changes were due to ncs_socket.h options making their way to socket.h in Zephyr. With NCS 2.4.2 only TLS_DTLS_HANDSHAKE_TIMEO existed. Should that be mentioned in changelog? |
e5e378f
to
d55f0e2
Compare
@@ -236,6 +236,7 @@ Serial LTE modem | |||
* Modem FOTA to only need a modem reset to apply the firmware update. | |||
The full chip reset (using the ``#XRESET`` AT command) remains supported. | |||
* ``#XGPSDEL`` AT command to disallow deleting local clock (TCXO) frequency offset data because it is an internal value that should not be deleted when simulating a cold start. | |||
* Socket option ``TLS_DTLS_HANDSHAKE_TIMEO`` to a new name value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, the other values were not documented in v2.4.0.
Numbering has changed for: TLS_DTLS_CID, TLS_DTLS_CID_STATUS and TLS_DTLS_HANDSHAKE_TIMEO. SO_BINDTODEVICE has been replaced with SO_BINDTOPDN. Signed-off-by: Markus Lassila <[email protected]>
d55f0e2
to
06234e1
Compare
Numbering has changed for: TLS_DTLS_CID, TLS_DTLS_CID_STATUS and TLS_DTLS_HANDSHAKE_TIMEO.
Edit: If these keep on changing, we should consider string names for options.
Edit edit: SO_BINDTODEVICE has been replaced with SO_BINDTOPDN.