How quecpython/solution-tracker works
Project Type and Purpose
• This is an IoT-tracker solution built on a QuecPython-powered EC200U development board.
• It targets embedded device applications that collect GNSS and sensor data, send alarms/events over LTE, and integrate with cloud IoT platforms and user-facing dashboards (web/mobile).
File Structure Analysis
• Top-level:
– QPY_OCPU_BETA0001_EC200U_EUAA_FW/ : QuecPython firmware binaries & docs
– code/ : application code deployed to the device
– docs/ : documentation and process images
– object_model_demo/ : example cloud object model JSON
• code/ substructure:
– _main.py : entry-point, orchestrates modules
– modules/ : hardware and protocol abstractions (GNSS, buzzer, LED, MQTT clients for Alibaba IoT, ThingsBoard, serial, power/temperature sensors, logging, net_manage)
– settings*.py : configuration layers (loc, server, user)
– tracker_ali.py, tracker_tb.py : high-level flows for each cloud integration
README Insights
• Describes end-to-end tracker solution: device → LTE network → cloud IoT platforms → visual operation platform & mobile app.
• References two major integrations: Alibaba IoT Platform and ThingsBoard (open-source)
a. Main Components
1) Embedded Device Layer
– QuecPython runtime on EC200U board
– Sensors & peripherals: GNSS module, buzzer, LEDs, temp/humidity, audio mic/speaker
– Application modules: net_manage, location, alarms, power_manage, logging, etc.
2) Connectivity Layer
– LTE modem and cellular network
3) Cloud IoT Platforms
– Alibaba Cloud IoT (MQTT, JSON object model)
– ThingsBoard (MQTT/HTTP)
– Private/custom server (if configured)
4) User Applications
– Visual operation web dashboard
– Mobile APP for tracking and control
5) Development & Tools
– QPYcom debug/tool chain
– Firmware flashing process
– Object model definition (ali_cloud_object_model.json)
b. Component Relationships & Data Flows
• Device sensors → QuecPython modules → _main.py
• net_manage handles cellular registration and MQTT connectivity
• tracker_ali.py/tracker_tb.py serialize sensor data into cloud-specific formats
• Over LTE → Cloud IoT (MQTT broker) → downstream services (dashboards, alerts)
• Mobile/Web client ↔ Cloud REST/WebSocket APIs for real-time tracking
c. Architectural Patterns & Principles
• Modular driver abstraction (each peripheral or service is a separate Python module)
• Configuration layering (global vs. location vs. user vs. server settings)
• Publish/subscribe model for data reporting (MQTT)
• Single‐source entry point (_main.py) orchestrates high-level flows via plugin modules
d. Key Technologies & Frameworks
• QuecPython (Python subset for embedded)
• MQTT protocol for IoT messaging
• Alibaba Cloud IoT SDK (aliIot.py)
• ThingsBoard client (thingsboard.py)
• GNSS positioning libraries (location.py)
• QPYcom flashing/debug tool