The AT commands list for each stage is now configured per-device, as
well as the UART port to be used.
As this list can be changed by the user, there is no more need for a
special GNSS-related option
The need to use libusb to check for the modem state on startup now
depends on a config option, instead of the device type. The USB PID and
VID are moved to config as well.
This commit prepares the use of device-specific configuration files.
These files should be named after the device-tree `compatible` string
with the `toml` extension.
`eg25-manager` will search for config files in
`<prefix>/etc/eg25-manager` first (or `/etc/eg25-manager` if prefix is
`/usr`), then in `<prefix>/share/eg25-manager`.
The EG25 modem needs at least 2 minutes after indicating 'RDY'
to be fully operational. If the modem is suspended before that,
calls or texts may not be seen by the userspace.
This mostly occurs when a full reboot or poweroff/poweron
sequence of the phone is performed.
:
Quectel advises to configure the USB autosuspend feature as:
- power/control: auto
- power/autosuspend_delay_ms: 3000
Futhermore, the following settings are also needed:
- power/wakeup: enabled
- power/persist: 0
- avoid_reset_quirk: 1
There's no reason we should wait 3s before retrying a failed AT command.
This can even cause issues with suspend inhibition: 3 retries of a
failed command would take 9s, while logind ignores the inhibitor after
only 5s.
Reducing the delay to 500ms should be enough and wouldn't interfere with
suspend inhibition.
Fixes#3
Most of the modem issues follow a (incomplete) USB device reset. Instead
of relying solely on the existing timer, this patch adds a udev monitor
which resets the modem as soon as its associated USB device is reset,
which greatly improves recovery time.
This patch adds a 3s delay when resetting the modem during which we
avoid triggering a new reset. This makes sure we don't trigger a reset
twice in a row.
It also disables any related running timer to avoid being re-triggered
unnecessarily.
The response can include the command and an error number, so we want to
only check it contains ERROR, even if it's replying more than just the
'ERROR' string.