-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
T-Beam boot issue after being shut down from Android app #2364
Comments
This is not an issue on RAK devices after retesting |
@IZ1IVA so, if you have USB-connected then you are able to run console and see what happens when you press USER-button. Most likely it will tell the wake-up reason. Might be a long Deep-Sleep allthough this is supposed to happen only on ESP32 platforms without AXP192 |
Same for TLora T3S3 !! Reboot from APP hangs and EVERY configuration change with reboot hangs. Need to press the reset button... |
Maybe so, still at least I would like to see some console output. This application is quite talkative :) |
T-Beam does shutdown with user-button, but suddenly reboots. |
The original problem seems to be that TBeam goes to DeepSleep instead switching itself off. @caveman99 is this now a feature or bug? See: #2352 Besides it does not sleep forever |
here the DEBUG-LOG:
|
@karamo My guess for what happens here:
If you release the USER-button just when it is saving its config it will not wake up |
Ohh, yes. If I release the Button when the display switched off ... stay off. |
This is part of this feature request If a device is in deep sleep only GPIO will wake it back up (user button) |
@garthvh but as you can read it wakes up immediately if the button is kept pressed while ESP prepares for deepsleep. Very hard to implment that FR if at all - STILL a bug |
@caveman99 shall we open another issue for the fact that the deepsleep lasts only 18880 seconds, most likely on all ESP32 platoforms |
There are no other logs with this number, only yours what value did you set for SDS? |
@garthvh you might notice that there are two logs in this issue from me and another one from Karamo. They both show the same value 18880 seconds when the deep sleep is entered. So mine was most likely 3600 seconds and you have to ask Karamo for that other log. I think this value might be a result of wrong conversion or simply a programming error leading to this funny value. So, we must build some debugging to see where the value gets set up. |
@garthvh So, the value is 3600 and I changed it to 7200 and deep sleep is still for 18880 seconds. I think there is no relation between the parameter and the sleeping time. Back to my original question: Shall we open another issue for this funny deepsleep-time ? ` INFO | ??:??:?? 36 [Button] Shutting down |
I am not a C/C++ specialist. But could this be the problem?
All values are defined as UINT32, but in |
we're setting the device to sleep for portMAX_DELAY milliseconds, which actually is a magic number if INCLUDE_vTaskSuspend is defined, meaning 'sleep forever'. This is documented in the FreeRTOS spec. The printed number is wrong, the code is doing the right thing. |
@karamo #define portMAX_DELAY ( TickType_t ) 0xffffffffUL |
@caveman99 in |
@caveman99 Let me test this as I recall that it came back after 18880 seconds.... and did not sleep for ever. |
please wait a bit, fixing compilation errors ... |
this is not called if FreeRTOS is active. See a few line above that ... The real def is in .platformio\packages\framework-arduinoespressif32\tools\sdk\esp32\include\freertos\port\xtensa\include\freertos\portmacro.h |
anyway - test runs now |
Makes sense that 18880 was a display error, it does not exist anywhere in all of GitHub other than this issue. It also might make sense to set a SDS minimum value, anything less than 12 hours is essentially invalid and potentially dangerous, 24 hours is probably better. What would the real use case be for 2hours? If solar ran flat overnight you are just firing up a flat battery again without any charging being done by solar. The tbeam behavior has been updated to not shut down with the user button again, the screen brightness "feature" is totally broken and really should probably go away again. I have honestly never engaged it on purpose. |
@garthvh what do you mean? "18880 was a display error" |
Bad math, neither of you set a timer and waited 5 and a half hours to see if it actually turned back on. I would reverse it, does anyone have any actual testing that indicates it was really going to wake from deep sleep after 5 hours? |
@garthvh I just tested this scenario and it did not turn on after 5 hours - so seems to be a problem with number formatting |
Adding the screen brightness bug back is causing issues |
New issue for this change: the primary problem is that it breaks user button-initiated shutdown, which is a critical feature for RAK-based devices. Firmware version 2.1.8 makes user button-initiated shutdown impossible for RAK devices. In addition, this now doesn't even behave as intended; the change breaks screen function (via user button) of at least SH1106-based screens such as 1.3" OLEDs. When long-pressing the user button, the brightness indicator bar briefly appears and the screen flickers and sometimes turns off, or dims (random and uncontrollable). It takes a device reset to restore screen brightness and readability. If this change resolved a T-Beam-specific issue, recommend keeping it only for T-Beam firmware and revert to the functionality & behavior from 2.1.7 for all other targets. Alternately, simply remove the screen brightness dimming feature for all devices if it behaves unpredictably. |
i am going to toss it again. this time for good :-) really more hassle than its worth. |
Thanks! As Garth noted, I doubt anyone even uses this capability and a reboot resets to screen default brightness anyways. Dimming the screen would be a useful feature, if we were able to change a persistent brightness value that in the firmware/app settings somehow for low-light environments. I don't want to distract from other development so this is not a feature request, just stating that would be a better way to adjust brightness, assuming it's even possible to do it.
Tony
…________________________________
From: Thomas Göttgens ***@***.***>
Sent: Thursday, April 13, 2023 08:42
To: meshtastic/firmware ***@***.***>
Cc: tropho23 ***@***.***>; Comment ***@***.***>
Subject: Re: [meshtastic/firmware] T-Beam boot issue after being shut down from Android app (Issue #2364)
i am going to toss it again. this time for good :-) really more hassle than its worth.
—
Reply to this email directly, view it on GitHub<#2364 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQ7GUPTGEA2YSSLUZIHQUDLXA7YD7ANCNFSM6AAAAAAV6XDNYA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
next firmware will (again) remove screen brightness. |
Hi,
A T-Beam running firmware 2.1.2, after being shut down from Android app 2.1.1, will not boot up automatically when its USB port is plugged back into a power source. Pressing the POWER button does nothing, while pressing the USER button boots up the device.
This happens only when the device is shut down from the app, not from the POWER button.
Cheers,
Andrea
The text was updated successfully, but these errors were encountered: