![]() |
m2mb API docs
30.00.007
m2mb API sets documentation
|
Header file for m2mb_sim APIs. More...
Go to the source code of this file.
Data Structures | |
| struct | M2MB_SIM_INCOMING_APDU_T |
| struct | M2MB_SIM_PERSO_DATA_T |
| struct | M2MB_SIMOS_REQ_T |
Macros | |
| #define | MAX_APDU_SIZE ( 300 ) |
Typedefs | |
| typedef HANDLE | M2MB_SIM_HANDLE |
| typedef void(* | m2mb_sim_ind_callback) (M2MB_SIM_HANDLE h, M2MB_SIM_IND_E sim_event, UINT16 resp_size, void *resp_struct, void *userdata) |
Functions | |
| M2MB_RESULT_E | m2mb_sim_init (M2MB_SIM_HANDLE *h, m2mb_sim_ind_callback callback, void *userdata) |
| m2mb_sim_init initializes SIM service for current client. More... | |
| M2MB_RESULT_E | m2mb_sim_send_remote_apdu_req (M2MB_SIM_HANDLE h, UINT8 *apdu_command, UINT16 cmdApduLen) |
| m2mb_sim_send_remote_apdu_req sends a PDU to remote SIM. More... | |
| M2MB_RESULT_E | m2mb_sim_select_sim (M2MB_SIM_HANDLE h, M2MB_SIM_SELECTION_E simSelection) |
| m2mb_sim_select_sim switches between local (physical) and remote (virtual) SIM. More... | |
| M2MB_RESULT_E | m2mb_sim_send_remote_apdu_resp (M2MB_SIM_HANDLE h, UINT8 SW1, UINT8 SW2, UINT8 *apdu_response, UINT16 respLen, UINT8 SIMStatus) |
| m2mb_sim_send_remote_apdu_resp sends a remote SIM response APDU to UIM. More... | |
| M2MB_RESULT_E | m2mb_sim_send_crypto_resp (M2MB_SIM_HANDLE h, UINT8 *pData, UINT16 datalen, M2MB_RESULT_E cryptoResult) |
| Provide response after. More... | |
| M2MB_RESULT_E | m2mb_sim_send_remote_reset_req (M2MB_SIM_HANDLE h) |
| Call reset of SIM service to the modem. More... | |
| M2MB_RESULT_E | m2mb_sim_send_remote_watchdog_kick_req (M2MB_SIM_HANDLE h, UINT32 wdTimeoutX) |
| m2mb_sim_send_remote_watchdog_kick_req can both kick watchdog of uim task on modem and set r its timeout multiplie (something similar to clock divider). More... | |
Header file for m2mb_sim APIs.
m2m/m2m_common/m2mb_inc/m2mb_sim.h
m2mb_sim APIs provide actions and events for remote SIM management.
@notes
| M2MB_RESULT_E m2mb_sim_init | ( | M2MB_SIM_HANDLE * | h, |
| m2mb_sim_ind_callback | callback, | ||
| void * | userdata | ||
| ) |
m2mb_sim_init initializes SIM service for current client.
m2mb_sim_init initialize SIM service for current client returning the handle that must be passed as first parameter for all SIM actions. Calling the m2mb_sim_init is mandatory before using the SIM service.
| [in] | *h | first parameter is the handle to the SIM service, that will be initialized by the function. |
| [in] | callback | second parameter is the callback that will be called if an event or a response happens. |
| [in] | userdata | third parameter is a pointer to generic user data that will be returned as it is in the callback. |
m2mb_sim_init(&h, myCallback, myUserdata);
| M2MB_RESULT_E m2mb_sim_select_sim | ( | M2MB_SIM_HANDLE | h, |
| M2MB_SIM_SELECTION_E | simSelection | ||
| ) |
m2mb_sim_select_sim switches between local (physical) and remote (virtual) SIM.
m2mb_sim_select_sim switches between local (physical) and remote (virtual) SIM.
| [in] | h | first parameter is the handle to the remote SIM service, previously initialized by the m2mb_sim_init function. |
| [in] | simSelection | second parameter is an enum indicating which SIM should be selected. |
m2mb_sim_select_sim(h, simSelection);
| M2MB_RESULT_E m2mb_sim_send_crypto_resp | ( | M2MB_SIM_HANDLE | h, |
| UINT8 * | pData, | ||
| UINT16 | datalen, | ||
| M2MB_RESULT_E | cryptoResult | ||
| ) |
Provide response after.
| [in] | h | first parameter is the handle to the remote SIM service, previously initialized by the m2mb_sim_init function. |
| [in] | pData | pointer to data provided as response |
| [in] | datalen | lenght of data |
| [in] | cryptoResult | result from Crypto operation |
| M2MB_RESULT_E m2mb_sim_send_remote_apdu_req | ( | M2MB_SIM_HANDLE | h, |
| UINT8 * | apdu_command, | ||
| UINT16 | cmdApduLen | ||
| ) |
m2mb_sim_send_remote_apdu_req sends a PDU to remote SIM.
m2mb_sim_send_remote_apdu_req sends a PDU to the remote SIM. The function is TBD. The response of the request is received in the callback defined by the user, using the m2mb_sim_send_remote_apdu_resp template.
| [in] | h | first parameter is the handle to the remote SIM service, previously initialized by the m2mb_sim_init function. |
| [in] | apdu_command | second parameter is an array containing the PDU to be sent. |
| [in] | cmdApduLen | third parameter is PDU length in byte. |
m2mb_sim_send_remote_apdu_req(h, apdu_command, cmdApduLen);
| M2MB_RESULT_E m2mb_sim_send_remote_apdu_resp | ( | M2MB_SIM_HANDLE | h, |
| UINT8 | SW1, | ||
| UINT8 | SW2, | ||
| UINT8 * | apdu_response, | ||
| UINT16 | respLen, | ||
| UINT8 | SIMStatus | ||
| ) |
m2mb_sim_send_remote_apdu_resp sends a remote SIM response APDU to UIM.
m2mb_sim_send_remote_apdu_resp sends a remote SIM response APDU to UIM task (UIM (local SIM) manager).
| [in] | h | first parameter is the handle to the remote SIM service, previously initialized by the m2mb_sim_init function. |
| [in] | SW1 | second parameter is SW1 of remote SIM response APDU. |
| [in] | SW2 | third parameter is SW2 of remote SIM response APDU. |
| [in] | apdu_response | fourth parameter is remote SIM response APDU. |
| [in] | respLen | fifth parameter is remote SIM response APDU length. |
| [in] | respLen | sixth parameter is remote SIM status. |
m2mb_sim_send_remote_apdu_resp(h, SW1, SW2, apdu_response, respLen, SIMStatus);
| M2MB_RESULT_E m2mb_sim_send_remote_reset_req | ( | M2MB_SIM_HANDLE | h | ) |
Call reset of SIM service to the modem.
| [in] | h | first parameter is the handle to the remote SIM service, previously initialized by the m2mb_sim_init function. |
| M2MB_RESULT_E m2mb_sim_send_remote_watchdog_kick_req | ( | M2MB_SIM_HANDLE | h, |
| UINT32 | wdTimeoutX | ||
| ) |
m2mb_sim_send_remote_watchdog_kick_req can both kick watchdog of uim task on modem and set r its timeout multiplie (something similar to clock divider).
when heavy code is performed, using for example crypto libs or TrustZone, kicking of watchdog related to uim management in modem, can avoid crash for starvation
| [in] | h | first parameter is the handle to the remote SIM service, previously initialized by the m2mb_sim_init function. |
| [in] | wdTimeoutX | Watchdog timeout multiplier. If a value greater than 127 is set, WD will be disabled. If 0, 1 is set instead. |
@code