RGB LED Problem

Hello,

I have an application that controls the RGB LED on the Balena Fin. Something seems to have happened on one gateway that broke the LED though. On this one gateway, the RGB LED is on at its full brightness in a white color, and our software commands can’t change it.

If I cd /sys/class/leds and run “ls”, I see:

  • led0
  • pca963x:blue
  • pca963x:green
  • pca963x:red
  • pca963x:unused

Our application controls the RGB color and brightness using commands such as:
echo 0 > /sys/class/leds/pca963x:red/brightness
echo 20 > /sys/class/leds/pca963x:blue/brightness
etc

These commands change the color and brightness of the LED based on various operational states. This code works fine for all of our gateways, except one.

On the gateway with the “bad LED”, I have queried the brightness of the red, blue, and green LEDs (i.e. “cat /sys/class/leds/pca963x:blue/brightness”), and the brightness values are being set correctly (to 0 or 20 typically), but the LED continues to be a very bright white.

For example, when our gateway scans for BLE devices, it sets the LED to blue with a brightness of 20. The red and green colors are set to 0. If I run “cat /sys/class/leds/pca963x:{color}/brightness” (for each color), the commands return brightness values of:

  • blue: 20
  • green: 0
  • red: 0

These are the expected values in this state, but the RGB LED stays white and is very bright.

When the BLE scan completes, the LED should turn green with a brightness of 20. If I run “cat /sys/class/leds/pca963x:{color}/brightness” (for each color), the commands return brightness values of:

  • blue: 0
  • green: 20
  • red: 0

Again, these are the expected values, but the RGB LED still stays white and is very bright.

We have several gateways running this firmware and the RGB LED displays the correct color and brightness for all of them except for one bad gateway where the LED is constantly a very bright white. Changing the brightness seems to have no impact.

Could this be a hardware issue? Is there anything else I can look at to troubleshoot this?

My gateway is running OS version 2.48.0+rev1, supervisor version 10.8.0.

Thanks for your help!

UPDATE: I just noticed if I set all the LED brightness values to 255 on the “bad” gateway, then the LED turns off!

So, somehow, the brightness values on this gateway have been inverted. 255=off, 0=full brightness. For all of our other gateways, 255=full brightness, 0=off.

If I cat /sys/class/leds/{led}/max_brightness, max_brightness returns 255.

Any idea what I can do to fix this so 0=off and 255=full brightness?

Hi there,

Thank you for all the information, I’ve raised this with the Fin team and we will get back to you as soon as possible.

Hello, it looks like the PCA9633 might be in a weird state; do you have access to the device, if that is the case have you already tried power-cycling the board?

I do have access to the board and we have power cycled it multiple times over the past couple of days, and that has not fixed the problem.

However, I just noticed now that the LED is functioning correctly again (as of this morning). I’m not sure what happened, but I guess we can close this issue.

Hi @dstewart. I close this issue for now but please let us know if you encounter any further problems and we’ll be happy to assist.