Part Number: CC2650
Tool/software: TI-RTOS
Hi,
I have an application where I'm connecting a SIM5320 GSM modem using UART to the processor. When the GSM module gets ON I get some initialization message from the module that is OK. After that I send a AT command and then listening to the port to get answer from module. For the commands that the response is short string everything is OK. As and example I send AT+CREG? and I get:
+CREG: 0,0 OK
that is exactly what I supposed to get. But the issue is for cases that the response should be longer. for example when I send AT+CGPSINFOCFG I'm supposed to get:
+CGPSINFO: (0-255),(0-31) OK
but I just get the partially the first line:
+CGPSINFO: (0
I'm pretty sure that the module working well since when I connect it directly to the computer using serial everything is OK.
I tried to remove the System_flush() (after getting each char from serial) from my code to see if it gets the whole response but still I don't get the whole string.
I checked different commands with long response and I noticed I'm getting 31 char and the rest is missed.
I put my code here:
char msg_write[]="AT+CGPSINFOCFG=?\r"; // To hold the message
UART_write(uart, msg_write, sizeof(msg_write)-1);
uint32_t t0=Seconds_get();
// while (idx<140) {
while (flag2) {
UART_read(uart, &input, 1);
msg_read[idx++]=input;
System_printf("%c",input);
System_flush();
if ( strstr(msg_read,"OK") != NULL ) {
flag2=false;
System_flush();
}
msg_read[0] = '\0'; // clears message
idx=0;
}
msg_read[idx]='\0';
//System_flush();
System_printf("%s",msg_read);
System_flush();