| /*============================================================================= |
| ** FileName: lynq_at.cpp |
| ** Desc: lynq Send at to modem directly |
| ** Author: Warren |
| ** Version: V1.0 |
| ** LastChange: 2021-09-28 |
| ** History: |
| **=============================================================================*/
|
| #include "lynq_at.h"
|
| #include "common.h"
|
| #include "stateManager/stateManager.h" |
| #include "Phone_utils.h" |
| #include "utils.h" |
|
|
| int lynqSendAt(int argc,char *argv[],int uToken)
|
| {
|
| int request = RIL_REQUEST_OEM_HOOK_RAW; |
| RIL_SOCKET_ID id = RIL_SOCKET_1; |
| if(utils::is_support_dsds()) |
| {
|
| id = (RIL_SOCKET_ID)get_default_sim_all_except_data(); |
| } |
| else if(utils::is_suppport_dsss())
|
| {
|
| id = (RIL_SOCKET_ID)Phone_utils::get_enable_sim_for_dsss(); |
| } |
| // if (request < 1 || (request >= (int32_t)NUM_ELEMS(s_commands) && request < RIL_REQUEST_VENDOR_BASE)) { |
| // RLOGW("unsupported request code %d token %d", request); |
| // FIXME this should perhaps return a response |
| // continue; |
| //} |
| |
| //RLOGD("REQUEST: %s ParamterNum:%d", requestToString(request), argc); |
| RequestInfo *pRI = creatRILInfoAndInit(request, UDP, (RIL_SOCKET_ID)(id));
|
| pRI->lynqEvent=1;
|
| printf("Warren test ====> argv[1]=%s\n",argv[1]);
|
| sendATCMD(2, argv,id,pRI);
|
| return 0;
|
| }
|
|
|