During yesterday's POTA activations, I kept losing my control panel connection to Project TouCans. I restarted the rig's Pico-W several times to re-establish the connection before it occurred to me to think through the symptoms which were:
- Productively using the control panel to key the rig
- Switch to any other app on the phone besides the Chrome browser
- Return to control panel on Chrome browser and the connection is gone.
I asked ChatGPT what might have caused this. I mentioned that the phone, as Samsung Galaxy 23 had forced an update of One UI. The answer that came back was that versions of One UI newer than 6, (I'm on 7 now), do indeed cut socket connections when the user moves away from a window to extend battery life:
Samsung’s One UI 6+ (which includes UIOne 6 for the Samsung Galaxy S23+) has introduced more aggressive background app management for battery optimization. When you switch away from an app—like your Chrome browser running a WebSocket connection—the OS may pause or even terminate certain background processes, including persistent network connections. In particular:
-
WebSocket connections are typically closed if the page is backgrounded for a period of time, especially if the OS is aggressively managing memory or battery usage.
-
In Chrome and other browsers, this effect can be more pronounced on Android because of how the OS suspends backgrounded tabs.
-
Even though Chrome tries to keep WebSockets open as long as possible, UIOne’s battery optimizations can forcibly pause or limit background network activity (like suspending the process holding the socket open).
Here's the full transcript. The end result of all this is that I'll have to push the 'On' button a bit more often until I ask ChatGPT to write me a code snippet that turns the socket back on automatically when I re-enter the control panel window.
Comments
Post a Comment
Please leave your comments on this topic: