gps should only be activated if gpsd requests it
Right now GPS is always activated/on, but eg25-manager should only activate it if requested by gpsd. the gpsd manpage mentions a device hook file that gpsd runs on activate/deactivate, eg25-manager could provide some interface that could be used in this script:
When a device is activated (i.e. a client requests data from it), gpsd attempts to execute a hook from /etc/gpsd/device-hook with first command line argument set to the pathname of the device and the second to ACTIVATE. On deactivation, it does the same passing DEACTIVATE for the second argument.
Here's what pmOS does today in this device hook file (when eg25-manager is not used):
#!/bin/sh if [ "$2" == "ACTIVATE" ]; then echo "AT+QGPS=1" | atinout - /dev/EG25.AT - elif [ "$2" == "DEACTIVATE" ]; then echo "AT+QGPSEND" | atinout - /dev/EG25.AT - else echo "Unhandled argument: $2" exit 1 fi