m2mb API docs  25.30.003
m2mb API sets documentation
m2mb_fwautosim.h File Reference

Header file for m2mb_fwautosim APIs. More...

Go to the source code of this file.

Typedefs

typedef HANDLE M2MB_FWAUTOSIM_HANDLE
 
typedef void(* m2mb_fwautosim_callback) (M2MB_FWAUTOSIM_HANDLE handle, M2MB_FWAUTOSIM_IND_E event, UINT16 resp_size, void *resp, void *userdata)
 

Enumerations

enum  M2MB_FWAUTOSIM_E { M2MB_FWAUTOSIM_DISABLED = 0, M2MB_FWAUTOSIM_ENABLED = 1, M2MB_FWAUTOSIM_ONESHOT = 2, M2MB_FWAUTOSIM_ONESHOT_IN_PROGRESS = 3 }
 
enum  M2MB_FWAUTOSIM_IND_E { M2MB_FWAUTOSIM_INDICATION_GENERIC }
 

Functions

M2MB_RESULT_E m2mb_fwautosim_init (M2MB_FWAUTOSIM_HANDLE *h, m2mb_fwautosim_callback callback, void *userdata)
 m2mb_fwautosim_init initializes FWAUTOSIM service for current client. More...
 
M2MB_RESULT_E m2mb_fwautosim_set (M2MB_FWAUTOSIM_HANDLE h, M2MB_FWAUTOSIM_E type)
 m2mb_fwautosim_set enable/disable fwautosim More...
 
M2MB_RESULT_E m2mb_fwautosim_get (M2MB_FWAUTOSIM_HANDLE h, M2MB_FWAUTOSIM_E *value)
 m2mb_fwautosim_get returns fwautosim current state (enable/disable) More...
 
M2MB_RESULT_E m2mb_fwautosim_deinit (M2MB_FWAUTOSIM_HANDLE h)
 m2mb_fwautosim_deinit deinitializes FWAUTOSIM service for current client. More...
 

Detailed Description

Header file for m2mb_fwautosim APIs.

m2m/m2m_generic/common/m2mb_inc/m2mb_fwautosim.h

m2m base fwautosim api prototype

@notes Dependencies: m2mb_types.h This module defines APIs change firmware image automatically based on the inserted SIM

Author
Giusy Vallascas
Date

Function Documentation

◆ m2mb_fwautosim_deinit()

M2MB_RESULT_E m2mb_fwautosim_deinit ( M2MB_FWAUTOSIM_HANDLE  h)

m2mb_fwautosim_deinit deinitializes FWAUTOSIM service for current client.

m2mb_fwautosim_deinit deinitialize FWAUTOSIM service for current client, freeing the handle passed as first parameter. Calling the m2mb_fwautosim_deinit is useful after using the FWAUTOSIM service in order to free memory space.

Parameters
[in]his the handle to the FWAUTOSIM service, that will be deinitialized by the function.
Returns
returns M2MB_RESULT_SUCCESS on success, a different value on error.
Note

◆ m2mb_fwautosim_get()

M2MB_RESULT_E m2mb_fwautosim_get ( M2MB_FWAUTOSIM_HANDLE  h,
M2MB_FWAUTOSIM_E *  value 
)

m2mb_fwautosim_get returns fwautosim current state (enable/disable)

m2mb_fwautosim_get allows to read value of fwautosim (0-1)

Parameters
[in]his the handle to the FWAUTOSIM service
[in]*valueis the pointer to the fwautosim value it returns the current state of fwautosim (0: disabled, 1: enabled)
Returns
returns M2MB_RESULT_SUCCESS on success, a different value on error.
Note
this function is used to check a SIM switch, for example

◆ m2mb_fwautosim_init()

M2MB_RESULT_E m2mb_fwautosim_init ( M2MB_FWAUTOSIM_HANDLE *  h,
m2mb_fwautosim_callback  callback,
void *  userdata 
)

m2mb_fwautosim_init initializes FWAUTOSIM service for current client.

m2mb_fwautosim_init initialize FWAUTOSIM service for current client returning the handle that must be passed as first parameter for all FWAUTOSIM actions. Calling the m2mb_fwautosim_init is mandatory before using the FWAUTOSIM service.

Parameters
[in]*his the pointer to the handle to the FWAUTOSIM service, that will be initialized by the function.
[in]callbackcallback for the fwautosim indications (m2mb_fwautosim_callback) WARNING: at the moment not supported/required: pass it as NULL.
[in]userdatais a pointer to generic user data
Returns
returns M2MB_RESULT_SUCCESS on success, a different value on error.
Note

◆ m2mb_fwautosim_set()

M2MB_RESULT_E m2mb_fwautosim_set ( M2MB_FWAUTOSIM_HANDLE  h,
M2MB_FWAUTOSIM_E  type 
)

m2mb_fwautosim_set enable/disable fwautosim

m2mb_fwautosim_set allows to set value of fwautosim (0-1)

Parameters
[in]his the handle to the FWAUTOSIM service
[in]typeis fwautosim value assigned by at cmd
Returns
returns M2MB_RESULT_SUCCESS on success, a different value on error.
Note
type can be only 0 or 1, 0 is to disable fwautosim and 1 is to enable fwautosim. If fwautosim is enable, the inserted SIM is checked to establish if the operator is ATT o VZW and to change firmware image automatically. When firmware image is changed automatically the system is automatically rebooted