Syntax
VM_RESULT vm_gsm_gprs_set_customized_apn_info(
    const vm_gsm_gprs_apn_info_t* info
);
ContentsIndex
PreviousUpNext
vm_gsm_gprs_set_customized_apn_info
Example
Syntax
VM_RESULT vm_gsm_gprs_set_customized_apn_info(
    const vm_gsm_gprs_apn_info_t* info
);
Description

This function sets customized APN information.

Parameters
Parameters 
Description 
const vm_gsm_gprs_apn_info_t* info 
[IN] For customized APN information, please refer to vm_gsm_gprs_apn_info_t
Example
static VMINT g_hdl;

void callback(VMINT handle, VMINT event)
{
   vm_trace("[%d][%d]", handle, event);
}

 void handle_keyevt(VMINT event, VMINT keycode) {

 vm_gsm_gprs_apn_info_t info = {0};

 VMUINT32 dtacct = 0;
 VMINT ret = 0;
 strcpy(info.apn, "cust apn");
 strcpy(info.proxy_address, "10.0.0.172");
 info.proxy_port = 80;
 info.using_proxy = 1;
 ret = vm_gsm_gprs_set_customized_apn_info(&info);
 ret = vm_gsm_gprs_get_default_apn_info(&info);

 if (0 != strcmp(info.proxy_address, "0.0.0.0") && 0 != info.proxy_port)
 {
     ret = vm_tcp_connect((const char*)info.proxy_address, info.proxy_port, VM_BEARER_DATA_ACCOUNT_TYPE_GPRS_PROXY_APN, callback);
     if (ret >= 0)
     {
         g_hdl = ret;
     }
 }
 else
 {
     ret = vm_tcp_connect((const char*)"www.mediatek.com", 80, VM_BEARER_DATA_ACCOUNT_TYPE_GPRS_PROXY_APN, callback);
     if (ret >= 0)
     {
         g_hdl = ret;
     }
 }
 ret = 0;
}
File

vmgsm_gprs.h

Group
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.