RealDash is a powerful package. However, deploying it into a vehicle is tricky, due to power concerns. This is not a fault in RealDash, but rather trying to adapt existing hardware to do a job it was not meant to do. Ideally, we would have a computer (SBC) that just read the logic level of the ignition switch, and if the ignition key was turned on, a logic 1 would trigger a SBC to wake up, and if the switch turned off, we would get a logic 0 that would command the SBC to suspend/sleep/hibernate. In practice, this has been hard to get.
I have a custom Arduino board that is capable of handling this from the Android side, by ‘pressing’ the power button on the SBC, and then monitoring the SBC’s GPIO to ensure it has gone to sleep or woken up. This works, but in practice the SBC sometimes only takes the hardware command to sleep as a suggestion. It may not stay asleep. However, issuing a software command seems to force it to sleep with better results. From the terminal, in sudo, simply entering
sleep
will put it to sleep more reliably. Linux uses something similar:
systemctl suspend
or
systemctl hibernate
My question is, can we get a command added to RD CAN, so that we can call these commands from our incoming data stream? For instance, if my attached Arduino hardware interface monitors the ignition switch, and sees the ignition turn off, runs through whatever onboard debounce and logic, sends a command via RD CAN to the Android (or Linux) SBC running RD, that RD will pick that up, and issue the sleep command?
I know this probably cannot be setup to go the other direction and wake up the device, but in practice, that seems to be an easier problem to fix in hardware than the sleep side.