EC21E QuecOpen sim card state explanation

Hello,
I’m trying to undestand the meaning of an enumeration reported in “ql_mcm_sim.h” file of EC21E for openCPU (SDK version EC21EFAR06A05M4G_OCPU_20.001.20.001_SDK).

I’m asking SIM card status with function:

E_QL_ERROR_CODE_T QL_MCM_SIM_GetCardStatus
(
    sim_client_handle_type          h_sim,
    E_QL_MCM_SIM_SLOT_ID_TYPE_T     simId,     ///< [IN] The SIM identifier.
    QL_MCM_SIM_CARD_STATUS_INFO_T   *pt_info   ///< [OUT] Cart status infor output
)

The status could be one of the following value:

typedef enum 
{
    E_QL_MCM_SIM_CARD_STATE_UNKNOWN                     = 0xB01,    /**< Card state unknown. */
    E_QL_MCM_SIM_CARD_STATE_ABSENT                      = 0xB02,    /**< Card is absent. */
    E_QL_MCM_SIM_CARD_STATE_PRESENT                     = 0xB03,    /**< Card is present. */
    E_QL_MCM_SIM_CARD_STATE_ERROR_UNKNOWN               = 0xB04,    /**< Unknown error state. */
    E_QL_MCM_SIM_CARD_STATE_ERROR_POWER_DOWN            = 0xB05,    /**< Power down. */
    E_QL_MCM_SIM_CARD_STATE_ERROR_POLL_ERROR            = 0xB06,    /**< Poll error. */
    E_QL_MCM_SIM_CARD_STATE_ERROR_NO_ATR_RECEIVED       = 0xB07,    /**<  Failed to receive an answer to reset.  */
    E_QL_MCM_SIM_CARD_STATE_ERROR_VOLT_MISMATCH         = 0xB08,    /**< Voltage mismatch. */
    E_QL_MCM_SIM_CARD_STATE_ERROR_PARITY_ERROR          = 0xB09,    /**< Parity error. */
    E_QL_MCM_SIM_CARD_STATE_ERROR_SIM_TECHNICAL_PROBLEMS= 0xB0A,    /**< Card returned technical problems. */
}E_QL_MCM_SIM_CARD_STATE_TYPE_T;  /**< Card state. */

Some are clear and self-explanatory, but others not.
For example: what does it means?

 E_QL_MCM_SIM_CARD_STATE_ERROR_POWER_DOWN            = 0xB05,    /**< Power down. */
 E_QL_MCM_SIM_CARD_STATE_ERROR_POLL_ERROR            = 0xB06,    /**< Poll error. */

What condition of the sim card represent?

Thanks

Hi @davdav

Classified as follows,hope those can help you.
Commnication Failure:

    E_QL_MCM_SIM_CARD_STATE_UNKNOWN                     = 0xB01,    **/**< Card state unknown. */**(The card exists, but cannot get the status)
    E_QL_MCM_SIM_CARD_STATE_PRESENT                     = 0xB03,    **/**< Card is present. */**(The card exists, but the network is not connected yet)
    E_QL_MCM_SIM_CARD_STATE_ERROR_POLL_ERROR            = 0xB06,    /**< Poll error. */(Card withdrawal may occur)
    E_QL_MCM_SIM_CARD_STATE_ERROR_NO_ATR_RECEIVED       = 0xB07,    /**<  Failed to receive an answer to reset.  */(There is something wrong with the card)

Hardware Failure:

    E_QL_MCM_SIM_CARD_STATE_ABSENT                      = 0xB02,    /**< Card is absent. */  (The status is normal) 
    E_QL_MCM_SIM_CARD_STATE_ERROR_SIM_TECHNICAL_PROBLEMS = 0xB0A,    /**< Card returned technical problems. */(Bad cards will appear)

BootStrap Failure:

    E_QL_MCM_SIM_CARD_STATE_ERROR_POWER_DOWN            = 0xB05,    /**< Power down. */(No power supply)
    E_QL_MCM_SIM_CARD_STATE_ERROR_VOLT_MISMATCH         = 0xB08,    /**< Voltage mismatch. */ (power supply is too low)
    E_QL_MCM_SIM_CARD_STATE_ERROR_PARITY_ERROR          = 0xB09,    /**< Parity error. */

Other:

MCM_SIM_CARD_STATE_ERROR_UNKNOWN_V01 = 0xB04, /**< Unknown error state. */

Br,
Puck

1 Like

Thank you very much @Puck-Q.
That’s definitely useful.

OpenCPU/QuecOpen is great but it lacks documentation!! Please consider improve it

Regards

Thanks for your suggestion, we will improve it internally @davdav

Br,
Puck