Module mcm
ql-oe-sys is deprecated, use the pure Rust crates of ql-oe such as ql-dms, ql-nas and ql-wds
Expand description
Contains the ql_mcm_*.h headers.
See: <ql_mcm.h>
MCM is preferred over the older APIs according to Quectel. This is weird because MCM uses QMI in the background…
§Notes on QL_MCM_Client_Init
This function is not directly bound; the following notes document its behavior.
§Dependencies
This function calls out to the following:
ql_log_printmcm_client_init(libmcm)ql_mcm_required_service_updownql_file_exist
§Initialization flow
The library maintains a static array of per-client-type metadata. One field
indicates whether the client type has already been initialized. If so, the
function returns immediately without writing to the provided
mcm_client_handle_type pointer.
If the client hasn’t been initialized, the function:
- Locks a global mutex
- Checks if a global
mcm_client_handle_typestatic variable is set - If not set, waits for
/tmp/mcm_service_ready.flagto exist- Performs up to 1000 checks, 10 ms apart
- Returns
INTERNALif the file doesn’t appear
- Calls
mcm_client_initwith the global client handle variable - Unlocks the mutex
Note: The library internally uses a single MCM client handle regardless of client type.
§Service-specific logic
For SERVICE_DATA, SERVICE_LOC, SERVICE_MOBILEAP,
SERVICE_ATCOP (id 0x0A), and SERVICE_SIM, the function:
- Calls
ql_mcm_required_service_updownto start the corresponding service - Waits for a service-specific flag file (1000 checks, 10 ms apart):
/tmp/mcm_data_service_ready.flag/tmp/mcm_loc_service_ready.flag/tmp/mcm_mobileap_service_ready.flag/tmp/mcm_atcop_service_ready.flag/tmp/mcm_sim_service_ready.flag
Note: ql_mcm_required_service_updown does not interact with Linux
processes; it uses mcm_client_execute_command_sync to interact with the
modem firmware. The creator of these flag files is currently unknown.
§Performance implications
This function can block for extended periods in the worst case, with potential waits of up to 10 seconds per flag file. Use with caution in performance-sensitive contexts.
Re-exports§
pub use self::common::Error;Deprecated
Modules§
- atc
Deprecated - MCM AT command API.
- common
Deprecated - Common MCM types.
- data
Deprecated - MCM Data API.
- nw
Deprecated - MCM Network API.
- sim
Deprecated - MCM SIM API.
- sms
Deprecated - See: <ql_mcm_sms.h>
Constants§
- MAGIC_
MSG_ ID_ SERVICE_ DOWN Deprecated - MAGIC_
MSG_ ID_ SERVICE_ UP Deprecated - SERVICE_
ATC Deprecated - SERVICE_
CLIENT Deprecated - SERVICE_
DATA Deprecated - SERVICE_
DM Deprecated - SERVICE_
LOC Deprecated - SERVICE_
MAX Deprecated - SERVICE_
MOBILEAP Deprecated - SERVICE_
NOT_ REQUIRED Deprecated - SERVICE_
NW Deprecated - SERVICE_
REQUIRED Deprecated - SERVICE_
SIM Deprecated - SERVICE_
SMS Deprecated - SERVICE_
VCALL Deprecated
Type Aliases§
- Error
Code Deprecated