Page 1 of 1

UART2 Stops Recieving Data

Posted: Mon Aug 21, 2017 8:23 am
by llewellyn
Hi,

I am using a GSM and GPS module along with ESP32.
Following is my configuration for UART.

UART1 - TX: 21, RX: 13 - GSM Module
UART2 - TX: 23, RX: 22 - GPS Module.

I am Using PPPoS client with the GSM module.

The GPS works fine till the GSM module starts communicating.
I do not receive any data from the GPS once the GSM module starts communicating.

I have checked the data at the GPS module. It continues to send the data but ESP32 does not receive it.
Has Anyone else faced such an issue?

Regards

Re: UART2 Stops Recieving Data

Posted: Mon Aug 21, 2017 10:33 am
by llewellyn
After Further investigation,

When there is a lot of traffic on UART1, Some characters on UART2 are not received from the GPS module.

What could be the issue? And how do I tackle this?


Regards

Re: UART2 Stops Recieving Data

Posted: Tue Aug 22, 2017 6:01 am
by llewellyn
I have captured the data from a USB to serial cable to the GPS and using ESP32 and here are the results

ESP32 :
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*01,01,02,ANTSTATUS=OPEN*2B
0,,,M,,M,,*4F
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPGLL,,,,,003232.799,V,N*7GA,003233.799,,,,,0,0,,,M,,M,,PEN*2B
$GPRMC,003233.799,V,,,,,0.00,0.00,060180,,,N*44


USB to Serial:
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,003232.799,,,,,0,0,,,M,,M,,*4F
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPGLL,,,,,003232.799,V,N*7D
$GPTXT,01,01,02,ANTSTATUS=OPEN*2B
$GPRMC,003233.799,V,,,,,0.00,0.00,060180,,,N*44

Re: UART2 Stops Recieving Data

Posted: Tue Aug 22, 2017 2:42 pm
by WiFive
You don't say how you are reading serial data, post your code

Re: UART2 Stops Recieving Data

Posted: Sat Aug 26, 2017 5:31 am
by llewellyn
This is how i read Data from UART

char *readLine(uart_port_t uart) {
static char line[1024];
int size;
memset(line , 0 , sizeof(line));
char *ptr = line;
while (1) {
size = uart_read_bytes(uart, (unsigned char *) ptr, 1, 1000/portMAX_DELAY);
if (size == 1) {
printf("%c" , ptr[0]);
if (*ptr == '\n') {
ptr++;
*ptr = 0;
return line;
}
ptr++;
} // End of read a character
} // End of loop
} // End of readLine