From bcf4f5c24968df0055d15a9fca649f67de9ced6a Mon Sep 17 00:00:00 2001 From: Daniele Rogora Date: Sat, 5 Dec 2020 10:53:21 +0100 Subject: [PATCH] Workaround for reliable incoming calls waking up from CRUST Replaced system() call with writefile() Signed-off-by: Maarten van Gompel --- programs/sxmo_screenlock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/programs/sxmo_screenlock.c b/programs/sxmo_screenlock.c index d7aba7f..dc46a89 100644 --- a/programs/sxmo_screenlock.c +++ b/programs/sxmo_screenlock.c @@ -371,6 +371,9 @@ syncstate() writefile(powerstatefile, "mem"); //---- program blocks here due to sleep ----- // // Just woke up again + fprintf(stderr, "Resetting usb connection to the modem\n"); + writefile("/sys/bus/usb/drivers/usb/unbind", "3-1"); + writefile("/sys/bus/usb/drivers/usb/bind", "3-1"); fprintf(stderr, "Woke up\n"); if (waketime > 0) { rtcresult = checkrtcwake();