AutoPi board disconnects after 10 minutes when connected to AGL (Automotive Grade Linux)


I have an AutoPi Telematics Unit Pi3. I have swapped the Pi3 for a Pi4 and attached the AutoPi board to it. I have been experimenting with Automotive Grade Linux for my Masters and installed AGL on the Pi4. Currently, most things are working, however, the modem (or I guess the whole AutoPi board) disconnects after 10 minutes. After some quick research, I noticed that the AutoPi board disconnects after 10 minutes if it has not received a heartbeat from the OS. This is when it is booting up. This makes sense since my AGL system, which is essentially Linux, does not send a heartbeat to the board.

Does anyone know how I can create a service to send a heartbeat to the AutoPi board to keep it on?



What you see is the intended power scenario of the device. The device contains a low level chip, which resets the device in case of an emergency in the OS. The functionality is simple. A heartbeat is send from the OS to the chip and if the chip does not receive the heartbeat, then the power is killed and the OS is rebooted.
If you want to add your own code, then you need to maintain that heartbeat in order for the device to stay awake.
The code is located here:

Look for heartbeat_handler.

The default timeout is 10 mins.