Hardware periodically going to sleep? #27
Replies: 1 comment
-
Nice build! Cool that it works well! Regarding 1: I haven't had that one except when using POWERSAVE_ARDUINO_POWERDOWN in configuration.h. What power saving options do you have enabled in this file? Also, I've seen something similar when the USB connector isn't placed correctly and makes only intermittant connections that beak when the keyboard is moved slightly. Regarding 2: This happens if you connect the keyboard while having an app installed that can handle USB Serial connections. Yes, it's connected to 1, because 1 acts like reconnecting the keyboard. The other way to go here is to uninstall all apps that can handle USB serial. Btw, have you checked out this page? https://github.com/Dakkaron/Fairberry/blob/main/Documentation/UX_Shortcuts_and_Apps.md Regarding the battery consumption: The presence of the Arduino USB serial port causes the USB driver on some phones to stay active continuously, effectively preventing the phone from going into deep sleep. That's by far the biggest impact on battery life. I don't have a solution yet, since Arduino doesn't have a mechanism to disable that USB serial port. The only workaround I have so far is POWERSAVE_ARDUINO_POWERDOWN which powers down the Atmega and thus disables the USB port, allowing the USB driver to sleep. That then does the same as disconnecting the keyboard, so it needs to reconnect when turning it back on, which causes a delay and will also show that popup you are seeing. A correct solution would be some way to remove the USB serial port without impacting the USB HID endpoint used by the keyboard. |
Beta Was this translation helpful? Give feedback.
-
I have two questions which fall on the software / configuration side of things:
Periodically (sometimes hours, sometimes minutes) the Fairberry hardware will switch modes. The physical keyboard will stop responding and the OSC will kick in. The phone will show a USB device connected and charging, which is normal. If I enter the settings for the USB device and switch "USB controlled by" from "Connected device" to "This device" then it'll all start working again. Normally it's set to "Connected device" and when I attempt to switch the setting, it doesn't actually switch - but the act of trying reactivates the hardware. I'm assuming this is some kind of power save / driver issue. Any idea how to fix this?
Periodically I will get a prompt from Android asking which application I want to handle my new USB device. This happens when I first connect the Fairberry, and then some of the times when the first issue happens. I suspect this issue will go away if the first issue is addressed. Any idea what this is?
Some other observations after having run my S23+ with the Fairberry connected for a half-day:
MOV_20241217_1508329.mp4
Beta Was this translation helpful? Give feedback.
All reactions