by Ian Price
Version 1 (September 10, 2024)
Download (62 downloads)
Used with a usb-c hub with Ethernet connection to pi4b plus USB to spdif audio interface.
A script on the pi starts scrcpy (plus ADB for screen resolution+dpi to match the pi HDMI display, phone screen off) when it detects an internet connection is available via Ethernet.
When the pi detects ignition off (key removed, gpio via relay status) it closes the scrcpy session, restores the phones display resolution+dpi via ADB, then shuts the pi down before it loses 5vdc supply after around 30 seconds.
I use otg for other uses, but this is the only application where the phone is also getting charged at the same time.
I rooted my pixel 6a due to losing tcpip debugging on each reboot, but there might be other ways around that, so I'd say that's entirely optional.