Skip to content

feat: implement modular configurable RGB LED status indicators#275

Open
Mathew005 wants to merge 1 commit intoruvnet:mainfrom
Mathew005:feature/led-indicators
Open

feat: implement modular configurable RGB LED status indicators#275
Mathew005 wants to merge 1 commit intoruvnet:mainfrom
Mathew005:feature/led-indicators

Conversation

@Mathew005
Copy link

Description

This PR implements a comprehensive, configurable RGB LED status indicator system for the ESP32-S3 CSI Node. It provides real-time visual feedback on system states (Booting, WiFi Connecting, Connected, and Error) while remaining fully customizable via Kconfig and NVS.

Features

  • Modular Driver: Dedicated led_indicator.c driver running as a background FreeRTOS task.
  • State Machine:
    • Solid White: System Booting / NVS Initialization.
    • Fast Blinking Blue: WiFi Searching/Connecting.
    • Slow Pulsing Green: WiFi Connected & CSI Streaming.
    • Solid Red: WiFi Connection Failure / Retries Exhausted.
  • Full Configurability:
    • Compile-time: CONFIG_RGB_LED_ENABLED and CONFIG_RGB_LED_GPIO (defaults to pin 38).
    • Run-time: Dynamic toggling via NVS (status_led flag).
    • Provisioning: Support added to provision.py via the --status-led flag.

Bug Fixes Included

  • Linter Fixes: Resolved Pyre type-checking errors in provision.py for MAC address parsing and NVS binary generation.
  • Live Disconnect Hook: Fixed an edge case where the LED stayed green if the WiFi dropped during operation; it now correctly reverts to searching (blue) or error (red).
  • Initialization Reset: Fixed an issue where disabling the LED via NVS would leave it latched at the last color; the driver now explicitly clears the hardware state before stopping.

Testing

  • Hardware: ESP32-S3 board (COM8).
  • Scenarios Verified:
    • --status-led 1: Flawless state transitions from White -> Blue -> Green.
    • Hotspot Drop: Turning off the hotspot immediately triggered the Blinking Blue retry state and eventually Solid Red.
    • --status-led 0: Verified the LED stays completely dark upon boot and throughout operation.
    • MAC Filtering: Verified provision.py still correctly parses and flashes MAC filter binary blobs.

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.

1 participant