LED lightbar

mavrrick

Well-known member
Jan 11, 2011
834
3
0
Does anyone know where all of the uses of the light bar are documented?

Or at the least what they are.

Posted via the Android Central App
 
The four color lightbar is just something for fun when the device is on and matches the Chomebook. The green lightbar that appears when you move or pick up the device shows the amount of charge left to the nearest 25% increment, IIRC. I don't think it has much use other than that.
 
Don't know about the Pixel C, but they were customisable on the Chromebook. i found something on github when looking around. github.com/Zane-/lightbar_scripts
 
I'm reasonably certain the Konami code Easter egg is (by default) inaccessible on the Pixel C, though I haven't tried it on a USB keyboard yet. (Search YouTube for "chromebook pixel konami" to see examples.)

Are you rooted? The userspace lightbar controls in sysfs are chmod/chown-ed to the system user in the init script. To manipulate the lightbar, you'll need to be in developer mode (fastboot flashing unlock-ed).
Then, write use the following command (at a terminal session on the device, or via adb shell):
Code:
cat "konami" > /sys/class/chromeos/cros_ec/lightbar/sequence

I haven't had the time to test this (or even transitioning to developer mode) yet, but I'm pretty sure it will work.

This commit shows the Android system taking control of the lightbar:
AOSP google/dragon commit: faa113ec07d18e3bfcfd3d222477e2c9e3745824

Interestingly, if we reapplied the following commit, it would turn the lightbar into a notification light. (Users apparently disliked that, so it was removed. Maybe it will come back? In any case, we developers can do it ourselves.)
AOSP google/dragon commit: da591a726a2ec873f213a527d81af2cb46d0e5f4
This notification thing uses the really, really cool lightbar program functionality that lets arbitrary sequences be loaded from userspace. More docs on that here (and by docs, I mean comments in the source code of the lightbyte program interpreter): Chromium project, chromiumos/platform/ec master branch, common/lightbar.c, and include/lightbar_opcode_list.h. You might also want to play with the programs in extra/lightbar/programs.

Also, if you hadn't already guessed (based on the Kernel info in Settings) the Pixel C uses a Chromebook-based firmware and kernel. It is, in this sense, the most open-source Android or Nexus device released in recent years, and possibly all time.

NOTE: The lack of links is because of fourm auto-rules. I'd appreciate it if someone posted the links to the android/chromium(dot)googlesource(dot)com repositories and commits mentioned.
 
Last edited:

Latest posts

Trending Posts

Members online

Forum statistics

Threads
956,352
Messages
6,967,727
Members
3,163,517
Latest member
Bowers01