Guidance Needed for Setting Up a Custom IoT Solution Using Legato Framework

Hello everyone,

I’m currently working on a project to develop a custom IoT solution using the Legato Framework, and I’d appreciate some guidance from the community. Here’s a brief overview of my setup and the challenges I’m facing:

Project Overview

  • Objective: Build an energy monitoring system that collects data from sensors, processes it locally, and sends it to a cloud server for analysis.
  • Hardware: WP7702 module integrated into a custom PCB.
  • Software: Legato framework on Linux (Ubuntu 20.04 for development).

What I’ve Done So Far

  1. Installed the Legato development environment and successfully compiled the “helloWorld” app to verify the setup.
  2. Configured GPIOs and UART to interact with sensors.
  3. Implemented a basic app to read sensor data and log it to the system.

Challenges

  1. Cloud Communication: I’m exploring options to send data to a cloud server. Should I use MQTT, HTTPS, or another protocol? Which approach works best with Legato?
  2. Error Handling: What’s the best way to implement error handling in Legato apps, especially for unreliable sensor data or intermittent network connectivity?
  3. Modem Configuration: Configuring the modem to ensure stable LTE-M connectivity has been tricky. Are there any tools or commands within Legato that can help debug or optimize this?

Looking for Advice

I’d love to hear your recommendations, especially if you’ve worked on similar projects. Are there any tutorials, documentation, or examples you’d recommend?

I also checked this: https://forum.legato.io/t/how-to-setup-a-legato-application-project-that-can-be-built-for-different-hardware-setups/looker
Thanks in advance for your help! I’m excited to learn from your expertise and contribute back as I make progress.

It depends what your server supports.
You can try with HTTPS with curl command first.

you can see NetRegStateHandler() and ConnectionStateHandler() for handling network connectivity: