1. MTK网络编程时创建socet时需要传入一个AccountID,设置正确的AccountID才能成功连接网络,获取数据。在模拟器上调试MTK网络,这个AccountID无关紧要,只要填0就可以,也可以获取网络数据,在模拟器上调通后,在真机上只需要在create函数中填写正确的AccountID就可以了实现手机联网了。11A上正确的AccountID需要如下几个函数
///* Get account ID by APN */
srv_dtcnt_get_acc_id_by_apn("cmnet", &acc_id_out);//cmnet方式联网
kal_uint8 appid = 14;
cbm_register_app_id(&appid);
cbm_hold_bearer(appid);
acc_id_out = cbm_set_app_id(acc_id_out, appid);
cbm_deregister_app_id(appid);
把accountID 填入create中就可以了。