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

simulation: lwm2m_client: add OTA #65

Merged
merged 4 commits into from
Aug 4, 2024

Conversation

jonas-rem
Copy link
Member

@jonas-rem jonas-rem commented Aug 3, 2024

Use together with #62 for testing.

Limitation:
flownexus uses a Let's Encrypt Certificate. It does not support the (weak) TLS_RSA_WITH_AES_128_GCM_SHA256 cipher which is used in the Zephyr samples. Enabling Eliptic curve ciphers in Zephyr resulted in a rejection of the flownexus certificate during the download of OTA images. For those reasons testing is currently only possible locally.

Future Fix:
Future versions of flownexus will use self-signed certificates for OTA updates (static webserver) and Lwm2m. The dashboard will continue to use Let's Encrypt Certificates.

*Features:

  • Add support for TLS Encryption (via Let's Enrypt Root CA)
    - Server has to support TLS_RSA_WITH_AES_128_GCM_SHA256
    - Future versions will move to self-signed certificates
  • Add support for WIFI (if client supports)
  • Implement http Download client
  • Move to lwm2m update client functions (instead of registering lwm2m paths)

Some modules have been missing when I tested several things. The easiest
way is to just import all modules. The download time is reasonable, so
there are no major disadvantages.

Signed-off-by: Jonas Remmert <[email protected]>
The download server for OTA updates could be different from the regular
server. The ota update does not send a complete URL, but only a path.
The host of the url is fixed in firmware.

This is a security feature to make sure the clients can never download
firmware from another than the specified server domain.

Signed-off-by: Jonas Remmert <[email protected]>
@jonas-rem jonas-rem force-pushed the WIP/jonas-rem/lwm2m_client_ota branch from 904ee1e to 449ac52 Compare August 3, 2024 07:40
@jonas-rem jonas-rem changed the title simulation: lwm2m_client: revise sample simulation: lwm2m_client: add OTA Aug 3, 2024
- Add support for TLS Encryption (via Let's Enrypt Root CA)
   - Server has to support TLS_RSA_WITH_AES_128_GCM_SHA256
   - Future versions will move to self-signed certificates
- Add support for WIFI (if client supports)
- Implement http Download client
- Move to lwm2m update client functions (instead of registering lwm2m
  paths)

Signed-off-by: Jonas Remmert <[email protected]>
Add TLS support via Kconfig option as a default. TLS is currently only
used for OTA updates, not yet for LwM2M.

Signed-off-by: Jonas Remmert <[email protected]>
Copy link
Collaborator

@Kappuccino111 Kappuccino111 left a comment

Choose a reason for hiding this comment

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

Looks good. Discussed about this in the weekly meeting. 👍

@Kappuccino111 Kappuccino111 merged commit c8c7f2c into main Aug 4, 2024
3 checks passed
@jonas-rem jonas-rem deleted the WIP/jonas-rem/lwm2m_client_ota branch August 4, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants