LED light? - E 2015 Q&A, Help & Troubleshooting

wondering if the new moto e has a led notification that moto disabled? i know the previous moto e and g had one. any thoughts as i see some type of sensor or led by the vga front cam.

fix-this! said:
wondering if the new moto e has a led notification that moto disabled? i know the previous moto e and g had one. any thoughts as i see some type of sensor or led by the vga front cam.
Click to expand...
Click to collapse
Sorry, but there is no led notification in new moto e. it has active display. when you up the device the screen will lit up it self and show if you have any notification or not. Now I am quite frustrated for this reason.:crying::crying::crying::crying::crying:

fix-this! said:
wondering if the new moto e has a led notification that moto disabled? i know the previous moto e and g had one. any thoughts as i see some type of sensor or led by the vga front cam.
Click to expand...
Click to collapse
hey I found let notification light just right sight of the speaker grill. it is white. i connect my device with my laptop while it was completely out of power. and boom the led light showed up. but i don't know how to use it.

CeruleanLineage said:
hey I found let notification light just right sight of the speaker grill. it is white. i connect my device with my laptop while it was completely out of power. and boom the led light showed up. but i don't know how to use it.
Click to expand...
Click to collapse
That's the battery LED, used only when the battery goes low. As far as I know, the Moto E 2nd gen unfortunately doesn't have a software-accessible notification LED.

With a custom rom you can access it, im using cm12.1 and i have text notifications blink it

I made a custom binary for the leds so in CM12.1 and AOSP when you plug the USB you have the notifcations..
For so unknown reasons, when you unplug it, the "led driver" is told that there are no more notifications to show.
I'll be investigating on this when I have more time. If I find who and why I am told to stop notifications in the project, I'll be able to make it work with cable unplugged to.

For missed calls and sms will be modding?

scritch007 said:
I made a custom binary for the leds so in CM12.1 and AOSP when you plug the USB you have the notifcations..
For so unknown reasons, when you unplug it, the "led driver" is told that there are no more notifications to show.
I'll be investigating on this when I have more time. If I find who and why I am told to stop notifications in the project, I'll be able to make it work with cable unplugged to.
Click to expand...
Click to collapse
Hey, let me know if there's anything I can do to help, I've been looking at the led code and comparing to see where the difference is. I don't have a ton of time to mess with it, but look at drivers/leds/leds-qpnp.c around line 3115, comparing to nexus4 sources
MOTO E:
Code:
led->default_on = false;
rc = of_property_read_string(node, "qcom,default-state",
&temp_string);
if (!rc) {
if (strncmp(temp_string, "on", sizeof("on")) == 0)
led->default_on = true;
} else if (rc != -EINVAL)
return rc;
NEXUS 4:
Code:
led->default_on = true;
rc = of_property_read_string(node, "qcom,default-state",
&temp_string);
if (!rc) {
if (!strncmp(temp_string, "off", sizeof("off")))
led->default_on = false;
} else if (rc != -EINVAL)
return rc;
Like I said, I haven't had time to test, the logic is clearly inverted in the moto e driver but there's got to be something tied to the charger state too.

ronasimi said:
Hey, let me know if there's anything I can do to help, I've been looking at the led code and comparing to see where the difference is. I don't have a ton of time to mess with it, but look at drivers/leds/leds-qpnp.c around line 3115, comparing to nexus4 sources
MOTO E:
Code:
led->default_on = false;
rc = of_property_read_string(node, "qcom,default-state",
&temp_string);
if (!rc) {
if (strncmp(temp_string, "on", sizeof("on")) == 0)
led->default_on = true;
} else if (rc != -EINVAL)
return rc;
NEXUS 4:
Code:
led->default_on = true;
rc = of_property_read_string(node, "qcom,default-state",
&temp_string);
if (!rc) {
if (!strncmp(temp_string, "off", sizeof("off")))
led->default_on = false;
} else if (rc != -EINVAL)
return rc;
Like I said, I haven't had time to test, the logic is clearly inverted in the moto e driver but there's got to be something tied to the charger state too.
Click to expand...
Click to collapse
I might be wrong but led driver is working fine. If you go by hand and set manually the values in the /sys/classes ... you'll get a blinking led. There real issue is why does the NotificationManager doesn't ask for a blinking led, unless the power cable is plugged in.
If you use my binary you'll see that I added some logs for the lights requested. And NotificationManager explicitly ask to stop blinking when unplugging the USB cable.

its posible to use cyanogen kernel with stock rom so we can use notification led??? because en cyanogen and pacman the led its full working but i prefer stock rom

Related

Turning the screen off (not backlight)

Is there a way to turn off, not the backlight, not the pda, but just the screen?
All I know is, I have Linux on my ipaqs, and you can turn off just the screen (the backlight will be off too of course), to save battery power. I usually do this when I'm listening to mp3 with it.
I imagine the hardware itself is capable to do this, but pocketpc by default does not have such an option. Now I'm wondering if pocketpc has exposed any APIs to do this.
Thanks.
I just know PocketDiVX in the new ROM can map a button to do this. No idea how to do it from code though...
this works on my xda with media player
http://homepage.ntlworld.com/gazzaman2k//a/Software/Display off.zip
Apart from setting the power pref's in system/settings, no such luck ... I've searched the XDA for a program that does this with no luck.
Has anyone found a ROM link ?
I like and use Pocket Toolman
http://members.shaw.ca/pockettoolman/
HTH
here's one that's hopefully the answer to your request. the file is called sleepscreen and it does exactly what you mentioned; turns off the screen while applications are running. i've installed it in my "start" menu so that anytime i want to switch off the screen i can do so.
when you click on the icon on your start menu; the screen goes blank and if you'll notice the LED of the xda is blinking...meaning apps are running while the screen is off. all you have to do to activate the screen is press any button (e.g. the contacts or calendar button)...but DON'T hit the power button because that switches off all the apps running.
how do i attach the file in this forum? it's only 24kb zipped. or give me your email address and i'll mail it to you.
hope that helps mate!
Code:
// offDisplay.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include <stdlib.h>
#include <nled.h>
// LED support
extern "C" BOOL NLedGetDeviceInfo(INT nID, PVOID pOutput);
extern "C" BOOL NLedSetDevice(INT nID, PVOID pOutput);
// GDI Escapes for ExtEscape()
#define QUERYESCSUPPORT 8
// The following are unique to CE
#define GETVFRAMEPHYSICAL 6144
#define GETVFRAMELEN 6145
#define DBGDRIVERSTAT 6146
#define SETPOWERMANAGEMENT 6147
#define GETPOWERMANAGEMENT 6148
typedef enum _VIDEO_POWER_STATE {
VideoPowerOn = 1,
VideoPowerStandBy,
VideoPowerSuspend,
VideoPowerOff
} VIDEO_POWER_STATE, *PVIDEO_POWER_STATE;
typedef struct _VIDEO_POWER_MANAGEMENT {
ULONG Length;
ULONG DPMSVersion;
ULONG PowerState;
} VIDEO_POWER_MANAGEMENT, *PVIDEO_POWER_MANAGEMENT;
// LED handling functions
int GetLedCount()
{
NLED_COUNT_INFO nci;
int wCount = 0;
if(NLedGetDeviceInfo(NLED_COUNT_INFO_ID, (PVOID) &nci))
wCount = (int) nci.cLeds;
return wCount;
}
void SetLedStatus(int wLed, int wStatus)
{
NLED_SETTINGS_INFO nsi;
nsi.LedNum = (INT) wLed;
nsi.OffOnBlink = (INT) wStatus;
NLedSetDevice(NLED_SETTINGS_INFO_ID, &nsi);
}
int WINAPI WinMain ( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPWSTR pszCommandLine, int nCommandShow)
{
HDC gdc;
int iESC=SETPOWERMANAGEMENT;
gdc = ::GetDC(NULL);
if (ExtEscape(gdc, QUERYESCSUPPORT, sizeof(int), (LPCSTR)&iESC, 0, NULL)==0)
MessageBox(NULL, L"Sorry, your Pocket PC does not support toggleDisplay",
L"Pocket PC toggleDisplay",
MB_OK);
else
{
VIDEO_POWER_MANAGEMENT vpm;
ExtEscape(gdc, GETPOWERMANAGEMENT, 0, 0, sizeof(vpm), (char *) &vpm);
if (vpm.PowerState == VideoPowerOff) {
vpm.Length = sizeof(VIDEO_POWER_MANAGEMENT);
vpm.DPMSVersion = 0x0001;
vpm.PowerState = VideoPowerOn;
ExtEscape(gdc, SETPOWERMANAGEMENT, vpm.Length, (LPCSTR) &vpm, 0, NULL);
if (GetLedCount()) {
SetLedStatus(0, 0);
}
} else {
vpm.Length = sizeof(VIDEO_POWER_MANAGEMENT);
vpm.DPMSVersion = 0x0001;
vpm.PowerState = VideoPowerOff;
ExtEscape(gdc, SETPOWERMANAGEMENT, vpm.Length, (LPCSTR) &vpm, 0, NULL);
if (GetLedCount()) {
SetLedStatus(0, 1);
}
}
::ReleaseDC(NULL, gdc);
}
return 0;
}
uff, binaries for arm, probably compiled with debug on
but who cares with such a BIG file
http://pgate.host.sk/toggleDisplay.exe [4kB]
pigeon said:
Is there a way to turn off, not the backlight, not the pda, but just the screen?
I came across some silly software named PocketLight or PocketTorch or so, just can't find it right now. It turns off the screen but the backlight stays on. This way you can use your PDA as a light source in case you lost something in the dark ....
Is that what you're looking for?
Martin
Click to expand...
Click to collapse
Click to expand...
Click to collapse
i have a free program for this but i dont know how to upload it
http://www.mywirelessoffice.com/xda/screenoff.zip
Thanks emilk
Adrian
emilk said:
uff, binaries for arm, probably compiled with debug on
but who cares with such a BIG file
http://pgate.host.sk/toggleDisplay.exe [4kB]
Click to expand...
Click to collapse
Cant link to that exe file, I get a "not authorised", error message.
I know, my webhosting is not perfect
SOLUTION: when I use rightclick and choose 'save target as..'
it goes through
if you are unsuccesful with linking, that was probably intention
of my provider
Just press and hold the power button, this allows Windows Media Player to still play my mp3's but turns off my screen to reserve power.
Simply as that.
Mike
MIke Gascoigne said:
Just press and hold the power button, this allows Windows Media Player to still play my mp3's but turns off my screen to reserve power.
Simply as that.
Mike
Click to expand...
Click to collapse
If I press and hold the power button, it turns off only the backlight, not the screen.
Sorry, just press the power button, this turns the screen off, DONT HOLD IT as I told you to do before.
Just press it!
Mike
That suspends the device. It doesn't just turn off the screen.
If I have Media Player turned on and I just tap the power it turns off the whole device (MP3 player too)

Controlling LED's with tasker

I take no credit for this, but just got it working with the evo 3d, this is mearly copied work of sw99's from the og evo forum found here
I cannot find screen brightness controls but everything else seems to work with a tiny change from the og evo to the e3d.
Also found that you can turn both the green and red led on at the same time and get orange.
You just need to download the Locale Execute Plug-in and obviously have Tasker
In tasker set up a new action and choose plugin then the execute plugin and click edit
replace X with option you want
For amber led on/off,
@! echo X > sys/devices/platform/leds-pm8058/leds/amber/brightness
0 = OFF
1 = ON
For amber led blink,
@! echo X > sys/devices/platform/leds-pm8058/leds/amber/blink
0 = Solid
1 = Blink
For green led on/off,
@! echo X > sys/devices/platform/leds-pm8058/leds/green/brightness
0 = OFF
1 = ON
For green led blink,
@! echo X > sys/devices/platform/leds-pm8058/leds/green/blink
0 = Solid
1 = Blink
For capacitive leds,
@! echo X > sys/devices/platform/leds-pm8058/leds/button-backlight/brightness
0 = OFF
1 = ON
For Flash leds,
@! echo X > sys/devices/platform/flashlight.0/leds/flashlight/brightness
0 = OFF
125 = Low power
127 = High Power
129 = High Power Single Flash
You must "Test" the task several times and wait for the Superuser permissions to trigger, otherwise the task will not execute. You will need to do this for each task you create using this plugin.
Pretty cool stuff here man. Thanks for a info. Now I have to find a way to implement this. Maybe I can find a way for the LED to blink when I am in a 4G zone. That would be amazing in itself.
Very nice, kudos
akiradavis said:
Pretty cool stuff here man. Thanks for a info. Now I have to find a way to implement this. Maybe I can find a way for the LED to blink when I am in a 4G zone. That would be amazing in itself.
Click to expand...
Click to collapse
If you ever find that out let me know. That would make my life.
Nice
Works cool
Sent from my PG86100 using XDA Premium App
Great stuff, wish I weren't colorblind.
A.Priori said:
Great stuff, wish I weren't colorblind.
Click to expand...
Click to collapse
That blows!
Sent from my PG86100 using XDA Premium App
Thanks for the kudos. I was kind of waiting for full root before I messed with this.
I also kind of miss the extra led on the OG EVO. The charge led is being used by the system, and as such, if a system event occurs it will override your settings.
sw99 said:
Thanks for the kudos. I was kind of waiting for full root before I messed with this.
I also kind of miss the extra led on the OG EVO. The charge led is being used by the system, and as such, if a system event occurs it will override your settings.
Click to expand...
Click to collapse
welcome! and yeah sucks we only have the one led this go around
lame, moved to general. was in development with the og evo. oh well, hope i helped someone
DomSim said:
lame, moved to general. was in development with the og evo. oh well, hope i helped someone
Click to expand...
Click to collapse
This was incredibly helpful. I use my phone at night and the capacitive LEDs at the bottom were blinding me. I've now got tasker profile to automatically turn them off when the display comes on.
Has anyone had any problems running these commands with the latest version of Android?
WillJitsu said:
Has anyone had any problems running these commands with the latest version of Android?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1198622
And
http://forum.xda-developers.com/showthread.php?t=1176607
I use the script from the second link on my 2,3,4 ROM
phatmanxxl said:
http://forum.xda-developers.com/showthread.php?t=1198622
Click to expand...
Click to collapse
That's not really what I was asking. I think my problem is due to the latest version of Superuser that was included in the ROM I downloaded.
I don't know why your having issues with super user, I use root explorer to place the script in system/bin then activate it in the terminal.
I haven't tried it using tasker
phatmanxxl said:
I don't know why your having issues with super user, I use root explorer to place the script in system/bin then activate it in the terminal.
I haven't tried it using tasker
Click to expand...
Click to collapse
I was just able to fix it by downgrading to Superuser 2.3.6.3. Thanks.
great tip - thank you very much!

[Q] Controlling led indicator.

Hi.
I'm currently looking for a way of how to control the led indicator in a rooted S3. The task that I have given my self was to create application that does the above but without changing/altering kernel. If you have any information about the led indicator, could you share it with me ?
Thanks in advance.
Lazy~
LazyThinker said:
Hi.
I'm currently looking for a way of how to control the led indicator in a rooted S3. The task that I have given my self was to create application that does the above but without changing/altering kernel. If you have any information about the led indicator, could you share it with me ?
Thanks in advance.
Lazy~
Click to expand...
Click to collapse
Lightflow should work in any ROM!
venki5star said:
Lightflow should work in any ROM!
Click to expand...
Click to collapse
Thanks for your quick answer. But I have mentioned that I want to create my own application. I was unable to find source for LightFlow or any similar application.
LazyThinker said:
Hi.
I'm currently looking for a way of how to control the led indicator in a rooted S3. The task that I have given my self was to create application that does the above but without changing/altering kernel.
Click to expand...
Click to collapse
That would be very very nice :good::good::good:
I´m looking forward to this
Light flow is only for certain instances.
I'd like a way to have a colour for everything.
Green for what's app
Purple for viber
Blue for messages
White for calls
Etc
Is that even possible? Or does it only light in 3 colours?
irish-sid said:
Light flow is only for certain instances.
I'd like a way to have a colour for everything.
Green for what's app
Purple for viber
Blue for messages
White for calls
Etc
Is that even possible? Or does it only light in 3 colours?
Click to expand...
Click to collapse
You all propably know this already:
Code:
NotificationManager notifMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Notification notify = new Notification();
notify.flags |= Notification.FLAG_SHOW_LIGHTS;
notify.ledARGB = Color.argb(255, 255, 255, 255);
notify.ledOnMS = 200;
notify.ledOffMS = 300;
notifMgr.notify(1337, notify);
The problem with this is that it works only when screen is dimmed (the WakeLock is lost).

[Xposed] [Testers needed] Trying to solve Light sensor bug

Hi, may be some of you have experienced the bug when an auto-brightness is on and you're in the dark place or light sensor is covered by your hand or cardboard and you're trying to watch 360 video on youtube or other required gyroscope thing and there are lags. Watch them on video - https://www.youtube.com/watch?v=XYudbTzIdHU
May be it's already been discussed but I haven't found the solution except turning auto-brightness off which isn't like a perfect solution to me
On 4pda user GODKIMOVSK have shared some info regarding this problem. Here few things you should know:
1. There are two different kind of light sensor installed on our devices:
a) Liteon LTR55X ALSPRX
b) Sensortek stk3x1x alsprx
A lot of users with gyro bug have Liteon sensor but there are people with second one as well.
To check what sensor is installed on your device use Sensor Box application.
2) The limits of light sensor usually are 0 - 10000 lux and gyro lags exist only when the data from the sensor is less than 10 lux.
So, the solution is quite simple seems to me. When the sensor read value that is less than 10 lux it becomes 10 lux on the out of the sensor.
I found a xposed module http://repo.xposed.info/module/com.mrchandler.disableprox - which able to mock all sensor 's values on your device. But I haven't tried it yet cause my boot is still locked and I don't want to unlock it unofficially so I'm waiting for xiaomi to allow the unlocking.
The module doesn't able to change light sensor measurement limits but it can replace it with one number. And if it actually does that's almost the solution.
THE FIRST TASK.
I need people which have the described gyro bug to test the Sensor Disabler xposed module.
1. Install the module, activate it in xposed installer. Go to the module setting, find the light sensor and mock its values to 50-100 lux . Reboot.
2. Turn on auto-brightness. Install Sensor Box or any other application which can measure light sensor data. If it shows exactly the same value in lux that you set up in the module then it works.
3. Try to experience gyro lag. Go to youtube and try to watch any 360 video with your hand covering light sensor.
4 . Share your results in this thread. Does the module work or not? Does the lags are gone?
Share xposed log too (/data/data/de.robv..../log/ and the file is error.log or something like that) so if the module doesn't work we can identify what is the reason.
THE SECOND TASK.
I saw source code of Sensor Disabler module and built my own module (Light_Fix.apk) with following code which is aimed to solve the gyro bug.
Test my module as well and share log.
Steps are almost the same except 2nd step:
2. If the data can not go less then 10 lux then my module works.
PHP:
private void ChangeSensorValues(final LoadPackageParam lpparam) {
XC_MethodHook mockSensorHook = new XC_MethodHook() {
@SuppressWarnings("unchecked")
@Override
protected void beforeHookedMethod(MethodHookParam param)
throws Throwable {
int type=(Integer) param.args[0];
float[] sensor_values=(float[]) param.args[1];
if ((type==5 ) & (sensor_values[0]<=10)) //type 5 - LIGHT_SENSOR afaik
{
XposedBridge.log("SOMETHING WORKS!");
XposedBridge.log("type= "+ param.args[0]);
XposedBridge.log("values= "+ param.args[1]);
sensor_values[0]=(float) 10;
param.args[1]=sensor_values;
}
}
};
XposedHelpers.findAndHookMethod("android.hardware.SystemSensorManager$SensorEventQueue", lpparam.classLoader, "dispatchSensorEvent", int.class, float[].class, int.class, long.class, mockSensorHook);
}
I am also open for help from devs and other people. It's just sad that no one hasn't even tried somehow to solve the gyro bug despite so much people have the phone.
To mods: please move that thread if it is not in appropriate place​
another one to test
i will try and let u know .... thanks for trying to fix it ....
I know this bug from cm roms, never seen it on official. right now I'm on xiaomi.eu, the bug is there with automatic brightness turned on and off but the fix isn't working for me at all.
Edit: I noticed I need to turn off auto contrast aswell to get it to work with auto brightness off. I will test the module later again
Edit2: your module does nothing, it shows 10lux minimum when covered like without module. Can't find any logs. The other module causes extreme lags and auto reboots
Seems the problem is deeper than I thought. May be even it is not possible to solve by xiaomi itself. But I will try to get some logs from both light and gyro sensors later when my boot will be unlocked. May be some solition will be found. If it will I will share it. Thanks all for tests.
I will be appreciated if someone will try Xposed module called gyroscope noize filter and tell me if the situation with lags gets better.
gohan456 said:
I know this bug from cm roms, never seen it on official. right now I'm on xiaomi.eu, the bug is there with automatic brightness turned on and off but the fix isn't working for me at all.
Edit: I noticed I need to turn off auto contrast aswell to get it to work with auto brightness off. I will test the module later again
Edit2: your module does nothing, it shows 10lux minimum when covered like without module. Can't find any logs. The other module causes extreme lags and auto reboots
Click to expand...
Click to collapse
If with my module it shows never 0 lux but 10 instead then it works. and it works as others testers reported
S0bes said:
If with my module it shows never 0 lux but 10 instead then it works. and it works as others testers reported
Click to expand...
Click to collapse
I noticed my finger is not enough to get 0 lux without the module. it shows 0 when covered with something dark. and it shows always 10 with your module.
alright. This is sad but I doubt that the problem could be fixed by users itself. May be it is kernel related thing but I doubt that too.
I think people with "the gyro problem" should massively report xiaomi about this bug. This is how I'd described it after I've done several tests: "When the phone reading simultaneously data from light sensor and gyroscope/accelerometer sensor and the data from light sensor less then 10 lux it causes sudden drop in FPS - from 50 down to 4-10 FPS. "

Fingerprint Scrolling

While lying down in bed last night, I thought it would be very useful to have the ability to browse (scroll) Chrome from my Pixel XL's fingerprint scanner - on the back of the phone. This helps me not drop my phone on my face
Behavior could be something like, this (Pseudo-code):
Code:
if gesture_direction == UP:
scroll_down()
elseif gesture_direction == DOWN:
if scroll_view_position > 0:
scroll_up()
else:
notification_display() // What currently happens on my Pixel (show notification screen)
Unless there are any glaring issues with this, I was going to investigate how to compile and run custom ROMs on an emulator so I don't make my daily-driver unusable during development.
Thoughts?
Very good idea
This makes me want to get a smartphone even more
If I had money lol

Categories

Resources