Tcp connection on MC60

Hello, I am using MC60 module and i am beginer here in opencpu application. I want to start tcp connecction . How can i start stap by stap programing to achive sending data using tcp connection without any external MCU only using opencpu application?

Hi mohit
you can refer the TcpClient example from SDK.

Regards
Rahul Mahakalkar

while one is good for send continews data on server using TCP application. RIL or URC?

Hi Mohit ,

If you are using TCP in OCPU then better to use the API instead of using AT command through RIL .

here is my code for… sim card status is every time give me an this error “SIM card status is unnormal!”

void proc_main_task(s32 taskId)
{
s32 WTDId;
s32 ret;
ST_MSG msg;
UART_Initialize();
WTDId=watchdog_cnf();
APP_DEBUG(“WTDId: %d\r\n”,WTDId);
APP_DEBUG(“OpenCPU: TCP program\r\n”);
while(TRUE)
{
Ql_memset(&msg, 0x0, sizeof(ST_MSG));
Ql_OS_GetMessage(&msg);
switch(msg.message)
{
case MSG_ID_RIL_READY:
{
APP_DEBUG("<-- RIL is ready -->\r\n");
Ql_RIL_Initialize();
GPS_OPEN(); // RIL_GPS_Open(1)
Switch_Sim(); // AT+QDSIM=1
UTCtime_syc();
SIMState(); // RIL_SIM_GetSimState(&simStat)
break;
}
default:
break;
}
}
}

where is the problem i did not found. MC60 every time give me a status of sim card is unnormal.

Hi Mohit ,

Are you finding this problem while switching sim or always ?

If it is after switching then you need to reset RF or Power to get SIM2 detected . you can send command AT+CFUN=0 and AT+CFUN=1 or you can reset the module after switching the sim .

If it is coming on both sims then you need to check your Hardware .

Thank you
Ratan

i am facing while i am switching .
I try out Ql_restart(0) for restart module. is it worth it? also same problem after this command.

Thanks after your solution i tried out AT+CFUN=0 and AT+CFUN=1 my problem will solved.