Benjamin-Loison / android

0 stars 0 forks source link

Seems to have trouble to charge Fairphone 4 recently #113

Open Benjamin-Loison opened 5 hours ago

Benjamin-Loison commented 5 hours ago

Volkswagen Polo USB-A to USB-C cable works fine.

https://shop.fairphone.com/shop/dual-port-30-w-charger-eu-6 https://shop.fairphone.com/shop/usb-c-3-2-long-life-cable-5 work fine when using USB-A only with one side on my bedside table but not with USB-C.

Charging from USB-C from my laptop does not seem to work but maybe due to Android setting (like USB debugging), charging from USB-A works fine.

My mobile battery works fine at least with the highest voltage port.

Maybe related to #112 but I doubt so.

Benjamin-Loison commented 5 hours ago

So have to pay attention every time I charge my phone, for instance before sleeping, to make sure to have plugged it correctly (working setup: port + side).

It seems quite complicated to warn me automatically that it is not well plugged.

Maybe termux-battery-status can help as maybe it is charging but so slowly that it does not display that it is charging, if I remember correctly I already faced such a situation with a previous phone.

When charging I get:

termux-battery-status
Output: ```json { "health": "GOOD", "percentage": 16, "plugged": "PLUGGED_AC", "status": "CHARGING", "temperature": 26.5, "current": 60730 } ```
Benjamin-Loison commented 3 hours ago

Can verify charging state without having to face the phone once lying down thanks to:

ssh -p 8022 fairphone-4-5g termux-battery-status | jq '{percentage, plugged, status}'
Output: ```json { "percentage": 36, "plugged": "PLUGGED_AC", "status": "CHARGING" } ```
Benjamin-Loison commented 3 hours ago

According to my crontab can use:

* * * * * B=$(termux-battery-status) && test $(echo $B | jq '.percentage') -eq 100 && echo $(echo $B | jq '.status') | grep -qw "CHARGING" && M="Battery full, please unplug the charger." && echo $(termux-notification-list) | grep -vq "$M" && termux-notification -t "$M"

to be add a notification to the phone once reached 100 % of battery. Could notify my computers, as may not see or hear the phone.

Should make sure that phone settings allow reaching such full battery state.