RFC: Ignore SIM hot-swap and assume SIM card always present
Some Telit mini-PCIe modems (like HE910) allow using external SIM holder instead of one soldered directly on miniPCIe PCB. However external SIM holder doesn't have SIMIN pin connected to the module so there is no possibility for detecting if SIM card is present or not.
In this case I'd like to allow ignoring (for example via udev rule) SIMIN pin
and configure SIM detection as "always present". Otherwise modem won't work correctly
because SIM status will be SIM missing
.
As an example of interface ignoring SIMIN pin may happen when following udev property is present on port
ENV{ID_MM_TELIT_SIMIN_IGNORE}="1"
Reference: Telit 3G Modules AT Commands Reference Guide
AT#SIMDET= <mode>
Parameter:
<mode> - SIM Detection mode
0 - ignore SIMIN pin and simulate the status ‘SIM Not Inserted’
1 - ignore SIMIN pin and simulate the status ‘SIM Inserted’(default for
UL865 and UE866 families)
2 - automatic SIM detection through SIMIN Pin
(default for HE910 and UE910 families)
Note: with Sim-On-Chip products, #SIMDET allows to switch between internal
and external SIM, as described below
0 - switch to internal SIM
1 - switch to external SIM, ignore SIMIN pin
2 - automatic external SIM detection through SIMIN pin (default).
Here is the patch that works for me at the moment but what's missing is support for udev rule making this feature optional
0001-telit-Support-for-external-SIM-holder-without-SIMIN-.patch
Issue with AT#SIMDET
is that it is not persistent across modem restarts. Calling ATZ also requires sending AT#SIMDET again
Additionally parsing QSS events shall also be dropped in SIMDET=1 case.
I don't see the way how to make this functionality configurable in plugin context without modifying mm-base-modem / mm-broadband-modem classes.
Any suggestions?