Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

how can I determine if the device I'm running on would work on a cdma network? (or a gsm network?) I see how I could determine what kind of network I'm connected to (via serving system info, per below), but how could I tell whether the device can do cdma (or gsm) *before* connecting to a network? (or in airplane mode)

I'm targeting BrewMP 1.0.2 and better, if that matters. (and my test device is an HTC Smart)

thx.

-steve

// note that a cdma handset in airplane mode gots no svc.
bool_t IsCDMAService() 
{
	bool_t result = SI_FALSE;
	ITelephone *pITelephone = NULL;
	ISHELL_CreateInstance(PISHELL, AEECLSID_TELEPHONE, ( void **)&pITelephone);
	if  (pITelephone) 
	{
		AEETSSInfo SSInfo;
		if (SUCCESS == ITELEPHONE_GetServingSystemInfo(pITelephone, &SSInfo,sizeof (AEETSSInfo))) 
		{
			if (SSInfo.sys_id.id_type == AEET_SYS_ID_TYPE_IS95) 
			{
				result = SI_TRUE;
			}
		}
		ITELEPHONE_Release(pITelephone);
	}
	return result;

one way could be to get  AEE_DEVICEITEM_HWIDLIST using IShell_GetDeviceInfoEx().
this returns a list of all Hardware Device IDs, first one being the primary H/W ID. see documentation of AEE_DEVICEITEM_HWIDLIST in API ref.
 
For a GSM, WCDMA or UMTS device, the IMEI returned should be Non Zero(Valid) & the MEID & ESN, should both be Zero(In-valid).
the vice-versa would apply for a CDMA device. CDMA device have a ESN but a zero or No IMEI.
Note non available IDs in list of HWIDs may be equivilant to a zero value.

one way could be to get  AEE_DEVICEITEM_HWIDLIST using IShell_GetDeviceInfoEx().
this returns a list of all Hardware Device IDs, first one being the primary H/W ID. see documentation of AEE_DEVICEITEM_HWIDLIST in API ref.
 
For a GSM, WCDMA or UMTS device, the IMEI returned should be Non Zero(Valid) & the MEID & ESN, should both be Zero(In-valid).
the vice-versa would apply for a CDMA device. CDMA device have a ESN but a zero or No IMEI.
Note non available IDs in list of HWIDs may be equivilant to a zero value.