We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Controlling the Omega 2 Pro board's full color notification LED [RESOLVED]



  • I have my omega 2 pro (from CrowdSupply). It seems to be working fine, and most of the documenation for the Omega 2 seems to be applicable. However, it's really irritating that there is a super-bright full color ID that is bright blue and blinding to look at, with no way to turn it off that I can find.

    I assume it is somehow connected to the ledchain2 device. I can control the other two LED's amber and blue in the obvious way under /sys/class/leds.

    But I've fiddled with the onion and omega2-ctrl commands with no luck. I can disable PWM2 (which seems to exist and corresponds to the "2" in /dev/ledchain2.) The p44-ledchain module is loaded in /etc/modules (and visible in lsmod). I tried to write multiple 0's to /dev/ledchain2 to set the color to no effect.
    How do I turn it off and set colors?
    If nothing else, it's wasting a lot of power when I'm running the Omega2 Pro off a LiPo battery...



  • @David-Reed This is stated in the getting started documentation.
    To enable control of the led, first you run
    "omega2-ctrl gpiomux set uart2 pwm23"
    After that you can either run
    "/usr/bin/expled 000000" or
    "echo -en '\x00\x00\x00' > /dev/ledchain2"
    to turn off the led.

    Edit:expled doesn't work on Omega 2 pro.



  • @Nils-Abrahamsson Well, now something changes. But the behavior is still wrong, I think. Or I don't understand.
    I power off and on, then do what you suggest, and the LED does not go off. It turns to a brignt green instead. If I play around with the bytes echoed to /dev/ledchain2 the color remains very bright, but different combinations of digits make it bright blue, green, etc. I can't make it red, for example. And I cannot make it dimmer at all.

    Perhaps I have a broken board? Or the Pro board is a little different in what you need to write to the ledchain2 port?



  • @David-Reed Did you get the "set gpiomux uart2 -> pwm23" message after running the first command?
    I´m using the Omega2 pro board as well and haven´t done anything special for it to work.
    "echo -en '\xff\x00\x00' > /dev/ledchain2" would be the brightest red
    "echo -en '\x01\x00\x00' > /dev/ledchain2" is the dimmest red
    Each \x denotes a hexadecimal number between 0-FF for the colors red, green, and blue.



  • Indeed. I just repeated this. I powered on the board, it cycled the that LED from red initially to a series of different colors, settling finally on a bright bluish green.

    Then these commands (literally copied from terminal):

    root@Omega-BBB7:~# omega2-ctrl gpiomux set uart2 pwm23
    set gpiomux uart2 -> pwm23
    root@Omega-BBB7:~# echo -en "\0x00\0x00\0x00" > /dev/ledchain2 
    root@Omega-BBB7:~# 
    

    And the LED turned brighter and just blue.

    Now it may be that since I have fully upgraded all the software that something broke, or maybe there's some other interaction.
    Just FYI, here's what the gpiomux state is:

    root@Omega-BBB7:~# omega2-ctrl gpiomux get
    Group i2c - [i2c] gpio 
    Group uart0 - [uart] gpio 
    Group uart1 - [uart] gpio pwm01 
    Group uart2 - uart gpio [pwm23] 
    Group pwm0 - pwm [gpio] 
    Group pwm1 - pwm [gpio] 
    Group refclk - refclk [gpio] 
    Group spi_s - spi_s [gpio] pwm01_uart2 
    Group spi_cs1 - [spi_cs1] gpio refclk 
    Group i2s - i2s [gpio] pcm 
    Group ephy - ephy [gpio] 
    Group wled - wled [gpio] 
    root@Omega-BBB7:~#
    

    I think I will try going back to factory defaults next.


  • administrators

    @David-Reed the gpiomux config looks correct, please try a factory restore, try again, and let us know how it goes.



  • @Lazar-Demin OK, factory restore made no difference in the behavior at all.

    But after following the instructions as I did above, I started to wonder why I was being told to use the "echo -e" option, and wondered whether echo was doing something different than I was used to.

    So, here's how I wrote 3 zero bytes to /dev/ledchain2:

    root@Omega-BBB7:~# dd if=/dev/zero of=/dev/ledchain2 count=3                                                                
    3+0 records in                                                                                                              
    3+0 records out                                                                                                             
    root@Omega-BBB7:~#
    

    This WORKED! That is, it turned off the LED completely.
    So, something about the suggested echo -en "\0x00\0x00\0x00" > /dev/ledchain2
    is not working. Well, that tells me that the hardware is fine.



  • This was user error, actually. I have been echoing '\0x00\0x00\0x00'. Note that the x's should not be preceded by a 0 digit. Doh! So echo works fine, too. I will check how I got that line wrong.
    Thanks, and sorry I'm wasting your time.
    The omega2 pro is great!


  • administrators

    @David-Reed Glad to hear that it was a simple thing!
    Can you please add Resolved to the topic title?



  • Title change done.



Looks like your connection to Community was lost, please wait while we try to reconnect.