User Manual
UG_1x22_053 73M1822/73M1922 Control Module User Guide
Rev. 1.0 21
6 IOCTL Commands Description
Upon successful opening of a device or channel descriptor the application layer can control the operation
of the device and the modem channel. The application in user space communicates with the driver via
standard Linux driver interface IOCTL calls.
Unless specified, in general, the IOCTL function returns zero (0) for successful request, or a negative
value of EFAULT (-EFAULT) if any error is detected during the processing of the IOCTL. The more detail
cause of error, or also known as error code, is stored internally and can be retrieved with the
M1X22_ERROR_CODE_GET IOCTL. The driver keeps only the last error code of the last IOCTL per device
or channel descriptor. Therefore, if required, the error code must be retrieved immediately after the
execution of the IOCTL or before the next IOCTL is executed. The error codes are listed in Section 7.4.
The following sections describe the detail of each IOCTL command. The driver IOCTL belongs to one of
the following categories:
• Initialization
• Event and Status Services
• modem Hook Switch Control Services
• Caller-ID Services
• Ring Detection Services
• Line State Analysis Services
• GPIO Services
• Miscellaneous Service
6.1 Initialization and Configuration IOCTLs
The following IOCTLs are defined to configure the 73M1x22. Table 1 provides a summary of the IOCTLs.
Table 1: Summary of Initialization IOCTLs
IOCTL Name Description Descriptor
M1X22_CH_INIT
Initializing modem channel for operation. Channel
M1X22_CNTRY_NMBR_ GET
Convert ASCII two-character country code
into country code index used by the driver.
Channel
M1X22_GET_COUNTRY_CONFIG
Read the current default setting for a given
country code.
Channel
M1X22_SET_COUNTRY_CONFIG
Overwrites the current default setting for a
particular country.
Channel
M1X22_PHONE_VOLUME_SET
Set transmit and receive gain. Channel
M1X22_SET_SAMPLING_FREQ
Select modem sample rate Channel
M1X22_GET_SAMPLING_FREQ
Get current modem sample rate Channel